View a markdown version of this page

WebSocketApiDomainConfiguration - Amazon Serverless Application Model
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

WebSocketApiDomainConfiguration

Configures a custom domain for a WebSocket API.

Syntax

To declare this entity in your Amazon Serverless Application Model (Amazon SAM) template, use the following syntax.

Properties

BasePath

A list of the basepaths to configure with the Amazon API Gateway domain name.

Type: List

Required: No

Default: /

Amazon CloudFormation compatibility: This property is similar to the ApiMappingKey property of an AWS::ApiGatewayV2::ApiMapping resource. Amazon SAM creates multiple AWS::ApiGatewayV2::ApiMapping resources, one per value specified in this property.

CertificateArn

The Amazon Resource Name (ARN) of an Amazon managed certificate for this domain name's endpoint. Amazon Certificate Manager is the only supported source.

Type: String

Required: Yes

Amazon CloudFormation compatibility: This property is passed directly to the CertificateArn property of an AWS::ApiGatewayV2::DomainName DomainNameConfiguration resource.

DomainName

The custom domain name for your API Gateway WebSocket API. Uppercase letters are not supported.

Amazon SAM generates an AWS::ApiGatewayV2::DomainName resource when this property is set. For information about generated Amazon CloudFormation resources, see Generated Amazon CloudFormation resources for Amazon SAM.

Type: String

Required: Yes

Amazon CloudFormation compatibility: This property is passed directly to the DomainName property of an AWS::ApiGatewayV2::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 Amazon CloudFormation.

The only valid value for WebSocket APIs is REGIONAL.

Type: String

Required: No

Default: REGIONAL

Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn't have an Amazon CloudFormation equivalent.

Route53

Defines an Route 53 configuration.

Type: Route53Configuration

Required: No

Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn't have an Amazon CloudFormation equivalent.

SecurityPolicy

The TLS version of the security policy for this domain name.

The only valid value for WebSocket APIs is TLS_1_2.

Type: String

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the SecurityPolicy property of the AWS::ApiGatewayV2::DomainName DomainNameConfiguration data type.

Examples

DomainName

DomainName example

YAML

Domain: DomainName: ws.example.com CertificateArn: arn:aws:acm:us-east-1:123456789012:certificate/example EndpointConfiguration: REGIONAL Route53: HostedZoneId: Z1PA6795UKMFR9 BasePath: - v1 - v2