Retrieves the status of your service-linked role deletion. After you use DeleteServiceLinkedRole to submit a service-linked role for deletion, you can use the DeletionTaskId parameter in GetServiceLinkedRoleDeletionStatus to check the status of the deletion. If the deletion fails, this operation returns the reason that it failed, if that information is returned by the service.
Parameters:
Raises:
-
InvalidInputException
–
The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
-
NoSuchEntityException
–
The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.
-
ServiceFailureException
–
The request processing has failed because of an unknown error, exception or failure.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_iam/_services/async_iam.py
| async def get_service_linked_role_deletion_status(
self,
deletion_task_id: "capo_iam.types.deletion_task_id_type.DeletionTaskIdType",
*,
config_overrides: Optional[AsyncIAMClientConfig] = None,
) -> "capo_iam.types.get_service_linked_role_deletion_status_response.GetServiceLinkedRoleDeletionStatusResponse":
"""<p>Retrieves the status of your service-linked role deletion. After you use <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteServiceLinkedRole.html">DeleteServiceLinkedRole</a> to submit a service-linked role for deletion, you can use the <code>DeletionTaskId</code> parameter in <code>GetServiceLinkedRoleDeletionStatus</code> to check the status of the deletion. If the deletion fails, this operation returns the reason that it failed, if that information is returned by the service.</p>
Args:
deletion_task_id: <p>The deletion task identifier. This identifier is returned by the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteServiceLinkedRole.html">DeleteServiceLinkedRole</a> operation in the format <code>task/aws-service-role/<service-principal-name>/<role-name>/<task-uuid></code>.</p>
Raises:
capo_iam.errors.invalid_input_exception.InvalidInputException: <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
capo_iam.errors.no_such_entity_exception.NoSuchEntityException: <p>The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.</p>
capo_iam.errors.service_failure_exception.ServiceFailureException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iam.types.get_service_linked_role_deletion_status_request.GetServiceLinkedRoleDeletionStatusRequest]",
) -> AsyncOperationResponse[
"capo_iam.types.get_service_linked_role_deletion_status_response.GetServiceLinkedRoleDeletionStatusResponse"
]:
import capo_iam._operations.aws_identity_management_v20100508.get_service_linked_role_deletion_status
(
output,
http_response,
) = await capo_iam._operations.aws_identity_management_v20100508.get_service_linked_role_deletion_status.async_get_service_linked_role_deletion_status(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetServiceLinkedRoleDeletionStatus")
)
input_: capo_iam.types.get_service_linked_role_deletion_status_request.GetServiceLinkedRoleDeletionStatusRequest = {
"deletion_task_id": deletion_task_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|