delete_user(
server_id: ServerId,
user_name: UserName,
*,
config_overrides: Optional[AsyncTransferClientConfig] = None,
) -> None
Deletes the user belonging to a file transfer protocol-enabled server you specify.
No response returns from this operation.
When you delete a user from a server, the user's information is lost.
Parameters:
-
server_id
(ServerId)
–
A system-assigned unique identifier for a server instance that has the user assigned to it.
-
user_name
(UserName)
–
A unique string that identifies a user that is being deleted from a server.
Raises:
Source code in docs_src/capo_transfer/_services/async_transfer.py
| async def delete_user(
self,
server_id: "capo_transfer.types.server_id.ServerId",
user_name: "capo_transfer.types.user_name.UserName",
*,
config_overrides: Optional[AsyncTransferClientConfig] = None,
) -> None:
"""<p>Deletes the user belonging to a file transfer protocol-enabled server you specify.</p> <p>No response returns from this operation.</p> <note> <p>When you delete a user from a server, the user's information is lost.</p> </note>
Args:
server_id: <p>A system-assigned unique identifier for a server instance that has the user assigned to it.</p>
user_name: <p>A unique string that identifies a user that is being deleted from a server.</p>
Raises:
capo_transfer.errors.internal_service_error.InternalServiceError: <p>This exception is thrown when an error occurs in the Transfer Family service.</p>
capo_transfer.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
capo_transfer.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.</p>
capo_transfer.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request has failed because the Amazon Web ServicesTransfer Family service is not available.</p>
capo_transfer.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_transfer.types.delete_user_request.DeleteUserRequest]",
) -> AsyncOperationResponse[None]:
import capo_transfer._operations.transfer_service.delete_user
(
output,
http_response,
) = await capo_transfer._operations.transfer_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_transfer.types.delete_user_request.DeleteUserRequest = {
"server_id": server_id,
"user_name": user_name,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|