AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

DomainName

Custom domain resource for the API.

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as DomainNameProps.

domainNameRequired
string

The custom domain name.

mtlsOptional
MTLSConfig

The mutual TLS authentication configuration for a custom domain name.

Default: - mTLS is not configured.

6 properties inherited from EndpointOptions
certificateRequiredinherited from EndpointOptions
ICertificateRef

The ACM certificate for this domain name. Certificate can be both ACM issued or imported.

certificateNameOptionalinherited from EndpointOptions
string

The user-friendly name of the certificate that will be used by the endpoint for this domain name.

Default: - No friendly certificate name

endpointTypeOptionalinherited from EndpointOptions
EndpointType

The type of endpoint for this DomainName.

Default: EndpointType.REGIONAL

ipAddressTypeOptionalinherited from EndpointOptions
IpAddressType

The IP address types that can invoke the API.

Default: undefined - AWS default is IPV4

ownershipCertificateOptionalinherited from EndpointOptions
ICertificateRef

A public certificate issued by ACM to validate that you own a custom domain. This parameter is required only when you configure mutual TLS authentication and you specify an ACM imported or private CA certificate for `certificate`. The ownership certificate validates that you have permissions to use the domain name.

Default: - only required when configuring mTLS

securityPolicyOptionalinherited from EndpointOptions
SecurityPolicy

The Transport Layer Security (TLS) version + cipher suite for this domain name.

Default: SecurityPolicy.TLS_1_2

Learn AWS the Practical Way

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

Subscribe to Newsletter