def delete_certificate_authority_association(
self,
certificate_authority_arn: "capo_acm_pca.types.arn.Arn",
associated_resource_arn: "capo_acm_pca.types.associated_resource_arn.AssociatedResourceArn",
*,
config_overrides: Optional[ACMPCAClientConfig] = None,
) -> None:
"""<p>Removes the association between an Amazon Web Services resource and a service-affiliated private certificate authority (CA). After the association is removed, the affiliated Amazon Web Services service can no longer use the CA to issue certificates for that resource. This operation is idempotent; removing an association that does not exist succeeds.</p>
Args:
certificate_authority_arn: <p>The Amazon Resource Name (ARN) of the service-affiliated private CA whose association you want to remove.</p>
associated_resource_arn: <p>The Amazon Resource Name (ARN) of the associated Amazon Web Services resource to remove.</p>
Raises:
capo_acm_pca.errors.invalid_arn_exception.InvalidArnException: <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p>
capo_acm_pca.errors.invalid_state_exception.InvalidStateException: <p>The state of the private CA does not allow this action to occur.</p>
capo_acm_pca.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource such as a private CA, S3 bucket, certificate, audit report, or policy cannot be found.</p>
capo_acm_pca.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_acm_pca.types.delete_certificate_authority_association_request.DeleteCertificateAuthorityAssociationRequest]",
) -> OperationResponse[None]:
if req.options.protocol == "awsJson1_1":
import capo_acm_pca._operations.acm_private_ca.aws_json1_1.delete_certificate_authority_association
output, http_response = (
capo_acm_pca._operations.acm_private_ca.aws_json1_1.delete_certificate_authority_association.delete_certificate_authority_association(
req.options, req.input
)
)
elif req.options.protocol == "rpcv2Cbor":
import capo_acm_pca._operations.acm_private_ca.rpcv2_cbor.delete_certificate_authority_association
output, http_response = (
capo_acm_pca._operations.acm_private_ca.rpcv2_cbor.delete_certificate_authority_association.delete_certificate_authority_association(
req.options, req.input
)
)
else:
raise ValueError(f"unknown protocol {req.options.protocol!r}")
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteCertificateAuthorityAssociation")
)
input_: capo_acm_pca.types.delete_certificate_authority_association_request.DeleteCertificateAuthorityAssociationRequest = {
"certificate_authority_arn": certificate_authority_arn,
"associated_resource_arn": associated_resource_arn,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output