Deletes a user profile. When a user profile is deleted, the user loses access to their EFS volume, including data, notebooks, and other artifacts.
Parameters:
Raises:
Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
| async def delete_user_profile(
self,
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = None,
domain_id: Optional["capo_sagemaker.types.domain_id.DomainId"] = None,
user_profile_name: Optional[
"capo_sagemaker.types.user_profile_name.UserProfileName"
] = None,
) -> None:
"""<p>Deletes a user profile. When a user profile is deleted, the user loses access to their EFS volume, including data, notebooks, and other artifacts.</p>
Args:
domain_id: <p>The domain ID.</p>
user_profile_name: <p>The user profile name.</p>
Raises:
capo_sagemaker.errors.resource_in_use.ResourceInUse: <p>Resource being accessed is in use.</p>
capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_sagemaker.types.delete_user_profile_request.DeleteUserProfileRequest]",
) -> AsyncOperationResponse[None]:
import capo_sagemaker._operations.sage_maker.delete_user_profile
(
output,
http_response,
) = await capo_sagemaker._operations.sage_maker.delete_user_profile.async_delete_user_profile(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteUserProfile")
)
input_: capo_sagemaker.types.delete_user_profile_request.DeleteUserProfileRequest = {}
if domain_id is not None:
input_["domain_id"] = domain_id
if user_profile_name is not None:
input_["user_profile_name"] = user_profile_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|