HttpApiDomainConfiguration
Configures a custom domain for an API.
Syntax
To declare this entity in your AWS Serverless Application Model (AWS SAM) template, use the following syntax.
YAML
BasePath:ListCertificateArn:StringDomainName:StringEndpointConfiguration:StringMutualTlsAuthentication:MutualTlsAuthenticationOwnershipVerificationCertificateArn:StringRoute53:Route53ConfigurationSecurityPolicy:String
Properties
-
BasePath -
A list of the basepaths to configure with the Amazon API Gateway domain name.
Type: List
Required: No
Default: /
AWS CloudFormation compatibility: This property is similar to the
ApiMappingKeyproperty of anAWS::ApiGatewayV2::ApiMappingresource. AWS SAM creates multipleAWS::ApiGatewayV2::ApiMappingresources, one per value specified in this property. -
CertificateArn -
The Amazon Resource Name (ARN) of an AWS managed certificate for this domain name's endpoint. AWS Certificate Manager is the only supported source.
Type: String
Required: Yes
AWS CloudFormation compatibility: This property is passed directly to the
CertificateArnproperty of anAWS::ApiGateway2::DomainName DomainNameConfigurationresource. -
DomainName -
The custom domain name for your API Gateway API. Uppercase letters are not supported.
AWS SAM generates an
AWS::ApiGatewayV2::DomainNameresource when this property is set. For information about this scenario, see DomainName property is specified. For information about generated AWS CloudFormation resources, see Generated AWS CloudFormation resources for AWS SAM.Type: String
Required: Yes
AWS CloudFormation compatibility: This property is passed directly to the
DomainNameproperty of anAWS::ApiGateway2::DomainNameresource. -
EndpointConfiguration -
Defines the type of API Gateway endpoint to map to the custom domain. The value of this property determines how the
CertificateArnproperty is mapped in AWS CloudFormation.The only valid value for HTTP APIs is
REGIONAL.Type: String
Required: No
Default:
REGIONALAWS CloudFormation compatibility: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent.
-
MutualTlsAuthentication -
The mutual transport layer security (TLS) authentication configuration for a custom domain name.
Type: MutualTlsAuthentication
Required: No
AWS CloudFormation compatibility: This property is passed directly to the
MutualTlsAuthenticationproperty of anAWS::ApiGatewayV2::DomainNameresource. -
OwnershipVerificationCertificateArn -
The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Required only when you configure mutual TLS and you specify an ACM imported or private CA certificate ARN for the
CertificateArn.Type: String
Required: No
AWS CloudFormation compatibility: This property is passed directly to the
OwnershipVerificationCertificateArnproperty of theAWS::ApiGatewayV2::DomainNameDomainNameConfigurationdata type. -
Route53 -
Defines an Amazon RouteĀ 53 configuration.
Type: Route53Configuration
Required: No
AWS CloudFormation compatibility: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent.
-
SecurityPolicy -
The TLS version of the security policy for this domain name.
The only valid value for HTTP APIs is
TLS_1_2.Type: String
Required: No
AWS CloudFormation compatibility: This property is passed directly to the
SecurityPolicyproperty of theAWS::ApiGatewayV2::DomainNameDomainNameConfigurationdata type.
Examples
DomainName
DomainName example
YAML
Domain: DomainName: www.example.com CertificateArn: arn-example EndpointConfiguration: REGIONAL Route53: HostedZoneId: Z1PA6795UKMFR9 BasePath: - foo - bar