Lightsail.Client.
get_certificates
(**kwargs)¶Returns information about one or more Amazon Lightsail SSL/TLS certificates.
Note
To get a summary of a certificate, ommit includeCertificateDetails
from your request. The response will include only the certificate Amazon Resource Name (ARN), certificate name, domain name, and tags.
See also: AWS API Documentation
Request Syntax
response = client.get_certificates(
certificateStatuses=[
'PENDING_VALIDATION'|'ISSUED'|'INACTIVE'|'EXPIRED'|'VALIDATION_TIMED_OUT'|'REVOKED'|'FAILED',
],
includeCertificateDetails=True|False,
certificateName='string'
)
The status of the certificates for which to return information.
For example, specify ISSUED
to return only certificates with an ISSUED
status.
When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request is made, regardless of their current status.
Indicates whether to include detailed information about the certificates in the response.
When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain names, and tags.
The name for the certificate for which to return information.
When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request is made.
dict
Response Syntax
{
'certificates': [
{
'certificateArn': 'string',
'certificateName': 'string',
'domainName': 'string',
'certificateDetail': {
'arn': 'string',
'name': 'string',
'domainName': 'string',
'status': 'PENDING_VALIDATION'|'ISSUED'|'INACTIVE'|'EXPIRED'|'VALIDATION_TIMED_OUT'|'REVOKED'|'FAILED',
'serialNumber': 'string',
'subjectAlternativeNames': [
'string',
],
'domainValidationRecords': [
{
'domainName': 'string',
'resourceRecord': {
'name': 'string',
'type': 'string',
'value': 'string'
},
'dnsRecordCreationState': {
'code': 'SUCCEEDED'|'STARTED'|'FAILED',
'message': 'string'
},
'validationStatus': 'PENDING_VALIDATION'|'FAILED'|'SUCCESS'
},
],
'requestFailureReason': 'string',
'inUseResourceCount': 123,
'keyAlgorithm': 'string',
'createdAt': datetime(2015, 1, 1),
'issuedAt': datetime(2015, 1, 1),
'issuerCA': 'string',
'notBefore': datetime(2015, 1, 1),
'notAfter': datetime(2015, 1, 1),
'eligibleToRenew': 'string',
'renewalSummary': {
'domainValidationRecords': [
{
'domainName': 'string',
'resourceRecord': {
'name': 'string',
'type': 'string',
'value': 'string'
},
'dnsRecordCreationState': {
'code': 'SUCCEEDED'|'STARTED'|'FAILED',
'message': 'string'
},
'validationStatus': 'PENDING_VALIDATION'|'FAILED'|'SUCCESS'
},
],
'renewalStatus': 'PendingAutoRenewal'|'PendingValidation'|'Success'|'Failed',
'renewalStatusReason': 'string',
'updatedAt': datetime(2015, 1, 1)
},
'revokedAt': datetime(2015, 1, 1),
'revocationReason': 'string',
'tags': [
{
'key': 'string',
'value': 'string'
},
],
'supportCode': 'string'
},
'tags': [
{
'key': 'string',
'value': 'string'
},
]
},
]
}
Response Structure
(dict) --
certificates (list) --
An object that describes certificates.
(dict) --
Describes an Amazon Lightsail SSL/TLS certificate.
certificateArn (string) --
The Amazon Resource Name (ARN) of the certificate.
certificateName (string) --
The name of the certificate.
domainName (string) --
The domain name of the certificate.
certificateDetail (dict) --
An object that describes a certificate in detail.
arn (string) --
The Amazon Resource Name (ARN) of the certificate.
name (string) --
The name of the certificate (e.g., my-certificate
).
domainName (string) --
The domain name of the certificate.
status (string) --
The validation status of the certificate.
serialNumber (string) --
The serial number of the certificate.
subjectAlternativeNames (list) --
An array of strings that specify the alternate domains (e.g., example2.com
) and subdomains (e.g., blog.example.com
) of the certificate.
domainValidationRecords (list) --
An array of objects that describe the domain validation records of the certificate.
(dict) --
Describes the domain name system (DNS) records that you must add to the DNS of your registered domain to validate ownership for an Amazon Lightsail SSL/TLS certificate.
domainName (string) --
The domain name of the certificate validation record. For example, example.com
or www.example.com
.
resourceRecord (dict) --
An object that describes the DNS records to add to your domain's DNS to validate it for the certificate.
name (string) --
The name of the record.
type (string) --
The DNS record type.
value (string) --
The value for the DNS record.
dnsRecordCreationState (dict) --
An object that describes the state of the canonical name (CNAME) records that are automatically added by Lightsail to the DNS of the domain to validate domain ownership.
code (string) --
The status code for the automated DNS record creation.
Following are the possible values:
SUCCEEDED
- The validation records were successfully added to the domain.STARTED
- The automatic DNS record creation has started.FAILED
- The validation records failed to be added to the domain.message (string) --
The message that describes the reason for the status code.
validationStatus (string) --
The validation status of the record.
requestFailureReason (string) --
The validation failure reason, if any, of the certificate.
The following failure reasons are possible:
NO_AVAILABLE_CONTACTS
- This failure applies to email validation, which is not available for Lightsail certificates.ADDITIONAL_VERIFICATION_REQUIRED
- Lightsail requires additional information to process this certificate request. This can happen as a fraud-protection measure, such as when the domain ranks within the Alexa top 1000 websites. To provide the required information, use the Amazon Web Services Support Center to contact Amazon Web Services Support.Note
You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.
DOMAIN_NOT_ALLOWED
- One or more of the domain names in the certificate request was reported as an unsafe domain by VirusTotal. To correct the problem, search for your domain name on the VirusTotal website. If your domain is reported as suspicious, see Google Help for Hacked Websites to learn what you can do. If you believe that the result is a false positive, notify the organization that is reporting the domain. VirusTotal is an aggregate of several antivirus and URL scanners and cannot remove your domain from a block list itself. After you correct the problem and the VirusTotal registry has been updated, request a new certificate. If you see this error and your domain is not included in the VirusTotal list, visit the Amazon Web Services Support Center and create a case.INVALID_PUBLIC_DOMAIN
- One or more of the domain names in the certificate request is not valid. Typically, this is because a domain name in the request is not a valid top-level domain. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request, and ensure that all domain names in the request are for valid top-level domains. For example, you cannot request a certificate for example.invalidpublicdomain
because invalidpublicdomain
is not a valid top-level domain.OTHER
- Typically, this failure occurs when there is a typographical error in one or more of the domain names in the certificate request. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request.inUseResourceCount (integer) --
The number of Lightsail resources that the certificate is attached to.
keyAlgorithm (string) --
The algorithm used to generate the key pair (the public and private key) of the certificate.
createdAt (datetime) --
The timestamp when the certificate was created.
issuedAt (datetime) --
The timestamp when the certificate was issued.
issuerCA (string) --
The certificate authority that issued the certificate.
notBefore (datetime) --
The timestamp when the certificate is first valid.
notAfter (datetime) --
The timestamp when the certificate expires.
eligibleToRenew (string) --
The renewal eligibility of the certificate.
renewalSummary (dict) --
An object that describes the status of the certificate renewal managed by Lightsail.
domainValidationRecords (list) --
An array of objects that describe the domain validation records of the certificate.
(dict) --
Describes the domain name system (DNS) records that you must add to the DNS of your registered domain to validate ownership for an Amazon Lightsail SSL/TLS certificate.
domainName (string) --
The domain name of the certificate validation record. For example, example.com
or www.example.com
.
resourceRecord (dict) --
An object that describes the DNS records to add to your domain's DNS to validate it for the certificate.
name (string) --
The name of the record.
type (string) --
The DNS record type.
value (string) --
The value for the DNS record.
dnsRecordCreationState (dict) --
An object that describes the state of the canonical name (CNAME) records that are automatically added by Lightsail to the DNS of the domain to validate domain ownership.
code (string) --
The status code for the automated DNS record creation.
Following are the possible values:
SUCCEEDED
- The validation records were successfully added to the domain.STARTED
- The automatic DNS record creation has started.FAILED
- The validation records failed to be added to the domain.message (string) --
The message that describes the reason for the status code.
validationStatus (string) --
The validation status of the record.
renewalStatus (string) --
The renewal status of the certificate.
The following renewal status are possible:
PendingAutoRenewal
- Lightsail is attempting to automatically validate the domain names of the certificate. No further action is required.PendingValidation
- Lightsail couldn't automatically validate one or more domain names of the certificate. You must take action to validate these domain names or the certificate won't be renewed. Check to make sure your certificate's domain validation records exist in your domain's DNS, and that your certificate remains in use.Success
- All domain names in the certificate are validated, and Lightsail renewed the certificate. No further action is required.Failed
- One or more domain names were not validated before the certificate expired, and Lightsail did not renew the certificate. You can request a new certificate using the CreateCertificate
action.renewalStatusReason (string) --
The reason for the renewal status of the certificate.
updatedAt (datetime) --
The timestamp when the certificate was last updated.
revokedAt (datetime) --
The timestamp when the certificate was revoked. This value is present only when the certificate status is REVOKED
.
revocationReason (string) --
The reason the certificate was revoked. This value is present only when the certificate status is REVOKED
.
tags (list) --
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
supportCode (string) --
The support code. Include this code in your email to support when you have questions about your Lightsail certificate. This code enables our support team to look up your Lightsail information more easily.
tags (list) --
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
(dict) --
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
key (string) --
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
value (string) --
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
Exceptions
Lightsail.Client.exceptions.ServiceException
Lightsail.Client.exceptions.InvalidInputException
Lightsail.Client.exceptions.NotFoundException
Lightsail.Client.exceptions.AccessDeniedException
Lightsail.Client.exceptions.UnauthenticatedException