Skip to content

delete_member_certificate

delete_member_certificate(
    certificate_arn: MemberCertificateArn,
    *,
    config_overrides: Optional[ACMClientConfig] = None,
) -> DeleteMemberCertificateOutput

Deletes an AWS Certificate Manager (ACM) certificate in a member account of the caller's organization. ACM applies the rules of its DeleteCertificate operation, including when it cannot delete a certificate. For details, see DeleteCertificate in the AWS Certificate Manager 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 RenewMemberCertificate.

Parameters:

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 in a member account No AWS resource in account 444455556666 uses the certificate any longer.

>>> client.delete_member_certificate(certificate_arn='arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222')
Delete a certificate that is still in use
A load balancer in the member account still uses the certificate.
>>> client.delete_member_certificate(certificate_arn='arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222')
Source code in docs_src/capo_acm/_services/acm.py
def delete_member_certificate(
    self,
    certificate_arn: "capo_acm.types.member_certificate_arn.MemberCertificateArn",
    *,
    config_overrides: Optional[ACMClientConfig] = None,
) -> (
    "capo_acm.types.delete_member_certificate_output.DeleteMemberCertificateOutput"
):
    """Deletes an AWS Certificate Manager (ACM) certificate in a member account of the caller's organization. ACM applies the rules of its DeleteCertificate operation, including when it cannot delete a certificate. For details, see DeleteCertificate in the AWS Certificate Manager 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 RenewMemberCertificate.

    Args:
        certificate_arn: The ARN of the certificate to delete.

    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 in a member account
        No AWS resource in account 444455556666 uses the certificate any longer.

        >>> client.delete_member_certificate(certificate_arn='arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222')
        Delete a certificate that is still in use
        A load balancer in the member account still uses the certificate.

        >>> client.delete_member_certificate(certificate_arn='arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222')
    """

    def _handler(
        req: "OperationRequest[capo_acm.types.delete_member_certificate_input.DeleteMemberCertificateInput]",
    ) -> OperationResponse[
        "capo_acm.types.delete_member_certificate_output.DeleteMemberCertificateOutput"
    ]:
        import capo_acm._operations.certificate_manager.delete_member_certificate

        output, http_response = (
            capo_acm._operations.certificate_manager.delete_member_certificate.delete_member_certificate(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteMemberCertificate")
    )
    input_: capo_acm.types.delete_member_certificate_input.DeleteMemberCertificateInput = {
        "certificate_arn": certificate_arn
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output