Revokes a public ACM certificate. You can only revoke certificates that have been previously exported.
Once a certificate is revoked, you cannot reuse the certificate. Revoking a certificate is permanent.
Parameters:
-
certificate_arn
(Arn)
–
The Amazon Resource Name (ARN) of the public or private certificate that will be revoked. The ARN must have the following form:
arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012
-
revocation_reason
(RevocationReason)
–
Specifies why you revoked the certificate.
Raises:
-
AccessDeniedException
–
You do not have access required to perform this action.
-
ConflictException
–
You are trying to update a resource or configuration that is already being created or updated. Wait for the previous operation to finish and try again.
-
InvalidArnException
–
The requested Amazon Resource Name (ARN) does not refer to an existing resource.
-
ResourceInUseException
–
The certificate is in use by another Amazon Web Services service in the caller's account. Remove the association and try again.
-
ResourceNotFoundException
–
The specified certificate cannot be found in the caller's account or the caller's account cannot be found.
-
ThrottlingException
–
The request was denied because it exceeded a quota.
-
ValidationException
–
The supplied input failed to satisfy constraints of an Amazon Web Services service.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_acm/_services/acm.py
| def revoke_certificate(
self,
certificate_arn: "capo_acm.types.arn.Arn",
revocation_reason: "capo_acm.types.revocation_reason.RevocationReason",
*,
config_overrides: Optional[ACMClientConfig] = None,
) -> "capo_acm.types.revoke_certificate_response.RevokeCertificateResponse":
"""<p>Revokes a public ACM certificate. You can only revoke certificates that have been previously exported.</p> <important> <p>Once a certificate is revoked, you cannot reuse the certificate. Revoking a certificate is permanent.</p> </important>
Args:
certificate_arn: <p>The Amazon Resource Name (ARN) of the public or private certificate that will be revoked. The ARN must have the following form: </p> <p> <code>arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012</code> </p>
revocation_reason: <p>Specifies why you revoked the certificate.</p>
Raises:
capo_acm.errors.access_denied_exception.AccessDeniedException: <p>You do not have access required to perform this action.</p>
capo_acm.errors.conflict_exception.ConflictException: <p>You are trying to update a resource or configuration that is already being created or updated. Wait for the previous operation to finish and try again.</p>
capo_acm.errors.invalid_arn_exception.InvalidArnException: <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p>
capo_acm.errors.resource_in_use_exception.ResourceInUseException: <p>The certificate is in use by another Amazon Web Services service in the caller's account. Remove the association and try again.</p>
capo_acm.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified certificate cannot be found in the caller's account or the caller's account cannot be found.</p>
capo_acm.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded a quota.</p>
capo_acm.errors.validation_exception.ValidationException: <p>The supplied input failed to satisfy constraints of an Amazon Web Services service.</p>
capo_acm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_acm.types.revoke_certificate_request.RevokeCertificateRequest]",
) -> OperationResponse[
"capo_acm.types.revoke_certificate_response.RevokeCertificateResponse"
]:
import capo_acm._operations.certificate_manager.revoke_certificate
output, http_response = (
capo_acm._operations.certificate_manager.revoke_certificate.revoke_certificate(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RevokeCertificate")
)
input_: capo_acm.types.revoke_certificate_request.RevokeCertificateRequest = {
"certificate_arn": certificate_arn,
"revocation_reason": revocation_reason,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|