update_guest_user
async
¶
update_guest_user(
network_id: NetworkId,
username_hash: GenericString,
block: bool,
*,
config_overrides: Optional[AsyncWickrClientConfig] = None,
) -> UpdateGuestUserResponse
Updates the block status of a guest user in a Wickr network. This operation allows you to block or unblock a guest user from accessing the network.
Parameters:
-
network_id(NetworkId) –The ID of the Wickr network where the guest user's status will be updated.
-
username_hash(GenericString) –The username hash (unique identifier) of the guest user to update.
-
block(bool) –Set to true to block the guest user or false to unblock them.
Raises:
-
BadRequestError–The request was invalid or malformed. This error occurs when the request parameters do not meet the API requirements, such as invalid field values, missing required parameters, or improperly formatted data.
-
ForbiddenError–Access to the requested resource is forbidden. This error occurs when the authenticated user does not have the necessary permissions to perform the requested operation, even though they are authenticated.
-
InternalServerError–An unexpected error occurred on the server while processing the request. This indicates a problem with the Wickr service itself rather than with the request. If this error persists, contact Amazon Web Services Support.
-
RateLimitError–The request was throttled because too many requests were sent in a short period of time. Wait a moment and retry the request. Consider implementing exponential backoff in your application.
-
ResourceNotFoundError–The requested resource could not be found. This error occurs when you try to access or modify a network, user, bot, security group, or other resource that doesn't exist or has been deleted.
-
UnauthorizedError–The request was not authenticated or the authentication credentials were invalid. This error occurs when the request lacks valid authentication credentials or the credentials have expired.
-
ValidationError–One or more fields in the request failed validation. This error provides detailed information about which fields were invalid and why, allowing you to correct the request and retry.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Block a guest user
>>> await client.update_guest_user(network_id='12345678', username_hash='032c36d5623781204592a69269ed9480d604484269c8a4c2d39528885a56470d', block=True)
Unblock a guest user
>>> await client.update_guest_user(network_id='12345678', username_hash='032c36d5623781204592a69269ed9480d604484269c8a4c2d39528885a56470d', block=False)
User already blocked error
>>> await client.update_guest_user(network_id='12345678', username_hash='032c36d5623781204592a69269ed9480d604484269c8a4c2d39528885a56470d', block=True)
Source code in docs_src/capo_wickr/_services/async_wickr.py
3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 | |