Class Certificate
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<Certificate.Builder,
Certificate>
Describes the full details of an Amazon Lightsail SSL/TLS certificate.
To get a summary of a certificate, use the GetCertificates
action and omit
includeCertificateDetails
from your request. The response will include only the certificate Amazon
Resource Name (ARN), certificate name, domain name, and tags.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal String
arn()
The Amazon Resource Name (ARN) of the certificate.static Certificate.Builder
builder()
final Instant
The timestamp when the certificate was created.final String
The domain name of the certificate.final List
<DomainValidationRecord> An array of objects that describe the domain validation records of the certificate.final String
The renewal eligibility of the certificate.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the DomainValidationRecords property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the SubjectAlternativeNames property.final boolean
hasTags()
For responses, this returns true if the service returned a value for the Tags property.final Integer
The number of Lightsail resources that the certificate is attached to.final Instant
issuedAt()
The timestamp when the certificate was issued.final String
issuerCA()
The certificate authority that issued the certificate.final String
The algorithm used to generate the key pair (the public and private key) of the certificate.final String
name()
The name of the certificate (my-certificate
).final Instant
notAfter()
The timestamp when the certificate expires.final Instant
The timestamp when the certificate is first valid.final RenewalSummary
An object that describes the status of the certificate renewal managed by Lightsail.final String
The validation failure reason, if any, of the certificate.final String
The reason the certificate was revoked.final Instant
The timestamp when the certificate was revoked.static Class
<? extends Certificate.Builder> final String
The serial number of the certificate.final CertificateStatus
status()
The validation status of the certificate.final String
The validation status of the certificate.An array of strings that specify the alternate domains (example2.com
) and subdomains (blog.example.com
) of the certificate.final String
The support code.tags()
The tag keys and optional values for the resource.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
arn
The Amazon Resource Name (ARN) of the certificate.
- Returns:
- The Amazon Resource Name (ARN) of the certificate.
-
name
The name of the certificate (
my-certificate
).- Returns:
- The name of the certificate (
my-certificate
).
-
domainName
The domain name of the certificate.
- Returns:
- The domain name of the certificate.
-
status
The validation status of the certificate.
If the service returns an enum value that is not available in the current SDK version,
status
will returnCertificateStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstatusAsString()
.- Returns:
- The validation status of the certificate.
- See Also:
-
statusAsString
The validation status of the certificate.
If the service returns an enum value that is not available in the current SDK version,
status
will returnCertificateStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstatusAsString()
.- Returns:
- The validation status of the certificate.
- See Also:
-
serialNumber
The serial number of the certificate.
- Returns:
- The serial number of the certificate.
-
hasSubjectAlternativeNames
public final boolean hasSubjectAlternativeNames()For responses, this returns true if the service returned a value for the SubjectAlternativeNames property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
subjectAlternativeNames
An array of strings that specify the alternate domains (
example2.com
) and subdomains (blog.example.com
) of the certificate.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSubjectAlternativeNames()
method.- Returns:
- An array of strings that specify the alternate domains (
example2.com
) and subdomains (blog.example.com
) of the certificate.
-
hasDomainValidationRecords
public final boolean hasDomainValidationRecords()For responses, this returns true if the service returned a value for the DomainValidationRecords property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
domainValidationRecords
An array of objects that describe the domain validation records of the certificate.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasDomainValidationRecords()
method.- Returns:
- An array of objects that describe the domain validation records of the certificate.
-
requestFailureReason
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.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 forexample.invalidpublicdomain
becauseinvalidpublicdomain
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.
- Returns:
- 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.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 forexample.invalidpublicdomain
becauseinvalidpublicdomain
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
The number of Lightsail resources that the certificate is attached to.
- Returns:
- The number of Lightsail resources that the certificate is attached to.
-
keyAlgorithm
The algorithm used to generate the key pair (the public and private key) of the certificate.
- Returns:
- The algorithm used to generate the key pair (the public and private key) of the certificate.
-
createdAt
The timestamp when the certificate was created.
- Returns:
- The timestamp when the certificate was created.
-
issuedAt
The timestamp when the certificate was issued.
- Returns:
- The timestamp when the certificate was issued.
-
issuerCA
The certificate authority that issued the certificate.
- Returns:
- The certificate authority that issued the certificate.
-
notBefore
The timestamp when the certificate is first valid.
- Returns:
- The timestamp when the certificate is first valid.
-
notAfter
The timestamp when the certificate expires.
- Returns:
- The timestamp when the certificate expires.
-
eligibleToRenew
The renewal eligibility of the certificate.
- Returns:
- The renewal eligibility of the certificate.
-
renewalSummary
An object that describes the status of the certificate renewal managed by Lightsail.
- Returns:
- An object that describes the status of the certificate renewal managed by Lightsail.
-
revokedAt
The timestamp when the certificate was revoked. This value is present only when the certificate status is
REVOKED
.- Returns:
- The timestamp when the certificate was revoked. This value is present only when the certificate status is
REVOKED
.
-
revocationReason
The reason the certificate was revoked. This value is present only when the certificate status is
REVOKED
.- Returns:
- The reason the certificate was revoked. This value is present only when the certificate status is
REVOKED
.
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
tags
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()
method.- Returns:
- The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
-
supportCode
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.
- Returns:
- 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.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<Certificate.Builder,
Certificate> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-