java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.certificatemanager.CfnCertificate
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:03.592Z") @Stability(Stable) public class CfnCertificate extends CfnResource implements IInspectable, ITaggable
The AWS::CertificateManager::Certificate resource requests an AWS Certificate Manager ( ACM ) certificate that you can use to enable secure connections.

For example, you can deploy an ACM certificate to an Elastic Load Balancer to enable HTTPS support. For more information, see RequestCertificate in the AWS Certificate Manager API Reference.

When you use the AWS::CertificateManager::Certificate resource in a CloudFormation stack, domain validation is handled automatically if all three of the following are true: The certificate domain is hosted in Amazon Route 53, the domain resides in your AWS account , and you are using DNS validation.

However, if the certificate uses email validation, or if the domain is not hosted in Route 53, then the stack will remain in the CREATE_IN_PROGRESS state. Further stack operations are delayed until you validate the certificate request, either by acting upon the instructions in the validation email, or by adding a CNAME record to your DNS configuration. For more information, see Option 1: DNS Validation and Option 2: Email Validation .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.certificatemanager.*;
 CfnCertificate cfnCertificate = CfnCertificate.Builder.create(this, "MyCfnCertificate")
         .domainName("domainName")
         // the properties below are optional
         .certificateAuthorityArn("certificateAuthorityArn")
         .certificateTransparencyLoggingPreference("certificateTransparencyLoggingPreference")
         .domainValidationOptions(List.of(DomainValidationOptionProperty.builder()
                 .domainName("domainName")
                 // the properties below are optional
                 .hostedZoneId("hostedZoneId")
                 .validationDomain("validationDomain")
                 .build()))
         .keyAlgorithm("keyAlgorithm")
         .subjectAlternativeNames(List.of("subjectAlternativeNames"))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .validationMethod("validationMethod")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnCertificate

      protected CfnCertificate(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnCertificate

      protected CfnCertificate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnCertificate

      @Stability(Stable) public CfnCertificate(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCertificateProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getDomainName

      @Stability(Stable) @NotNull public String getDomainName()
      The fully qualified domain name (FQDN), such as www.example.com, with which you want to secure an ACM certificate. Use an asterisk (*) to create a wildcard certificate that protects several sites in the same domain. For example, *.example.com protects www.example.com , site.example.com , and images.example.com..
    • setDomainName

      @Stability(Stable) public void setDomainName(@NotNull String value)
      The fully qualified domain name (FQDN), such as www.example.com, with which you want to secure an ACM certificate. Use an asterisk (*) to create a wildcard certificate that protects several sites in the same domain. For example, *.example.com protects www.example.com , site.example.com , and images.example.com..
    • getCertificateAuthorityArn

      @Stability(Stable) @Nullable public String getCertificateAuthorityArn()
      The Amazon Resource Name (ARN) of the private certificate authority (CA) that will be used to issue the certificate.
    • setCertificateAuthorityArn

      @Stability(Stable) public void setCertificateAuthorityArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the private certificate authority (CA) that will be used to issue the certificate.
    • getCertificateTransparencyLoggingPreference

      @Stability(Stable) @Nullable public String getCertificateTransparencyLoggingPreference()
      You can opt out of certificate transparency logging by specifying the DISABLED option.

      Opt in by specifying ENABLED .

    • setCertificateTransparencyLoggingPreference

      @Stability(Stable) public void setCertificateTransparencyLoggingPreference(@Nullable String value)
      You can opt out of certificate transparency logging by specifying the DISABLED option.

      Opt in by specifying ENABLED .

    • getDomainValidationOptions

      @Stability(Stable) @Nullable public Object getDomainValidationOptions()
      Domain information that domain name registrars use to verify your identity.
    • setDomainValidationOptions

      @Stability(Stable) public void setDomainValidationOptions(@Nullable IResolvable value)
      Domain information that domain name registrars use to verify your identity.
    • setDomainValidationOptions

      @Stability(Stable) public void setDomainValidationOptions(@Nullable List<Object> value)
      Domain information that domain name registrars use to verify your identity.
    • getKeyAlgorithm

      @Stability(Stable) @Nullable public String getKeyAlgorithm()
      Specifies the algorithm of the public and private key pair that your certificate uses to encrypt data.
    • setKeyAlgorithm

      @Stability(Stable) public void setKeyAlgorithm(@Nullable String value)
      Specifies the algorithm of the public and private key pair that your certificate uses to encrypt data.
    • getSubjectAlternativeNames

      @Stability(Stable) @Nullable public List<String> getSubjectAlternativeNames()
      Additional FQDNs to be included in the Subject Alternative Name extension of the ACM certificate.
    • setSubjectAlternativeNames

      @Stability(Stable) public void setSubjectAlternativeNames(@Nullable List<String> value)
      Additional FQDNs to be included in the Subject Alternative Name extension of the ACM certificate.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      Key-value pairs that can identify the certificate.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      Key-value pairs that can identify the certificate.
    • getValidationMethod

      @Stability(Stable) @Nullable public String getValidationMethod()
      The method you want to use to validate that you own or control the domain associated with a public certificate.
    • setValidationMethod

      @Stability(Stable) public void setValidationMethod(@Nullable String value)
      The method you want to use to validate that you own or control the domain associated with a public certificate.