Removes the resource policy from a workload identity provider and leaves the provider in place.
Removing the policy while member accounts hold records bound to this provider leaves those members unable to delete their own records, because DeleteWorkloadIdentityTemplate requires iam:DisassociateWorkloadIdentityTemplate permission on the provider.
Parameters:
-
workload_identity_provider_arn
(arnType)
–
The Amazon Resource Name (ARN) of the provider whose resource policy you want to remove.
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/async_iam.py
| async def delete_workload_identity_provider_resource_policy(
self,
workload_identity_provider_arn: "capo_iam.types.arn_type.arnType",
*,
config_overrides: Optional[AsyncIAMClientConfig] = None,
) -> "capo_iam.types.delete_workload_identity_provider_resource_policy_response.DeleteWorkloadIdentityProviderResourcePolicyResponse":
"""<p>Removes the resource policy from a workload identity provider and leaves the provider in place.</p> <important> <p>Removing the policy while member accounts hold records bound to this provider leaves those members unable to delete their own records, because <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteWorkloadIdentityTemplate.html">DeleteWorkloadIdentityTemplate</a> requires <code>iam:DisassociateWorkloadIdentityTemplate</code> permission on the provider.</p> </important>
Args:
workload_identity_provider_arn: <p>The Amazon Resource Name (ARN) of the provider whose resource policy you want to remove.</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iam.types.delete_workload_identity_provider_resource_policy_request.DeleteWorkloadIdentityProviderResourcePolicyRequest]",
) -> AsyncOperationResponse[
"capo_iam.types.delete_workload_identity_provider_resource_policy_response.DeleteWorkloadIdentityProviderResourcePolicyResponse"
]:
import capo_iam._operations.aws_identity_management_v20100508.delete_workload_identity_provider_resource_policy
(
output,
http_response,
) = await capo_iam._operations.aws_identity_management_v20100508.delete_workload_identity_provider_resource_policy.async_delete_workload_identity_provider_resource_policy(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("DeleteWorkloadIdentityProviderResourcePolicy"),
)
input_: capo_iam.types.delete_workload_identity_provider_resource_policy_request.DeleteWorkloadIdentityProviderResourcePolicyRequest = {
"workload_identity_provider_arn": workload_identity_provider_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|