certificates
Creates, updates, deletes, gets or lists a certificates resource.
Overview
| Name | certificates |
| Type | Resource |
| Id | aws.acm.certificates |
Fields
The following fields are returned by SELECT queries:
- describe_certificate
- list_certificates
| Name | Datatype | Description |
|---|---|---|
acme_account_id | string | The ACME account identifier associated with the certificate. |
acme_endpoint_arn | string | The ARN of the ACME endpoint used to issue the certificate. (pattern: <code>arn:[\w+=/,.@-]+:acm:[\w+=/,.@-]:[0-9]+:[\w+=,.@-]+(/[\w+=,.@-]+)</code>) |
certificate_arn | string | The Amazon Resource Name (ARN) of the certificate. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference. (pattern: <code>arn:[\w+=/,.@-]+:acm:[\w+=/,.@-]:[0-9]+:[\w+=,.@-]+(/[\w+=,.@-]+)</code>) |
certificate_authority_arn | string | The Amazon Resource Name (ARN) of the private certificate authority (CA) that issued the certificate. This has the following format: arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 (pattern: <code>arn:[\w+=/,.@-]+:acm:[\w+=/,.@-]:[0-9]+:[\w+=,.@-]+(/[\w+=,.@-]+)</code>) |
certificate_key_pair_origin | string | The origin of the certificate's key pair. (AWS_MANAGED, ACME, CUSTOMER_PROVIDED) |
created_at | string (date-time) | The time at which the certificate was requested. |
domain_name | string | The fully qualified domain name for the certificate, such as www.example.com or example.com. (pattern: <code>(*.)?(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9]).)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])</code>) |
domain_validation_options | array | Contains information about the initial validation of each domain name that occurs as a result of the RequestCertificate request. This field exists only when the certificate type is AMAZON_ISSUED. |
extended_key_usages | array | Contains a list of Extended Key Usage X.509 v3 extension objects. Each object specifies a purpose for which the certificate public key can be used and consists of a name and an object identifier (OID). |
failure_reason | string | The reason the certificate request failed. This value exists only when the certificate status is FAILED. For more information, see Certificate Request Failed in the Certificate Manager User Guide. (NO_AVAILABLE_CONTACTS, ADDITIONAL_VERIFICATION_REQUIRED, DOMAIN_NOT_ALLOWED, INVALID_PUBLIC_DOMAIN, DOMAIN_VALIDATION_DENIED, CAA_ERROR, PCA_LIMIT_EXCEEDED, PCA_INVALID_ARN, PCA_INVALID_STATE, PCA_REQUEST_FAILED, PCA_NAME_CONSTRAINTS_VALIDATION, PCA_RESOURCE_NOT_FOUND, PCA_INVALID_ARGS, PCA_INVALID_DURATION, PCA_ACCESS_DENIED, SLR_NOT_FOUND, OTHER) |
imported_at | string (date-time) | The date and time when the certificate was imported. This value exists only when the certificate type is IMPORTED. |
in_use_by | array | A list of ARNs for the Amazon Web Services resources that are using the certificate. A certificate can be used by multiple Amazon Web Services resources. |
issued_at | string (date-time) | The time at which the certificate was issued. This value exists only when the certificate type is AMAZON_ISSUED. |
issuer | string | The name of the certificate authority that issued and signed the certificate. |
key_algorithm | string | The algorithm that was used to generate the public-private key pair. (RSA_1024, RSA_2048, RSA_3072, RSA_4096, EC_prime256v1, EC_secp384r1, EC_secp521r1) |
key_usages | array | A list of Key Usage X.509 v3 extension objects. Each object is a string value that identifies the purpose of the public key contained in the certificate. Possible extension values include DIGITAL_SIGNATURE, KEY_ENCHIPHERMENT, NON_REPUDIATION, and more. |
managed_by | string | Identifies the Amazon Web Services service that manages the certificate issued by ACM. (CLOUDFRONT) |
not_after | string (date-time) | The time after which the certificate is not valid. |
not_before | string (date-time) | The time before which the certificate is not valid. |
options | object | Contains the certificate options. Certificate transparency logging opt-out is no longer available. All public certificates are recorded in a certificate transparency log. |
renewal_eligibility | string | Specifies whether the certificate is eligible for renewal. At this time, only exported private certificates can be renewed with the RenewCertificate command. (ELIGIBLE, INELIGIBLE) |
renewal_summary | object | Contains information about the status of ACM's managed renewal for the certificate. This field exists only when the certificate type is AMAZON_ISSUED. |
revocation_reason | string | The reason the certificate was revoked. This value exists only when the certificate status is REVOKED. (UNSPECIFIED, KEY_COMPROMISE, CA_COMPROMISE, AFFILIATION_CHANGED, SUPERCEDED, SUPERSEDED, CESSATION_OF_OPERATION, CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGE_WITHDRAWN, A_A_COMPROMISE) |
revoked_at | string (date-time) | The time at which the certificate was revoked. This value exists only when the certificate status is REVOKED. |
serial | string | The serial number of the certificate. |
signature_algorithm | string | The algorithm that was used to sign the certificate. |
status | string | The status of the certificate. A certificate enters status PENDING_VALIDATION upon being requested, unless it fails for any of the reasons given in the troubleshooting topic Certificate request fails. ACM makes repeated attempts to validate a certificate for 72 hours and then times out. If a certificate shows status FAILED or VALIDATION_TIMED_OUT, delete the request, correct the issue with DNS validation or Email validation, and try again. If validation succeeds, the certificate enters status ISSUED. (PENDING_VALIDATION, ISSUED, INACTIVE, EXPIRED, VALIDATION_TIMED_OUT, REVOKED, FAILED) |
subject | string | The name of the entity that is associated with the public key contained in the certificate. |
subject_alternative_names | array | One or more domain names (subject alternative names) included in the certificate. This list contains the domain names that are bound to the public key that is contained in the certificate. The subject alternative names include the canonical domain name (CN) of the certificate and additional domain names that can be used to connect to the website. |
type | string | The source of the certificate. For certificates provided by ACM, this value is AMAZON_ISSUED. For certificates that you imported with ImportCertificate, this value is IMPORTED. ACM does not provide managed renewal for imported certificates. For more information about the differences between certificates that you import and those that ACM provides, see Importing Certificates in the Certificate Manager User Guide. (IMPORTED, AMAZON_ISSUED, PRIVATE) |
update_summary | object | Contains information about the most recent update to the certificate. This field exists only when the certificate type is AMAZON_ISSUED and a certificate update has been requested. |
| Name | Datatype | Description |
|---|---|---|
certificate_arn | string | Amazon Resource Name (ARN) of the certificate. This is of the form: arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 For more information about ARNs, see Amazon Resource Names (ARNs). (pattern: <code>arn:[\w+=/,.@-]+:acm:[\w+=/,.@-]:[0-9]+:[\w+=,.@-]+(/[\w+=,.@-]+)</code>) |
certificate_key_pair_origin | string | The origin of the certificate's key pair. (AWS_MANAGED, ACME, CUSTOMER_PROVIDED) |
created_at | string (date-time) | The time at which the certificate was requested. |
domain_name | string | Fully qualified domain name (FQDN), such as www.example.com or example.com, for the certificate. (pattern: <code>(*.)?(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9]).)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])</code>) |
export_option | string | Indicates if export is enabled for the certificate. (ENABLED, DISABLED) |
exported | boolean | Indicates whether the certificate has been exported. |
extended_key_usages | array | Contains a list of Extended Key Usage X.509 v3 extension objects. Each object specifies a purpose for which the certificate public key can be used and consists of a name and an object identifier (OID). |
has_additional_subject_alternative_names | boolean | When called by ListCertificates, indicates whether the full list of subject alternative names has been included in the response. If false, the response includes all of the subject alternative names included in the certificate. If true, the response only includes the first 100 subject alternative names included in the certificate. To display the full list of subject alternative names, use DescribeCertificate. |
imported_at | string (date-time) | The date and time when the certificate was imported. This value exists only when the certificate type is IMPORTED. |
in_use | boolean | Indicates whether the certificate is currently in use by any Amazon Web Services resources. |
issued_at | string (date-time) | The time at which the certificate was issued. This value exists only when the certificate type is AMAZON_ISSUED. |
key_algorithm | string | The algorithm that was used to generate the public-private key pair. (RSA_1024, RSA_2048, RSA_3072, RSA_4096, EC_prime256v1, EC_secp384r1, EC_secp521r1) |
key_usages | array | A list of Key Usage X.509 v3 extension objects. Each object is a string value that identifies the purpose of the public key contained in the certificate. Possible extension values include DIGITAL_SIGNATURE, KEY_ENCHIPHERMENT, NON_REPUDIATION, and more. |
managed_by | string | Identifies the Amazon Web Services service that manages the certificate issued by ACM. (CLOUDFRONT) |
not_after | string (date-time) | The time after which the certificate is not valid. |
not_before | string (date-time) | The time before which the certificate is not valid. |
renewal_eligibility | string | Specifies whether the certificate is eligible for renewal. At this time, only exported private certificates can be renewed with the RenewCertificate command. (ELIGIBLE, INELIGIBLE) |
revoked_at | string (date-time) | The time at which the certificate was revoked. This value exists only when the certificate status is REVOKED. |
status | string | The status of the certificate. A certificate enters status PENDING_VALIDATION upon being requested, unless it fails for any of the reasons given in the troubleshooting topic Certificate request fails. ACM makes repeated attempts to validate a certificate for 72 hours and then times out. If a certificate shows status FAILED or VALIDATION_TIMED_OUT, delete the request, correct the issue with DNS validation or Email validation, and try again. If validation succeeds, the certificate enters status ISSUED. (PENDING_VALIDATION, ISSUED, INACTIVE, EXPIRED, VALIDATION_TIMED_OUT, REVOKED, FAILED) |
subject_alternative_name_summaries | array | One or more domain names (subject alternative names) included in the certificate. This list contains the domain names that are bound to the public key that is contained in the certificate. The subject alternative names include the canonical domain name (CN) of the certificate and additional domain names that can be used to connect to the website. When called by ListCertificates, this parameter will only return the first 100 subject alternative names included in the certificate. To display the full list of subject alternative names, use DescribeCertificate. |
type | string | The source of the certificate. For certificates provided by ACM, this value is AMAZON_ISSUED. For certificates that you imported with ImportCertificate, this value is IMPORTED. ACM does not provide managed renewal for imported certificates. For more information about the differences between certificates that you import and those that ACM provides, see Importing Certificates in the Certificate Manager User Guide. (IMPORTED, AMAZON_ISSUED, PRIVATE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_certificate | select | region | Returns detailed metadata about the specified ACM certificate. If you have just created a certificate using the RequestCertificate action, there is a delay of several seconds before you can retrieve information about it. | |
list_certificates | select | region | Retrieves a list of certificate ARNs and domain names. You can request that only certificates that match a specific status be listed. You can also filter by specific attributes of the certificate. Default filtering returns only RSA_2048 certificates. For more information, see Filters. By default, this action does not return certificates with a CertificateKeyPairOrigin of ACME. To include ACME certificates, specify ACME in the CertificateKeyPairOrigins filter. | |
revoke_certificate | update | region, CertificateArn, RevocationReason | 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. | |
update_certificate_options | update | region, CertificateArn, Options | Updates certificate options. You can use this operation to change the domain validation method or specify whether to export your certificate. For more information, see Migrate from email to DNS validation and Certificate Manager Exportable Managed Certificates. | |
delete_certificate | delete | region | Deletes a certificate and its associated private key. If this action succeeds, the certificate is not available for use by Amazon Web Services services integrated with ACM. Deleting a certificate is eventually consistent. The may be a short delay before the certificate no longer appears in the list that can be displayed by calling the ListCertificates action or be retrieved by calling the GetCertificate action. You cannot delete an ACM certificate that is being used by another Amazon Web Services service. To delete a certificate that is in use, you must first remove the certificate association using the console or the CLI for the associated service. Deleting a certificate issued by a private certificate authority (CA) has no effect on the CA. You will continue to be charged for the CA until it is deleted. For more information, see Deleting Your Private CA in the Private Certificate Authority User Guide. You cannot delete a certificate with a CertificateKeyPairOrigin of ACME. ACM automatically deletes these certificates 1 year after they expire. Deleting a certificate issued by a private certificate authority (CA) has no effect on the CA. You will continue to be charged for the CA until it is deleted. For more information, see Deleting your private CA in the Amazon Web Services Private Certificate Authority User Guide. | |
get_certificate | exec | region, CertificateArn | Retrieves a certificate and its certificate chain. The certificate may be either a public or private certificate issued using the ACM RequestCertificate action, or a certificate imported into ACM using the ImportCertificate action. The chain consists of the certificate of the issuing CA and the intermediate certificates of any other subordinate CAs. All of the certificates are base64 encoded. You can use OpenSSL to decode the certificates and inspect individual fields. | |
resend_validation_email | exec | region, CertificateArn, Domain, ValidationDomain | 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. | |
search_certificates | exec | region | Retrieves a list of certificates matching search criteria. You can filter certificates by X.509 attributes and ACM specific properties like certificate status, type and renewal eligibility. This operation provides more flexible filtering than ListCertificates by supporting complex filter statements. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_certificate
- list_certificates
Returns detailed metadata about the specified ACM certificate. If you have just created a certificate using the RequestCertificate action, there is a delay of several seconds before you can retrieve information about it.
SELECT
acme_account_id,
acme_endpoint_arn,
certificate_arn,
certificate_authority_arn,
certificate_key_pair_origin,
created_at,
domain_name,
domain_validation_options,
extended_key_usages,
failure_reason,
imported_at,
in_use_by,
issued_at,
issuer,
key_algorithm,
key_usages,
managed_by,
not_after,
not_before,
options,
renewal_eligibility,
renewal_summary,
revocation_reason,
revoked_at,
serial,
signature_algorithm,
status,
subject,
subject_alternative_names,
type,
update_summary
FROM aws.acm.certificates
WHERE region = '{{ region }}' -- required
;
Retrieves a list of certificate ARNs and domain names. You can request that only certificates that match a specific status be listed. You can also filter by specific attributes of the certificate. Default filtering returns only RSA_2048 certificates. For more information, see Filters. By default, this action does not return certificates with a CertificateKeyPairOrigin of ACME. To include ACME certificates, specify ACME in the CertificateKeyPairOrigins filter.
SELECT
certificate_arn,
certificate_key_pair_origin,
created_at,
domain_name,
export_option,
exported,
extended_key_usages,
has_additional_subject_alternative_names,
imported_at,
in_use,
issued_at,
key_algorithm,
key_usages,
managed_by,
not_after,
not_before,
renewal_eligibility,
revoked_at,
status,
subject_alternative_name_summaries,
type
FROM aws.acm.certificates
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- revoke_certificate
- update_certificate_options
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.
UPDATE aws.acm.certificates
SET
CertificateArn = '{{ CertificateArn }}',
RevocationReason = '{{ RevocationReason }}'
WHERE
region = '{{ region }}' --required
AND CertificateArn = '{{ CertificateArn }}' --required
AND RevocationReason = '{{ RevocationReason }}' --required
RETURNING
certificate_arn;
Updates certificate options. You can use this operation to change the domain validation method or specify whether to export your certificate. For more information, see Migrate from email to DNS validation and Certificate Manager Exportable Managed Certificates.
UPDATE aws.acm.certificates
SET
CertificateArn = '{{ CertificateArn }}',
Options = '{{ Options }}'
WHERE
region = '{{ region }}' --required
AND CertificateArn = '{{ CertificateArn }}' --required
AND Options = '{{ Options }}' --required;
DELETE examples
- delete_certificate
Deletes a certificate and its associated private key. If this action succeeds, the certificate is not available for use by Amazon Web Services services integrated with ACM. Deleting a certificate is eventually consistent. The may be a short delay before the certificate no longer appears in the list that can be displayed by calling the ListCertificates action or be retrieved by calling the GetCertificate action. You cannot delete an ACM certificate that is being used by another Amazon Web Services service. To delete a certificate that is in use, you must first remove the certificate association using the console or the CLI for the associated service. Deleting a certificate issued by a private certificate authority (CA) has no effect on the CA. You will continue to be charged for the CA until it is deleted. For more information, see Deleting Your Private CA in the Private Certificate Authority User Guide. You cannot delete a certificate with a CertificateKeyPairOrigin of ACME. ACM automatically deletes these certificates 1 year after they expire. Deleting a certificate issued by a private certificate authority (CA) has no effect on the CA. You will continue to be charged for the CA until it is deleted. For more information, see Deleting your private CA in the Amazon Web Services Private Certificate Authority User Guide.
DELETE FROM aws.acm.certificates
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- get_certificate
- resend_validation_email
- search_certificates
Retrieves a certificate and its certificate chain. The certificate may be either a public or private certificate issued using the ACM RequestCertificate action, or a certificate imported into ACM using the ImportCertificate action. The chain consists of the certificate of the issuing CA and the intermediate certificates of any other subordinate CAs. All of the certificates are base64 encoded. You can use OpenSSL to decode the certificates and inspect individual fields.
EXEC aws.acm.certificates.get_certificate
@region='{{ region }}' --required
@@json=
'{
"CertificateArn": "{{ CertificateArn }}"
}'
;
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.
EXEC aws.acm.certificates.resend_validation_email
@region='{{ region }}' --required
@@json=
'{
"CertificateArn": "{{ CertificateArn }}",
"Domain": "{{ Domain }}",
"ValidationDomain": "{{ ValidationDomain }}"
}'
;
Retrieves a list of certificates matching search criteria. You can filter certificates by X.509 attributes and ACM specific properties like certificate status, type and renewal eligibility. This operation provides more flexible filtering than ListCertificates by supporting complex filter statements.
EXEC aws.acm.certificates.search_certificates
@region='{{ region }}' --required
@@json=
'{
"FilterStatement": "{{ FilterStatement }}",
"MaxResults": {{ MaxResults }},
"NextToken": "{{ NextToken }}",
"SortBy": "{{ SortBy }}",
"SortOrder": "{{ SortOrder }}"
}'
;