Deletes a user account from the specified Connect Customer instance.
For information about what happens to a user's data when their account is deleted, see Delete Users from Your Connect Customer Instance in the Connect Customer Administrator Guide.
After calling DeleteUser, call DeleteQuickConnect to delete any records related to the deleted users. This will help you:
-
Avoid dangling resources that impact your service quotas.
-
Remove deleted users so they don't appear to agents as transfer options.
-
Avoid the disruption of other Connect Customer processes, such as instance replication and syncing if you're using Connect Customer Global Resiliency.
Parameters:
-
instance_id
(InstanceId)
–
The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
-
user_id
(UserId)
–
The identifier of the user.
Raises:
Source code in docs_src/capo_connect/_services/async_connect.py
| async def delete_user(
self,
instance_id: "capo_connect.types.instance_id.InstanceId",
user_id: "capo_connect.types.user_id.UserId",
*,
config_overrides: Optional[AsyncConnectClientConfig] = None,
) -> None:
"""<p>Deletes a user account from the specified Connect Customer instance.</p> <p>For information about what happens to a user's data when their account is deleted, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/delete-users.html">Delete Users from Your Connect Customer Instance</a> in the <i>Connect Customer Administrator Guide</i>.</p> <important> <p>After calling DeleteUser, call <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteQuickConnect.html">DeleteQuickConnect</a> to delete any records related to the deleted users. This will help you:</p> <ul> <li> <p>Avoid dangling resources that impact your service quotas.</p> </li> <li> <p>Remove deleted users so they don't appear to agents as transfer options.</p> </li> <li> <p>Avoid the disruption of other Connect Customer processes, such as instance replication and syncing if you're using <a href="https://docs.aws.amazon.com/connect/latest/adminguide/setup-connect-global-resiliency.html">Connect Customer Global Resiliency</a>. </p> </li> </ul> </important>
Args:
instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
user_id: <p>The identifier of the user.</p>
Raises:
capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
capo_connect.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_connect.types.delete_user_request.DeleteUserRequest]",
) -> AsyncOperationResponse[None]:
import capo_connect._operations.amazon_connect_service.delete_user
(
output,
http_response,
) = await capo_connect._operations.amazon_connect_service.delete_user.async_delete_user(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteUser")
)
input_: capo_connect.types.delete_user_request.DeleteUserRequest = {
"instance_id": instance_id,
"user_id": user_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|