Class DomainName.Builder

java.lang.Object
software.amazon.awscdk.services.apigateway.DomainName.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<DomainName>
Enclosing class:
DomainName

@Stability(Stable) public static final class DomainName.Builder extends Object implements software.amazon.jsii.Builder<DomainName>
A fluent builder for DomainName.
  • Method Details

    • create

      @Stability(Stable) public static DomainName.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of DomainName.Builder.
    • certificate

      @Stability(Stable) public DomainName.Builder certificate(ICertificate certificate)
      The reference to an AWS-managed certificate for use by the edge-optimized endpoint for the domain name.

      For "EDGE" domain names, the certificate needs to be in the US East (N. Virginia) region.

      Parameters:
      certificate - The reference to an AWS-managed certificate for use by the edge-optimized endpoint for the domain name. This parameter is required.
      Returns:
      this
    • domainName

      @Stability(Stable) public DomainName.Builder domainName(String domainName)
      The custom domain name for your API.

      Uppercase letters are not supported.

      Parameters:
      domainName - The custom domain name for your API. This parameter is required.
      Returns:
      this
    • basePath

      @Stability(Stable) public DomainName.Builder basePath(String basePath)
      The base path name that callers of the API must provide in the URL after the domain name (e.g. example.com/base-path). If you specify this property, it can't be an empty string.

      Default: - map requests from the domain root (e.g. `example.com`).

      Parameters:
      basePath - The base path name that callers of the API must provide in the URL after the domain name (e.g. example.com/base-path). If you specify this property, it can't be an empty string. This parameter is required.
      Returns:
      this
    • endpointType

      @Stability(Stable) public DomainName.Builder endpointType(EndpointType endpointType)
      The type of endpoint for this DomainName.

      Default: REGIONAL

      Parameters:
      endpointType - The type of endpoint for this DomainName. This parameter is required.
      Returns:
      this
    • mtls

      @Stability(Stable) public DomainName.Builder mtls(MTLSConfig mtls)
      The mutual TLS authentication configuration for a custom domain name.

      Default: - mTLS is not configured.

      Parameters:
      mtls - The mutual TLS authentication configuration for a custom domain name. This parameter is required.
      Returns:
      this
    • securityPolicy

      @Stability(Stable) public DomainName.Builder securityPolicy(SecurityPolicy securityPolicy)
      The Transport Layer Security (TLS) version + cipher suite for this domain name.

      Default: SecurityPolicy.TLS_1_2

      Parameters:
      securityPolicy - The Transport Layer Security (TLS) version + cipher suite for this domain name. This parameter is required.
      Returns:
      this
      See Also:
    • mapping

      @Stability(Stable) public DomainName.Builder mapping(IRestApi mapping)
      If specified, all requests to this domain will be mapped to the production deployment of this API.

      If you wish to map this domain to multiple APIs with different base paths, use addBasePathMapping or addApiMapping.

      Default: - you will have to call `addBasePathMapping` to map this domain to API endpoints.

      Parameters:
      mapping - If specified, all requests to this domain will be mapped to the production deployment of this API. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public DomainName build()
      Specified by:
      build in interface software.amazon.jsii.Builder<DomainName>
      Returns:
      a newly built instance of DomainName.