AWS CloudFormation resources generated when AWS::Serverless::HttpApi is specified
When an AWS::Serverless::HttpApi
is specified, AWS Serverless Application Model
(AWS SAM) generates an AWS::ApiGatewayV2::Api
base AWS CloudFormation resource.
AWS::ApiGatewayV2::Api
-
LogicalId
:<httpapi‑LogicalId>
Referenceable property: N/A (you must use the
LogicalId
to reference this AWS CloudFormation resource)
In addition to this AWS CloudFormation resource, when AWS::Serverless::HttpApi
is
specified, AWS SAM also generates AWS CloudFormation resources for the following scenarios:
Scenarios
StageName property is specified
When the StageName
property of an AWS::Serverless::HttpApi
is specified, AWS SAM generates the AWS::ApiGatewayV2::Stage
AWS CloudFormation
resource.
AWS::ApiGatewayV2::Stage
-
LogicalId
:<httpapi‑LogicalId>
<stage‑name>
Stage
is the string that the<stage‑name>
StageName
property is set to. For example, if you setStageName
toGamma
, theLogicalId
is:MyHttpApiGamma
Stage.Referenceable property:
<httpapi‑LogicalId>
.Stage
StageName property is not specified
When the StageName
property of an AWS::Serverless::HttpApi
is not specified, AWS SAM generates the
AWS::ApiGatewayV2::Stage
AWS CloudFormation resource.
AWS::ApiGatewayV2::Stage
-
LogicalId
:<httpapi‑LogicalId>
ApiGatewayDefaultStageReferenceable property:
<httpapi‑LogicalId>
.Stage
DomainName property is specified
When the DomainName
property of the Domain
property of an
AWS::Serverless::HttpApi
is specified, AWS SAM generates the
AWS::ApiGatewayV2::DomainName
AWS CloudFormation resource.
AWS::ApiGatewayV2::DomainName
-
LogicalId
:ApiGatewayDomainNameV2
<sha>
is a unique hash value that is generated when the stack is created. For example,<sha>
ApiGatewayDomainNameV2
926eeb5ff1
.Referenceable property:
<httpapi‑LogicalId>
.DomainName