update_network
async
¶
update_network(
network_id: NetworkId,
network_name: GenericString,
*,
config_overrides: Optional[AsyncWickrClientConfig] = None,
client_token: Optional[ClientToken] = None,
encryption_key_arn: Optional[GenericString] = None,
) -> UpdateNetworkResponse
Updates the properties of an existing Wickr network, such as its name or encryption key configuration.
Parameters:
-
network_id(NetworkId) –The ID of the Wickr network to update.
-
network_name(GenericString) –The new name for the network. Must be between 1 and 20 characters.
-
client_token(Optional[ClientToken], default:None) –A unique identifier for this request to ensure idempotency.
-
encryption_key_arn(Optional[GenericString], default:None) –The ARN of the Amazon Web Services KMS customer managed key to use for encrypting sensitive data in the network.
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:
Update network name successfully
>>> await client.update_network(network_id='12345678', network_name='Updated Network Name')
Update network - invalid name
>>> await client.update_network(network_id='12345678', network_name='This name is way too long for a network')
Update network - not found
Source code in docs_src/capo_wickr/_services/async_wickr.py
3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 | |