Deletes a workload identity template, addressed by its own ARN. A template that does not exist returns NoSuchEntityException rather than success, so a mis-addressed ARN cannot read as a completed delete.
Parameters:
-
workload_identity_template_arn
(arnType)
–
The Amazon Resource Name (ARN) of the template to delete.
Raises:
-
ConcurrentModificationException
–
The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.
-
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/iam.py
| def delete_workload_identity_template(
self,
workload_identity_template_arn: "capo_iam.types.arn_type.arnType",
*,
config_overrides: Optional[IAMClientConfig] = None,
) -> "capo_iam.types.delete_workload_identity_template_response.DeleteWorkloadIdentityTemplateResponse":
"""<p>Deletes a workload identity template, addressed by its own ARN. A template that does not exist returns <code>NoSuchEntityException</code> rather than success, so a mis-addressed ARN cannot read as a completed delete.</p>
Args:
workload_identity_template_arn: <p>The Amazon Resource Name (ARN) of the template to delete.</p>
Raises:
capo_iam.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.</p>
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.
"""
def _handler(
req: "OperationRequest[capo_iam.types.delete_workload_identity_template_request.DeleteWorkloadIdentityTemplateRequest]",
) -> OperationResponse[
"capo_iam.types.delete_workload_identity_template_response.DeleteWorkloadIdentityTemplateResponse"
]:
import capo_iam._operations.aws_identity_management_v20100508.delete_workload_identity_template
output, http_response = (
capo_iam._operations.aws_identity_management_v20100508.delete_workload_identity_template.delete_workload_identity_template(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteWorkloadIdentityTemplate")
)
input_: capo_iam.types.delete_workload_identity_template_request.DeleteWorkloadIdentityTemplateRequest = {
"workload_identity_template_arn": workload_identity_template_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|