Table of Contents
ACM.Client¶A low-level client representing AWS Certificate Manager (ACM):
client = session.create_client('acm')
These are the available methods:
add_tags_to_certificate()can_paginate()delete_certificate()describe_certificate()generate_presigned_url()get_certificate()get_paginator()get_waiter()import_certificate()list_certificates()list_tags_for_certificate()remove_tags_from_certificate()request_certificate()resend_validation_email()Adds one or more tags to an ACM Certificate. Tags are labels that you can use to identify and organize your AWS resources. Each tag consists of a key and an optional value . You specify the certificate on input by its Amazon Resource Name (ARN). You specify the tag by using a key-value pair.
You can apply a tag to just one certificate if you want to identify a specific characteristic of that certificate, or you can apply the same tag to multiple certificates if you want to filter for a common relationship among those certificates. Similarly, you can apply the same tag to multiple resources if you want to specify a relationship among those resources. For example, you can add the same tag to an ACM Certificate and an Elastic Load Balancing load balancer to indicate that they are both used by the same website. For more information, see Tagging ACM Certificates .
To remove one or more tags, use the RemoveTagsFromCertificate action. To view all of the tags that have been applied to the certificate, use the ListTagsForCertificate action.
See also: AWS API Documentation
Request Syntax
response = client.add_tags_to_certificate(
CertificateArn='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
| Parameters: |
|
|---|---|
| Returns: | None |
can_paginate(operation_name)¶Check if an operation can be paginated.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Returns: | True if the operation can be paginated,
False otherwise. |
delete_certificate(**kwargs)¶Deletes an ACM Certificate and its associated private key. If this action succeeds, the certificate no longer appears in the list of ACM Certificates that can be displayed by calling the ListCertificates action or be retrieved by calling the GetCertificate action. The certificate will not be available for use by other AWS services.
Note
You cannot delete an ACM Certificate that is being used by another AWS service. To delete a certificate that is in use, the certificate association must first be removed.
See also: AWS API Documentation
Request Syntax
response = client.delete_certificate(
CertificateArn='string'
)
| Parameters: | CertificateArn (string) – [REQUIRED] String that contains the ARN of the ACM Certificate to be deleted. This must be of the form:
For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces . |
|---|---|
| Returns: | None |
describe_certificate(**kwargs)¶Returns detailed metadata about the specified ACM Certificate.
See also: AWS API Documentation
Request Syntax
response = client.describe_certificate(
CertificateArn='string'
)
| Parameters: | CertificateArn (string) – [REQUIRED] The Amazon Resource Name (ARN) of the ACM Certificate. The ARN must have the following form:
For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces . |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Certificate': {
'CertificateArn': 'string',
'DomainName': 'string',
'SubjectAlternativeNames': [
'string',
],
'DomainValidationOptions': [
{
'DomainName': 'string',
'ValidationEmails': [
'string',
],
'ValidationDomain': 'string',
'ValidationStatus': 'PENDING_VALIDATION'|'SUCCESS'|'FAILED'
},
],
'Serial': 'string',
'Subject': 'string',
'Issuer': 'string',
'CreatedAt': datetime(2015, 1, 1),
'IssuedAt': datetime(2015, 1, 1),
'ImportedAt': datetime(2015, 1, 1),
'Status': 'PENDING_VALIDATION'|'ISSUED'|'INACTIVE'|'EXPIRED'|'VALIDATION_TIMED_OUT'|'REVOKED'|'FAILED',
'RevokedAt': datetime(2015, 1, 1),
'RevocationReason': 'UNSPECIFIED'|'KEY_COMPROMISE'|'CA_COMPROMISE'|'AFFILIATION_CHANGED'|'SUPERCEDED'|'CESSATION_OF_OPERATION'|'CERTIFICATE_HOLD'|'REMOVE_FROM_CRL'|'PRIVILEGE_WITHDRAWN'|'A_A_COMPROMISE',
'NotBefore': datetime(2015, 1, 1),
'NotAfter': datetime(2015, 1, 1),
'KeyAlgorithm': 'RSA_2048'|'RSA_1024'|'EC_prime256v1',
'SignatureAlgorithm': 'string',
'InUseBy': [
'string',
],
'FailureReason': 'NO_AVAILABLE_CONTACTS'|'ADDITIONAL_VERIFICATION_REQUIRED'|'DOMAIN_NOT_ALLOWED'|'INVALID_PUBLIC_DOMAIN'|'OTHER',
'Type': 'IMPORTED'|'AMAZON_ISSUED',
'RenewalSummary': {
'RenewalStatus': 'PENDING_AUTO_RENEWAL'|'PENDING_VALIDATION'|'SUCCESS'|'FAILED',
'DomainValidationOptions': [
{
'DomainName': 'string',
'ValidationEmails': [
'string',
],
'ValidationDomain': 'string',
'ValidationStatus': 'PENDING_VALIDATION'|'SUCCESS'|'FAILED'
},
]
}
}
}
Response Structure
|
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_certificate(**kwargs)¶Retrieves an ACM Certificate and certificate chain for the certificate specified by an ARN. The chain is an ordered list of certificates that contains the root certificate, intermediate certificates of subordinate CAs, and the ACM Certificate. The certificate and certificate chain are base64 encoded. If you want to decode the certificate chain to see the individual certificate fields, you can use OpenSSL.
Note
Currently, ACM Certificates can be used only with Elastic Load Balancing and Amazon CloudFront.
See also: AWS API Documentation
Request Syntax
response = client.get_certificate(
CertificateArn='string'
)
| Parameters: | CertificateArn (string) – [REQUIRED] String that contains a certificate ARN in the following format:
For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces . |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Certificate': 'string',
'CertificateChain': 'string'
}
Response Structure
|
get_paginator(operation_name)¶Create a paginator for an operation.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Raises: | OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
| Return type: | L{botocore.paginate.Paginator} |
| Returns: | A paginator object. |
get_waiter(waiter_name)¶import_certificate(**kwargs)¶Imports an SSL/TLS certificate into AWS Certificate Manager (ACM) to use with ACM’s integrated AWS services .
Note
ACM does not provide managed renewal for certificates that you import.
For more information about importing certificates into ACM, including the differences between certificates that you import and those that ACM provides, see Importing Certificates in the AWS Certificate Manager User Guide .
To import a certificate, you must provide the certificate and the matching private key. When the certificate is not self-signed, you must also provide a certificate chain. You can omit the certificate chain when importing a self-signed certificate.
The certificate, private key, and certificate chain must be PEM-encoded. For more information about converting these items to PEM format, see Importing Certificates Troubleshooting in the AWS Certificate Manager User Guide .
To import a new certificate, omit the CertificateArn field. Include this field only when you want to replace a previously imported certificate.
This operation returns the Amazon Resource Name (ARN) of the imported certificate.
See also: AWS API Documentation
Request Syntax
response = client.import_certificate(
CertificateArn='string',
Certificate=b'bytes',
PrivateKey=b'bytes',
CertificateChain=b'bytes'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'CertificateArn': 'string'
}
Response Structure
|
list_certificates(**kwargs)¶Retrieves a list of ACM Certificates and the domain name for each. You can optionally filter the list to return only the certificates that match the specified status.
See also: AWS API Documentation
Request Syntax
response = client.list_certificates(
CertificateStatuses=[
'PENDING_VALIDATION'|'ISSUED'|'INACTIVE'|'EXPIRED'|'VALIDATION_TIMED_OUT'|'REVOKED'|'FAILED',
],
NextToken='string',
MaxItems=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'NextToken': 'string',
'CertificateSummaryList': [
{
'CertificateArn': 'string',
'DomainName': 'string'
},
]
}
Response Structure
|
Lists the tags that have been applied to the ACM Certificate. Use the certificate’s Amazon Resource Name (ARN) to specify the certificate. To add a tag to an ACM Certificate, use the AddTagsToCertificate action. To delete a tag, use the RemoveTagsFromCertificate action.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_certificate(
CertificateArn='string'
)
| Parameters: | CertificateArn (string) – [REQUIRED] String that contains the ARN of the ACM Certificate for which you want to list the tags. This has the following form:
For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces . |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
Response Structure
|
Remove one or more tags from an ACM Certificate. A tag consists of a key-value pair. If you do not specify the value portion of the tag when calling this function, the tag will be removed regardless of value. If you specify a value, the tag is removed only if it is associated with the specified value.
To add tags to a certificate, use the AddTagsToCertificate action. To view all of the tags that have been applied to a specific ACM Certificate, use the ListTagsForCertificate action.
See also: AWS API Documentation
Request Syntax
response = client.remove_tags_from_certificate(
CertificateArn='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
| Parameters: |
|
|---|---|
| Returns: | None |
request_certificate(**kwargs)¶Requests an ACM Certificate for use with other AWS services. To request an ACM Certificate, you must specify the fully qualified domain name (FQDN) for your site. You can also specify additional FQDNs if users can reach your site by using other names. For each domain name you specify, email is sent to the domain owner to request approval to issue the certificate. After receiving approval from the domain owner, the ACM Certificate is issued. For more information, see the AWS Certificate Manager User Guide .
See also: AWS API Documentation
Request Syntax
response = client.request_certificate(
DomainName='string',
SubjectAlternativeNames=[
'string',
],
IdempotencyToken='string',
DomainValidationOptions=[
{
'DomainName': 'string',
'ValidationDomain': 'string'
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'CertificateArn': 'string'
}
Response Structure
|
resend_validation_email(**kwargs)¶Resends the email that requests domain ownership validation. The domain owner or an authorized representative must approve the ACM Certificate before it can be issued. The certificate can be approved by clicking a link in the mail to navigate to the Amazon certificate approval website and then clicking I Approve . However, the validation email can be blocked by spam filters. Therefore, if you do not receive the original mail, you can request that the mail be resent within 72 hours of requesting the ACM Certificate. If more than 72 hours have elapsed since your original request or since your last attempt to resend validation mail, you must request a new certificate. For more information about setting up your contact email addresses, see Configure Email for your Domain .
See also: AWS API Documentation
Request Syntax
response = client.resend_validation_email(
CertificateArn='string',
Domain='string',
ValidationDomain='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
The available paginators are:
ACM.Paginator.ListCertificates¶paginator = client.get_paginator('list_certificates')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from ACM.Client.list_certificates().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
CertificateStatuses=[
'PENDING_VALIDATION'|'ISSUED'|'INACTIVE'|'EXPIRED'|'VALIDATION_TIMED_OUT'|'REVOKED'|'FAILED',
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'CertificateSummaryList': [
{
'CertificateArn': 'string',
'DomainName': 'string'
},
]
}
Response Structure
|