Deletes a workload identity provider.
The provider must be empty first. A workload identity template that still references it causes DeleteConflictException. Delete every X.509 outbound signer on the provider before you delete the provider itself. A provider that does not exist returns NoSuchEntityException rather than success, so a mis-addressed ARN cannot read as a completed delete.
The response carries a DeletionTaskId, a unique token that expires 24 hours after the call. Pass it to GetWorkloadIdentityProviderDeletionStatus to read the status of the deletion.
Parameters:
-
workload_identity_provider_arn
(arnType)
–
The Amazon Resource Name (ARN) of the provider 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.
-
DeleteConflictException
–
The request was rejected because it attempted to delete a resource that has attached subordinate entities. The error message describes these entities.
-
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_provider(
self,
workload_identity_provider_arn: "capo_iam.types.arn_type.arnType",
*,
config_overrides: Optional[IAMClientConfig] = None,
) -> "capo_iam.types.delete_workload_identity_provider_response.DeleteWorkloadIdentityProviderResponse":
"""<p>Deletes a workload identity provider.</p> <p>The provider must be empty first. A workload identity template that still references it causes <code>DeleteConflictException</code>. Delete every X.509 outbound signer on the provider before you delete the provider itself. A provider that does not exist returns <code>NoSuchEntityException</code> rather than success, so a mis-addressed ARN cannot read as a completed delete.</p> <p>The response carries a <code>DeletionTaskId</code>, a unique token that expires 24 hours after the call. Pass it to <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetWorkloadIdentityProviderDeletionStatus.html">GetWorkloadIdentityProviderDeletionStatus</a> to read the status of the deletion.</p>
Args:
workload_identity_provider_arn: <p>The Amazon Resource Name (ARN) of the provider 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.delete_conflict_exception.DeleteConflictException: <p>The request was rejected because it attempted to delete a resource that has attached subordinate entities. The error message describes these entities.</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_provider_request.DeleteWorkloadIdentityProviderRequest]",
) -> OperationResponse[
"capo_iam.types.delete_workload_identity_provider_response.DeleteWorkloadIdentityProviderResponse"
]:
import capo_iam._operations.aws_identity_management_v20100508.delete_workload_identity_provider
output, http_response = (
capo_iam._operations.aws_identity_management_v20100508.delete_workload_identity_provider.delete_workload_identity_provider(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteWorkloadIdentityProvider")
)
input_: capo_iam.types.delete_workload_identity_provider_request.DeleteWorkloadIdentityProviderRequest = {
"workload_identity_provider_arn": workload_identity_provider_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|