// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes the full details of an Amazon Lightsail SSL/TLS certificate.</p><note>
/// <p>To get a summary of a certificate, use the <code>GetCertificates</code> action and omit <code>includeCertificateDetails</code> from your request. The response will include only the certificate Amazon Resource Name (ARN), certificate name, domain name, and tags.</p>
/// </note>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Certificate {
/// <p>The Amazon Resource Name (ARN) of the certificate.</p>
pub arn: ::std::option::Option<::std::string::String>,
/// <p>The name of the certificate (<code>my-certificate</code>).</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The domain name of the certificate.</p>
pub domain_name: ::std::option::Option<::std::string::String>,
/// <p>The validation status of the certificate.</p>
pub status: ::std::option::Option<crate::types::CertificateStatus>,
/// <p>The serial number of the certificate.</p>
pub serial_number: ::std::option::Option<::std::string::String>,
/// <p>An array of strings that specify the alternate domains (<code>example2.com</code>) and subdomains (<code>blog.example.com</code>) of the certificate.</p>
pub subject_alternative_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>An array of objects that describe the domain validation records of the certificate.</p>
pub domain_validation_records: ::std::option::Option<::std::vec::Vec<crate::types::DomainValidationRecord>>,
/// <p>The validation failure reason, if any, of the certificate.</p>
/// <p>The following failure reasons are possible:</p>
/// <ul>
/// <li>
/// <p><b> <code>NO_AVAILABLE_CONTACTS</code> </b> - This failure applies to email validation, which is not available for Lightsail certificates.</p></li>
/// <li>
/// <p><b> <code>ADDITIONAL_VERIFICATION_REQUIRED</code> </b> - 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 <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> to contact Amazon Web Services Support.</p><note>
/// <p>You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.</p>
/// </note></li>
/// <li>
/// <p><b> <code>DOMAIN_NOT_ALLOWED</code> </b> - One or more of the domain names in the certificate request was reported as an unsafe domain by <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a>. To correct the problem, search for your domain name on the <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a> website. If your domain is reported as suspicious, see <a href="https://developers.google.com/web/fundamentals/security/hacked">Google Help for Hacked Websites</a> to learn what you can do.</p>
/// <p>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.</p>
/// <p>If you see this error and your domain is not included in the VirusTotal list, visit the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> and create a case.</p></li>
/// <li>
/// <p><b> <code>INVALID_PUBLIC_DOMAIN</code> </b> - 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 <code>example.invalidpublicdomain</code> because <code>invalidpublicdomain</code> is not a valid top-level domain.</p></li>
/// <li>
/// <p><b> <code>OTHER</code> </b> - 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.</p></li>
/// </ul>
pub request_failure_reason: ::std::option::Option<::std::string::String>,
/// <p>The number of Lightsail resources that the certificate is attached to.</p>
pub in_use_resource_count: i32,
/// <p>The algorithm used to generate the key pair (the public and private key) of the certificate.</p>
pub key_algorithm: ::std::option::Option<::std::string::String>,
/// <p>The timestamp when the certificate was created.</p>
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The timestamp when the certificate was issued.</p>
pub issued_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The certificate authority that issued the certificate.</p>
pub issuer_ca: ::std::option::Option<::std::string::String>,
/// <p>The timestamp when the certificate is first valid.</p>
pub not_before: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The timestamp when the certificate expires.</p>
pub not_after: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The renewal eligibility of the certificate.</p>
pub eligible_to_renew: ::std::option::Option<::std::string::String>,
/// <p>An object that describes the status of the certificate renewal managed by Lightsail.</p>
pub renewal_summary: ::std::option::Option<crate::types::RenewalSummary>,
/// <p>The timestamp when the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
pub revoked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The reason the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
pub revocation_reason: ::std::option::Option<::std::string::String>,
/// <p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>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.</p>
pub support_code: ::std::option::Option<::std::string::String>,
}
impl Certificate {
/// <p>The Amazon Resource Name (ARN) of the certificate.</p>
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The name of the certificate (<code>my-certificate</code>).</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The domain name of the certificate.</p>
pub fn domain_name(&self) -> ::std::option::Option<&str> {
self.domain_name.as_deref()
}
/// <p>The validation status of the certificate.</p>
pub fn status(&self) -> ::std::option::Option<&crate::types::CertificateStatus> {
self.status.as_ref()
}
/// <p>The serial number of the certificate.</p>
pub fn serial_number(&self) -> ::std::option::Option<&str> {
self.serial_number.as_deref()
}
/// <p>An array of strings that specify the alternate domains (<code>example2.com</code>) and subdomains (<code>blog.example.com</code>) of the certificate.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subject_alternative_names.is_none()`.
pub fn subject_alternative_names(&self) -> &[::std::string::String] {
self.subject_alternative_names.as_deref().unwrap_or_default()
}
/// <p>An array of objects that describe the domain validation records of the certificate.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.domain_validation_records.is_none()`.
pub fn domain_validation_records(&self) -> &[crate::types::DomainValidationRecord] {
self.domain_validation_records.as_deref().unwrap_or_default()
}
/// <p>The validation failure reason, if any, of the certificate.</p>
/// <p>The following failure reasons are possible:</p>
/// <ul>
/// <li>
/// <p><b> <code>NO_AVAILABLE_CONTACTS</code> </b> - This failure applies to email validation, which is not available for Lightsail certificates.</p></li>
/// <li>
/// <p><b> <code>ADDITIONAL_VERIFICATION_REQUIRED</code> </b> - 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 <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> to contact Amazon Web Services Support.</p><note>
/// <p>You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.</p>
/// </note></li>
/// <li>
/// <p><b> <code>DOMAIN_NOT_ALLOWED</code> </b> - One or more of the domain names in the certificate request was reported as an unsafe domain by <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a>. To correct the problem, search for your domain name on the <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a> website. If your domain is reported as suspicious, see <a href="https://developers.google.com/web/fundamentals/security/hacked">Google Help for Hacked Websites</a> to learn what you can do.</p>
/// <p>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.</p>
/// <p>If you see this error and your domain is not included in the VirusTotal list, visit the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> and create a case.</p></li>
/// <li>
/// <p><b> <code>INVALID_PUBLIC_DOMAIN</code> </b> - 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 <code>example.invalidpublicdomain</code> because <code>invalidpublicdomain</code> is not a valid top-level domain.</p></li>
/// <li>
/// <p><b> <code>OTHER</code> </b> - 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.</p></li>
/// </ul>
pub fn request_failure_reason(&self) -> ::std::option::Option<&str> {
self.request_failure_reason.as_deref()
}
/// <p>The number of Lightsail resources that the certificate is attached to.</p>
pub fn in_use_resource_count(&self) -> i32 {
self.in_use_resource_count
}
/// <p>The algorithm used to generate the key pair (the public and private key) of the certificate.</p>
pub fn key_algorithm(&self) -> ::std::option::Option<&str> {
self.key_algorithm.as_deref()
}
/// <p>The timestamp when the certificate was created.</p>
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
/// <p>The timestamp when the certificate was issued.</p>
pub fn issued_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.issued_at.as_ref()
}
/// <p>The certificate authority that issued the certificate.</p>
pub fn issuer_ca(&self) -> ::std::option::Option<&str> {
self.issuer_ca.as_deref()
}
/// <p>The timestamp when the certificate is first valid.</p>
pub fn not_before(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.not_before.as_ref()
}
/// <p>The timestamp when the certificate expires.</p>
pub fn not_after(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.not_after.as_ref()
}
/// <p>The renewal eligibility of the certificate.</p>
pub fn eligible_to_renew(&self) -> ::std::option::Option<&str> {
self.eligible_to_renew.as_deref()
}
/// <p>An object that describes the status of the certificate renewal managed by Lightsail.</p>
pub fn renewal_summary(&self) -> ::std::option::Option<&crate::types::RenewalSummary> {
self.renewal_summary.as_ref()
}
/// <p>The timestamp when the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
pub fn revoked_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.revoked_at.as_ref()
}
/// <p>The reason the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
pub fn revocation_reason(&self) -> ::std::option::Option<&str> {
self.revocation_reason.as_deref()
}
/// <p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
/// <p>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.</p>
pub fn support_code(&self) -> ::std::option::Option<&str> {
self.support_code.as_deref()
}
}
impl Certificate {
/// Creates a new builder-style object to manufacture [`Certificate`](crate::types::Certificate).
pub fn builder() -> crate::types::builders::CertificateBuilder {
crate::types::builders::CertificateBuilder::default()
}
}
/// A builder for [`Certificate`](crate::types::Certificate).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CertificateBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) domain_name: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::CertificateStatus>,
pub(crate) serial_number: ::std::option::Option<::std::string::String>,
pub(crate) subject_alternative_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) domain_validation_records: ::std::option::Option<::std::vec::Vec<crate::types::DomainValidationRecord>>,
pub(crate) request_failure_reason: ::std::option::Option<::std::string::String>,
pub(crate) in_use_resource_count: ::std::option::Option<i32>,
pub(crate) key_algorithm: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) issued_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) issuer_ca: ::std::option::Option<::std::string::String>,
pub(crate) not_before: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) not_after: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) eligible_to_renew: ::std::option::Option<::std::string::String>,
pub(crate) renewal_summary: ::std::option::Option<crate::types::RenewalSummary>,
pub(crate) revoked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) revocation_reason: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) support_code: ::std::option::Option<::std::string::String>,
}
impl CertificateBuilder {
/// <p>The Amazon Resource Name (ARN) of the certificate.</p>
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the certificate.</p>
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the certificate.</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// <p>The name of the certificate (<code>my-certificate</code>).</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the certificate (<code>my-certificate</code>).</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of the certificate (<code>my-certificate</code>).</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The domain name of the certificate.</p>
pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The domain name of the certificate.</p>
pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_name = input;
self
}
/// <p>The domain name of the certificate.</p>
pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_name
}
/// <p>The validation status of the certificate.</p>
pub fn status(mut self, input: crate::types::CertificateStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The validation status of the certificate.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::CertificateStatus>) -> Self {
self.status = input;
self
}
/// <p>The validation status of the certificate.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::CertificateStatus> {
&self.status
}
/// <p>The serial number of the certificate.</p>
pub fn serial_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.serial_number = ::std::option::Option::Some(input.into());
self
}
/// <p>The serial number of the certificate.</p>
pub fn set_serial_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.serial_number = input;
self
}
/// <p>The serial number of the certificate.</p>
pub fn get_serial_number(&self) -> &::std::option::Option<::std::string::String> {
&self.serial_number
}
/// Appends an item to `subject_alternative_names`.
///
/// To override the contents of this collection use [`set_subject_alternative_names`](Self::set_subject_alternative_names).
///
/// <p>An array of strings that specify the alternate domains (<code>example2.com</code>) and subdomains (<code>blog.example.com</code>) of the certificate.</p>
pub fn subject_alternative_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.subject_alternative_names.unwrap_or_default();
v.push(input.into());
self.subject_alternative_names = ::std::option::Option::Some(v);
self
}
/// <p>An array of strings that specify the alternate domains (<code>example2.com</code>) and subdomains (<code>blog.example.com</code>) of the certificate.</p>
pub fn set_subject_alternative_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.subject_alternative_names = input;
self
}
/// <p>An array of strings that specify the alternate domains (<code>example2.com</code>) and subdomains (<code>blog.example.com</code>) of the certificate.</p>
pub fn get_subject_alternative_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.subject_alternative_names
}
/// Appends an item to `domain_validation_records`.
///
/// To override the contents of this collection use [`set_domain_validation_records`](Self::set_domain_validation_records).
///
/// <p>An array of objects that describe the domain validation records of the certificate.</p>
pub fn domain_validation_records(mut self, input: crate::types::DomainValidationRecord) -> Self {
let mut v = self.domain_validation_records.unwrap_or_default();
v.push(input);
self.domain_validation_records = ::std::option::Option::Some(v);
self
}
/// <p>An array of objects that describe the domain validation records of the certificate.</p>
pub fn set_domain_validation_records(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DomainValidationRecord>>) -> Self {
self.domain_validation_records = input;
self
}
/// <p>An array of objects that describe the domain validation records of the certificate.</p>
pub fn get_domain_validation_records(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DomainValidationRecord>> {
&self.domain_validation_records
}
/// <p>The validation failure reason, if any, of the certificate.</p>
/// <p>The following failure reasons are possible:</p>
/// <ul>
/// <li>
/// <p><b> <code>NO_AVAILABLE_CONTACTS</code> </b> - This failure applies to email validation, which is not available for Lightsail certificates.</p></li>
/// <li>
/// <p><b> <code>ADDITIONAL_VERIFICATION_REQUIRED</code> </b> - 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 <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> to contact Amazon Web Services Support.</p><note>
/// <p>You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.</p>
/// </note></li>
/// <li>
/// <p><b> <code>DOMAIN_NOT_ALLOWED</code> </b> - One or more of the domain names in the certificate request was reported as an unsafe domain by <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a>. To correct the problem, search for your domain name on the <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a> website. If your domain is reported as suspicious, see <a href="https://developers.google.com/web/fundamentals/security/hacked">Google Help for Hacked Websites</a> to learn what you can do.</p>
/// <p>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.</p>
/// <p>If you see this error and your domain is not included in the VirusTotal list, visit the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> and create a case.</p></li>
/// <li>
/// <p><b> <code>INVALID_PUBLIC_DOMAIN</code> </b> - 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 <code>example.invalidpublicdomain</code> because <code>invalidpublicdomain</code> is not a valid top-level domain.</p></li>
/// <li>
/// <p><b> <code>OTHER</code> </b> - 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.</p></li>
/// </ul>
pub fn request_failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.request_failure_reason = ::std::option::Option::Some(input.into());
self
}
/// <p>The validation failure reason, if any, of the certificate.</p>
/// <p>The following failure reasons are possible:</p>
/// <ul>
/// <li>
/// <p><b> <code>NO_AVAILABLE_CONTACTS</code> </b> - This failure applies to email validation, which is not available for Lightsail certificates.</p></li>
/// <li>
/// <p><b> <code>ADDITIONAL_VERIFICATION_REQUIRED</code> </b> - 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 <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> to contact Amazon Web Services Support.</p><note>
/// <p>You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.</p>
/// </note></li>
/// <li>
/// <p><b> <code>DOMAIN_NOT_ALLOWED</code> </b> - One or more of the domain names in the certificate request was reported as an unsafe domain by <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a>. To correct the problem, search for your domain name on the <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a> website. If your domain is reported as suspicious, see <a href="https://developers.google.com/web/fundamentals/security/hacked">Google Help for Hacked Websites</a> to learn what you can do.</p>
/// <p>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.</p>
/// <p>If you see this error and your domain is not included in the VirusTotal list, visit the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> and create a case.</p></li>
/// <li>
/// <p><b> <code>INVALID_PUBLIC_DOMAIN</code> </b> - 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 <code>example.invalidpublicdomain</code> because <code>invalidpublicdomain</code> is not a valid top-level domain.</p></li>
/// <li>
/// <p><b> <code>OTHER</code> </b> - 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.</p></li>
/// </ul>
pub fn set_request_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.request_failure_reason = input;
self
}
/// <p>The validation failure reason, if any, of the certificate.</p>
/// <p>The following failure reasons are possible:</p>
/// <ul>
/// <li>
/// <p><b> <code>NO_AVAILABLE_CONTACTS</code> </b> - This failure applies to email validation, which is not available for Lightsail certificates.</p></li>
/// <li>
/// <p><b> <code>ADDITIONAL_VERIFICATION_REQUIRED</code> </b> - 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 <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> to contact Amazon Web Services Support.</p><note>
/// <p>You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.</p>
/// </note></li>
/// <li>
/// <p><b> <code>DOMAIN_NOT_ALLOWED</code> </b> - One or more of the domain names in the certificate request was reported as an unsafe domain by <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a>. To correct the problem, search for your domain name on the <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a> website. If your domain is reported as suspicious, see <a href="https://developers.google.com/web/fundamentals/security/hacked">Google Help for Hacked Websites</a> to learn what you can do.</p>
/// <p>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.</p>
/// <p>If you see this error and your domain is not included in the VirusTotal list, visit the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> and create a case.</p></li>
/// <li>
/// <p><b> <code>INVALID_PUBLIC_DOMAIN</code> </b> - 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 <code>example.invalidpublicdomain</code> because <code>invalidpublicdomain</code> is not a valid top-level domain.</p></li>
/// <li>
/// <p><b> <code>OTHER</code> </b> - 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.</p></li>
/// </ul>
pub fn get_request_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.request_failure_reason
}
/// <p>The number of Lightsail resources that the certificate is attached to.</p>
pub fn in_use_resource_count(mut self, input: i32) -> Self {
self.in_use_resource_count = ::std::option::Option::Some(input);
self
}
/// <p>The number of Lightsail resources that the certificate is attached to.</p>
pub fn set_in_use_resource_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.in_use_resource_count = input;
self
}
/// <p>The number of Lightsail resources that the certificate is attached to.</p>
pub fn get_in_use_resource_count(&self) -> &::std::option::Option<i32> {
&self.in_use_resource_count
}
/// <p>The algorithm used to generate the key pair (the public and private key) of the certificate.</p>
pub fn key_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.key_algorithm = ::std::option::Option::Some(input.into());
self
}
/// <p>The algorithm used to generate the key pair (the public and private key) of the certificate.</p>
pub fn set_key_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.key_algorithm = input;
self
}
/// <p>The algorithm used to generate the key pair (the public and private key) of the certificate.</p>
pub fn get_key_algorithm(&self) -> &::std::option::Option<::std::string::String> {
&self.key_algorithm
}
/// <p>The timestamp when the certificate was created.</p>
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp when the certificate was created.</p>
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
/// <p>The timestamp when the certificate was created.</p>
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
/// <p>The timestamp when the certificate was issued.</p>
pub fn issued_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.issued_at = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp when the certificate was issued.</p>
pub fn set_issued_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.issued_at = input;
self
}
/// <p>The timestamp when the certificate was issued.</p>
pub fn get_issued_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.issued_at
}
/// <p>The certificate authority that issued the certificate.</p>
pub fn issuer_ca(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.issuer_ca = ::std::option::Option::Some(input.into());
self
}
/// <p>The certificate authority that issued the certificate.</p>
pub fn set_issuer_ca(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.issuer_ca = input;
self
}
/// <p>The certificate authority that issued the certificate.</p>
pub fn get_issuer_ca(&self) -> &::std::option::Option<::std::string::String> {
&self.issuer_ca
}
/// <p>The timestamp when the certificate is first valid.</p>
pub fn not_before(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.not_before = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp when the certificate is first valid.</p>
pub fn set_not_before(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.not_before = input;
self
}
/// <p>The timestamp when the certificate is first valid.</p>
pub fn get_not_before(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.not_before
}
/// <p>The timestamp when the certificate expires.</p>
pub fn not_after(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.not_after = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp when the certificate expires.</p>
pub fn set_not_after(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.not_after = input;
self
}
/// <p>The timestamp when the certificate expires.</p>
pub fn get_not_after(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.not_after
}
/// <p>The renewal eligibility of the certificate.</p>
pub fn eligible_to_renew(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.eligible_to_renew = ::std::option::Option::Some(input.into());
self
}
/// <p>The renewal eligibility of the certificate.</p>
pub fn set_eligible_to_renew(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.eligible_to_renew = input;
self
}
/// <p>The renewal eligibility of the certificate.</p>
pub fn get_eligible_to_renew(&self) -> &::std::option::Option<::std::string::String> {
&self.eligible_to_renew
}
/// <p>An object that describes the status of the certificate renewal managed by Lightsail.</p>
pub fn renewal_summary(mut self, input: crate::types::RenewalSummary) -> Self {
self.renewal_summary = ::std::option::Option::Some(input);
self
}
/// <p>An object that describes the status of the certificate renewal managed by Lightsail.</p>
pub fn set_renewal_summary(mut self, input: ::std::option::Option<crate::types::RenewalSummary>) -> Self {
self.renewal_summary = input;
self
}
/// <p>An object that describes the status of the certificate renewal managed by Lightsail.</p>
pub fn get_renewal_summary(&self) -> &::std::option::Option<crate::types::RenewalSummary> {
&self.renewal_summary
}
/// <p>The timestamp when the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
pub fn revoked_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.revoked_at = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp when the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
pub fn set_revoked_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.revoked_at = input;
self
}
/// <p>The timestamp when the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
pub fn get_revoked_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.revoked_at
}
/// <p>The reason the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
pub fn revocation_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.revocation_reason = ::std::option::Option::Some(input.into());
self
}
/// <p>The reason the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
pub fn set_revocation_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.revocation_reason = input;
self
}
/// <p>The reason the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
pub fn get_revocation_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.revocation_reason
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>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.</p>
pub fn support_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.support_code = ::std::option::Option::Some(input.into());
self
}
/// <p>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.</p>
pub fn set_support_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.support_code = input;
self
}
/// <p>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.</p>
pub fn get_support_code(&self) -> &::std::option::Option<::std::string::String> {
&self.support_code
}
/// Consumes the builder and constructs a [`Certificate`](crate::types::Certificate).
pub fn build(self) -> crate::types::Certificate {
crate::types::Certificate {
arn: self.arn,
name: self.name,
domain_name: self.domain_name,
status: self.status,
serial_number: self.serial_number,
subject_alternative_names: self.subject_alternative_names,
domain_validation_records: self.domain_validation_records,
request_failure_reason: self.request_failure_reason,
in_use_resource_count: self.in_use_resource_count.unwrap_or_default(),
key_algorithm: self.key_algorithm,
created_at: self.created_at,
issued_at: self.issued_at,
issuer_ca: self.issuer_ca,
not_before: self.not_before,
not_after: self.not_after,
eligible_to_renew: self.eligible_to_renew,
renewal_summary: self.renewal_summary,
revoked_at: self.revoked_at,
revocation_reason: self.revocation_reason,
tags: self.tags,
support_code: self.support_code,
}
}
}