Deletes a private certificate authority (CA) in a member account of the caller's organization. AWS Private Certificate Authority (AWS Private CA) applies the rules of its DeleteCertificateAuthority operation, including which CA states can be deleted and how long a deleted CA can be restored. For details, see DeleteCertificateAuthority in the AWS Private CA API Reference. The caller must be the organization's management account or its delegated administrator, Certificate actions for organizations must be on, and the call must be made in the organization's home Region. For every check and error, see UpdateMemberCertificateAuthority.
Parameters:
-
certificate_authority_arn
(MemberCertificateAuthorityArn)
–
The ARN of the certificate authority to delete.
-
permanent_deletion_time_in_days
(Optional[int], default:
None
)
–
How many days the deleted certificate authority can be restored, 7 to 30. If you omit it, AWS Private Certificate Authority (AWS Private CA) applies its default; see DeleteCertificateAuthority in the AWS Private CA API Reference.
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.
-
InternalServerException
–
The request processing has failed because of an unknown error, exception, or failure.
-
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.
Examples:
Delete a certificate authority in a member account
The certificate authority is DISABLED and can be restored for 7 days.
>>> await client.delete_member_certificate_authority(certificate_authority_arn='arn:aws:acm-pca:us-west-2:444455556666:certificate-authority/12345678-1234-1234-1234-123456789012', permanent_deletion_time_in_days=7)
Delete a certificate authority that is still active
AWS Private CA rejects the request because the certificate authority is ACTIVE.
>>> await client.delete_member_certificate_authority(certificate_authority_arn='arn:aws:acm-pca:us-west-2:444455556666:certificate-authority/12345678-1234-1234-1234-123456789012')
Source code in docs_src/capo_acm/_services/async_acm.py
| async def delete_member_certificate_authority(
self,
certificate_authority_arn: "capo_acm.types.member_certificate_authority_arn.MemberCertificateAuthorityArn",
*,
config_overrides: Optional[AsyncACMClientConfig] = None,
permanent_deletion_time_in_days: Optional[int] = None,
) -> "capo_acm.types.delete_member_certificate_authority_output.DeleteMemberCertificateAuthorityOutput":
"""Deletes a private certificate authority (CA) in a member account of the caller's organization. AWS Private Certificate Authority (AWS Private CA) applies the rules of its DeleteCertificateAuthority operation, including which CA states can be deleted and how long a deleted CA can be restored. For details, see DeleteCertificateAuthority in the AWS Private CA API Reference. The caller must be the organization's management account or its delegated administrator, Certificate actions for organizations must be on, and the call must be made in the organization's home Region. For every check and error, see UpdateMemberCertificateAuthority.
Args:
certificate_authority_arn: The ARN of the certificate authority to delete.
permanent_deletion_time_in_days: How many days the deleted certificate authority can be restored, 7 to 30. If you omit it, AWS Private Certificate Authority (AWS Private CA) applies its default; see DeleteCertificateAuthority in the AWS Private CA API Reference.
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.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure.</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.
Examples:
Delete a certificate authority in a member account
The certificate authority is DISABLED and can be restored for 7 days.
>>> await client.delete_member_certificate_authority(certificate_authority_arn='arn:aws:acm-pca:us-west-2:444455556666:certificate-authority/12345678-1234-1234-1234-123456789012', permanent_deletion_time_in_days=7)
Delete a certificate authority that is still active
AWS Private CA rejects the request because the certificate authority is ACTIVE.
>>> await client.delete_member_certificate_authority(certificate_authority_arn='arn:aws:acm-pca:us-west-2:444455556666:certificate-authority/12345678-1234-1234-1234-123456789012')
"""
async def _handler(
req: "AsyncOperationRequest[capo_acm.types.delete_member_certificate_authority_input.DeleteMemberCertificateAuthorityInput]",
) -> AsyncOperationResponse[
"capo_acm.types.delete_member_certificate_authority_output.DeleteMemberCertificateAuthorityOutput"
]:
import capo_acm._operations.certificate_manager.delete_member_certificate_authority
(
output,
http_response,
) = await capo_acm._operations.certificate_manager.delete_member_certificate_authority.async_delete_member_certificate_authority(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteMemberCertificateAuthority")
)
input_: capo_acm.types.delete_member_certificate_authority_input.DeleteMemberCertificateAuthorityInput = {
"certificate_authority_arn": certificate_authority_arn
}
if permanent_deletion_time_in_days is not None:
input_["permanent_deletion_time_in_days"] = permanent_deletion_time_in_days
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|