Amazon CloudFormation resources generated when AWS::Serverless::HttpApi is specified - 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).

Amazon CloudFormation resources generated when AWS::Serverless::HttpApi is specified

When an AWS::Serverless::HttpApi is specified, Amazon Serverless Application Model (Amazon SAM) generates an AWS::ApiGatewayV2::Api base Amazon CloudFormation resource.

AWS::ApiGatewayV2::Api

LogicalId: <httpapi‑LogicalId>

Referenceable property: N/A (you must use the LogicalId to reference this Amazon CloudFormation resource)

In addition to this Amazon CloudFormation resource, when AWS::Serverless::HttpApi is specified, Amazon SAM also generates Amazon CloudFormation resources for the following scenarios:

StageName property is specified

When the StageName property of an AWS::Serverless::HttpApi is specified, Amazon SAM generates the AWS::ApiGatewayV2::Stage Amazon CloudFormation resource.

AWS::ApiGatewayV2::Stage

LogicalId: <httpapi‑LogicalId><stage‑name>Stage

<stage‑name> is the string that the StageName property is set to. For example, if you set StageName to Gamma, the LogicalId is: MyHttpApiGammaStage.

Referenceable property: <httpapi‑LogicalId>.Stage

StageName property is not specified

When the StageName property of an AWS::Serverless::HttpApi is not specified, Amazon SAM generates the AWS::ApiGatewayV2::Stage Amazon CloudFormation resource.

AWS::ApiGatewayV2::Stage

LogicalId: <httpapi‑LogicalId>ApiGatewayDefaultStage

Referenceable property: <httpapi‑LogicalId>.Stage

DomainName property is specified

When the DomainName property of the Domain property of an AWS::Serverless::HttpApi is specified, Amazon SAM generates the AWS::ApiGatewayV2::DomainName Amazon CloudFormation resource.

AWS::ApiGatewayV2::DomainName

LogicalId: ApiGatewayDomainNameV2<sha>

<sha> is a unique hash value that is generated when the stack is created. For example, ApiGatewayDomainNameV2926eeb5ff1.

Referenceable property: <httpapi‑LogicalId>.DomainName