update_guest_user
¶
update_guest_user(
network_id: NetworkId,
username_hash: GenericString,
block: bool,
*,
config_overrides: Optional[WickrClientConfig] = 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
>>> client.update_guest_user(network_id='12345678', username_hash='032c36d5623781204592a69269ed9480d604484269c8a4c2d39528885a56470d', block=True)
Unblock a guest user
>>> client.update_guest_user(network_id='12345678', username_hash='032c36d5623781204592a69269ed9480d604484269c8a4c2d39528885a56470d', block=False)
User already blocked error
>>> client.update_guest_user(network_id='12345678', username_hash='032c36d5623781204592a69269ed9480d604484269c8a4c2d39528885a56470d', block=True)
Source code in docs_src/capo_wickr/_services/wickr.py
3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 | |