Class CfnDomainName

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:44.800Z") @Stability(Stable) public class CfnDomainName extends CfnResource implements IInspectable
A CloudFormation AWS::ApiGateway::DomainName.

The AWS::ApiGateway::DomainName resource specifies a custom domain name for your API in API Gateway.

You can use a custom domain name to provide a URL that's more intuitive and easier to recall. For more information about using custom domain names, see Set up Custom Domain Name for an API in API Gateway in the API Gateway Developer Guide .

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.apigateway.*;
 CfnDomainName cfnDomainName = CfnDomainName.Builder.create(this, "MyCfnDomainName")
         .certificateArn("certificateArn")
         .domainName("domainName")
         .endpointConfiguration(EndpointConfigurationProperty.builder()
                 .types(List.of("types"))
                 .build())
         .mutualTlsAuthentication(MutualTlsAuthenticationProperty.builder()
                 .truststoreUri("truststoreUri")
                 .truststoreVersion("truststoreVersion")
                 .build())
         .ownershipVerificationCertificateArn("ownershipVerificationCertificateArn")
         .regionalCertificateArn("regionalCertificateArn")
         .securityPolicy("securityPolicy")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • 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

    • CfnDomainName

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

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

      @Stability(Stable) public CfnDomainName(@NotNull Construct scope, @NotNull String id, @Nullable CfnDomainNameProps props)
      Create a new AWS::ApiGateway::DomainName.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
    • CfnDomainName

      @Stability(Stable) public CfnDomainName(@NotNull Construct scope, @NotNull String id)
      Create a new AWS::ApiGateway::DomainName.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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.
    • getAttrDistributionDomainName

      @Stability(Stable) @NotNull public String getAttrDistributionDomainName()
      The Amazon CloudFront distribution domain name that's mapped to the custom domain name.

      This is only applicable for endpoints whose type is EDGE .

      Example: d111111abcdef8.cloudfront.net

    • getAttrDistributionHostedZoneId

      @Stability(Stable) @NotNull public String getAttrDistributionHostedZoneId()
      The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint.

      The only valid value is Z2FDTNDATAQYW2 for all regions.

    • getAttrRegionalDomainName

      @Stability(Stable) @NotNull public String getAttrRegionalDomainName()
      The domain name associated with the regional endpoint for this custom domain name.

      You set up this association by adding a DNS record that points the custom domain name to this regional domain name.

    • getAttrRegionalHostedZoneId

      @Stability(Stable) @NotNull public String getAttrRegionalHostedZoneId()
      The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public TagManager getTags()
      The collection of tags.

      Each tag element is associated with a given resource.

    • getCertificateArn

      @Stability(Stable) @Nullable public String getCertificateArn()
      The reference to an AWS -managed certificate that will be used by edge-optimized endpoint for this domain name.

      AWS Certificate Manager is the only supported source.

    • setCertificateArn

      @Stability(Stable) public void setCertificateArn(@Nullable String value)
      The reference to an AWS -managed certificate that will be used by edge-optimized endpoint for this domain name.

      AWS Certificate Manager is the only supported source.

    • getDomainName

      @Stability(Stable) @Nullable public String getDomainName()
      The custom domain name as an API host name, for example, my-api.example.com .
    • setDomainName

      @Stability(Stable) public void setDomainName(@Nullable String value)
      The custom domain name as an API host name, for example, my-api.example.com .
    • getEndpointConfiguration

      @Stability(Stable) @Nullable public Object getEndpointConfiguration()
      The endpoint configuration of this DomainName showing the endpoint types of the domain name.
    • setEndpointConfiguration

      @Stability(Stable) public void setEndpointConfiguration(@Nullable IResolvable value)
      The endpoint configuration of this DomainName showing the endpoint types of the domain name.
    • setEndpointConfiguration

      @Stability(Stable) public void setEndpointConfiguration(@Nullable CfnDomainName.EndpointConfigurationProperty value)
      The endpoint configuration of this DomainName showing the endpoint types of the domain name.
    • getMutualTlsAuthentication

      @Stability(Stable) @Nullable public Object getMutualTlsAuthentication()
      The mutual TLS authentication configuration for a custom domain name.

      If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.

    • setMutualTlsAuthentication

      @Stability(Stable) public void setMutualTlsAuthentication(@Nullable IResolvable value)
      The mutual TLS authentication configuration for a custom domain name.

      If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.

    • setMutualTlsAuthentication

      @Stability(Stable) public void setMutualTlsAuthentication(@Nullable CfnDomainName.MutualTlsAuthenticationProperty value)
      The mutual TLS authentication configuration for a custom domain name.

      If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.

    • getOwnershipVerificationCertificateArn

      @Stability(Stable) @Nullable public String getOwnershipVerificationCertificateArn()
      The ARN of the public certificate issued by ACM to validate ownership of your custom domain.

      Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the RegionalCertificateArn.

    • setOwnershipVerificationCertificateArn

      @Stability(Stable) public void setOwnershipVerificationCertificateArn(@Nullable String value)
      The ARN of the public certificate issued by ACM to validate ownership of your custom domain.

      Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the RegionalCertificateArn.

    • getRegionalCertificateArn

      @Stability(Stable) @Nullable public String getRegionalCertificateArn()
      The reference to an AWS -managed certificate that will be used for validating the regional domain name.

      AWS Certificate Manager is the only supported source.

    • setRegionalCertificateArn

      @Stability(Stable) public void setRegionalCertificateArn(@Nullable String value)
      The reference to an AWS -managed certificate that will be used for validating the regional domain name.

      AWS Certificate Manager is the only supported source.

    • getSecurityPolicy

      @Stability(Stable) @Nullable public String getSecurityPolicy()
      The Transport Layer Security (TLS) version + cipher suite for this DomainName.

      The valid values are TLS_1_0 and TLS_1_2 .

    • setSecurityPolicy

      @Stability(Stable) public void setSecurityPolicy(@Nullable String value)
      The Transport Layer Security (TLS) version + cipher suite for this DomainName.

      The valid values are TLS_1_0 and TLS_1_2 .