DomainNameOptions Struct
Example
ts
declare const acmCertificateForExampleCom: any;
const api = new apigateway.RestApi(this, 'MyDomain', {
domainName: {
domainName: 'example.com',
certificate: acmCertificateForExampleCom,
},
});
Properties
basePathstringbase_pathstrbasePathStringBasePathstringBasePath*string= map requests from the domain roo…#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
Default: map requests from the domain root (e.g. example.com).
certificateICertificateRefcertificateICertificateRefcertificateICertificateRefCertificateICertificateRefCertificateICertificateRefrequired#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.
The custom domain name for your API.
Uppercase letters are not supported.
endpointAccessModeEndpointAccessModeendpoint_access_modeEndpointAccessModeendpointAccessModeEndpointAccessModeEndpointAccessModeEndpointAccessModeEndpointAccessModeEndpointAccessMode= No endpoint access mode is confi…#The endpoint access mode for this domain name.
notes · default
When using enhanced security policies (those starting with SecurityPolicy_), you must specify this property. STRICT is recommended for production workloads, but BASIC may be needed during migration or for certain application architectures.
Default: No endpoint access mode is configured. Required for enhanced security policies.
endpointTypeEndpointTypeendpoint_typeEndpointTypeendpointTypeEndpointTypeEndpointTypeEndpointTypeEndpointTypeEndpointType= REGIONAL#The type of endpoint for this DomainName.
The mutual TLS authentication configuration for a custom domain name.
securityPolicySecurityPolicysecurity_policySecurityPolicysecurityPolicySecurityPolicySecurityPolicySecurityPolicySecurityPolicySecurityPolicy= SecurityPolicy.TLS_1_2#The Transport Layer Security (TLS) version + cipher suite for this domain name.