AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::ApiGatewayV2::DomainName

CfnDomainName

The `AWS::ApiGatewayV2::DomainName` resource specifies a custom domain name for your API in Amazon API Gateway (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](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) in the *API Gateway Developer Guide* .

Import

import { CfnDomainName } from 'aws-cdk-lib/aws-apigatewayv2';

Or use the module namespace:

import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2';
// apigatewayv2.CfnDomainName

Properties

Configuration passed to the constructor as CfnDomainNameProps.

domainNameRequired
string

The custom domain name for your API in Amazon API Gateway. Uppercase letters and the underscore ( `_` ) character are not supported.

domainNameConfigurationsOptional
IResolvable | IResolvable | DomainNameConfigurationProperty[]

The domain name configurations.

mutualTlsAuthenticationOptional
IResolvable | MutualTlsAuthenticationProperty

The mutual TLS authentication configuration for a custom domain name.

routingModeOptional
string

The routing mode API Gateway uses to route traffic to your APIs.

Default: - "API_MAPPING_ONLY"

tagsOptional
{ [key: string]: string }

The collection of tags associated with a domain name.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter