batch_reset_devices_for_user
async
¶
batch_reset_devices_for_user(
network_id: NetworkId,
user_id: UserId,
app_ids: AppIds,
*,
config_overrides: Optional[AsyncWickrClientConfig] = None,
client_token: Optional[ClientToken] = None,
) -> BatchResetDevicesForUserResponse
Resets multiple devices for a specific user in a Wickr network. This operation forces the selected devices to log out and requires users to re-authenticate, which is useful for security purposes or when devices need to be revoked.
Parameters:
-
network_id(NetworkId) –The ID of the Wickr network containing the user whose devices will be reset.
-
user_id(UserId) –The ID of the user whose devices will be reset.
-
app_ids(AppIds) –A list of application IDs identifying the specific devices to be reset for the user. Maximum 50 devices per batch request.
-
client_token(Optional[ClientToken], default:None) –A unique identifier for this request to ensure idempotency.
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:
Successful device reset
>>> await client.batch_reset_devices_for_user(network_id='12345678', user_id='12345', app_ids=['d3135a42dcb6437780b16c3ca9581fe64e6822773cd6b965d25fc9929c89aca6', 'e4246b53edc7548891c27d4da0692fe75f7933884de7c076e36gca030d90bdb7'])
Partial failure device reset
>>> await client.batch_reset_devices_for_user(network_id='12345678', user_id='12345', app_ids=['d3135a42dcb6437780b16c3ca9581fe64e6822773cd6b965d25fc9929c89aca6', 'invalid-app-id'])
Invalid network ID error
>>> await client.batch_reset_devices_for_user(network_id='00000000', user_id='12345', app_ids=['d3135a42dcb6437780b16c3ca9581fe64e6822773cd6b965d25fc9929c89aca6'])