Skip to content

Latest commit

 

History

History
88 lines (70 loc) · 6.31 KB

sam-property-api-domainconfiguration.md

File metadata and controls

88 lines (70 loc) · 6.31 KB

DomainConfiguration

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](#sam-api-domainconfiguration-basepath): List
  [CertificateArn](#sam-api-domainconfiguration-certificatearn): String
  [DomainName](#sam-api-domainconfiguration-domainname): String
  [EndpointConfiguration](#sam-api-domainconfiguration-endpointconfiguration): String
  [MutualTlsAuthentication](#sam-api-domainconfiguration-mutualtlsauthentication): [MutualTlsAuthentication](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html#cfn-apigateway-domainname-mutualtlsauthentication)
  [Route53](#sam-api-domainconfiguration-route53): Route53Configuration
  [SecurityPolicy](#sam-api-domainconfiguration-securitypolicy): 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 [BasePath](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html#cfn-apigateway-basepathmapping-basepath) property of an AWS::ApiGateway::BasePathMapping resource. AWS SAM creates multiple AWS::ApiGateway::BasePathMapping resources, one per BasePath specified in this property.

CertificateArn The Amazon Resource Name (ARN) of an AWS managed certificate this domain name's endpoint. AWS Certificate Manager is the only supported source.
Type: String
Required: Yes
AWS CloudFormation compatibility: This property is similar to the [CertificateArn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html#cfn-apigateway-domainname-certificatearn) property of an AWS::ApiGateway::DomainName resource. If EndpointConfiguration is set to REGIONAL (the default value), CertificateArn maps to RegionalCertificateArn in AWS::ApiGateway::DomainName. If the EndpointConfiguration is set to EDGE, CertificateArn maps to CertificateArn in AWS::ApiGateway::DomainName.
Additional notes: For an EDGE endpoint, you must create the certificate in the us-east-1 AWS Region.

DomainName The custom domain name for your API Gateway API. Uppercase letters are not supported.
AWS SAM generates an AWS::ApiGateway::DomainName resource 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.
Type: String
Required: Yes
AWS CloudFormation compatibility: This property is passed directly to the [DomainName](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html#cfn-apigateway-domainname-domainname) property of an AWS::ApiGateway::DomainName resource.

EndpointConfiguration Defines the type of API Gateway endpoint to map to the custom domain. The value of this property determines how the CertificateArn property is mapped in AWS CloudFormation.
Valid values: REGIONAL or EDGE
Type: String
Required: No
Default: REGIONAL
AWS 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 [MutualTlsAuthentication](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html#cfn-apigateway-domainname-mutualtlsauthentication) property of an AWS::ApiGateway::DomainName resource.

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 plus cipher suite for this domain name.
Type: String
Required: No
AWS CloudFormation compatibility: This property is passed directly to the [SecurityPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html#cfn-apigateway-domainname-securitypolicy) property of an AWS::ApiGateway::DomainName resource.

Examples

DomainName

DomainName example

YAML

Domain:
  DomainName: www.example.com
  CertificateArn: arn-example
  EndpointConfiguration: EDGE
  Route53:
    HostedZoneId: Z1PA6795UKMFR9
  BasePath:
    - /foo
    - /bar