AWS CloudFormation 指定時產生 AWS::Serverless::HttpApi 的資源 - AWS Serverless Application Model

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

AWS CloudFormation 指定時產生 AWS::Serverless::HttpApi 的資源

指定AWS::Serverless::HttpApi時, AWS Serverless Application Model (AWS SAM) 會產生AWS::ApiGatewayV2::Api基底 AWS CloudFormation 資源。

AWS::ApiGatewayV2::Api

LogicalId: <httpapi‑LogicalId>

可參考屬性:N/A (您必須使用LogicalId來參照此 AWS CloudFormation 資源)

除了此資 AWS CloudFormation 源之外,如果AWS::Serverless::HttpApi有指定, AWS SAM 也會針對下列案例產生 AWS CloudFormation 資源:

StageName屬性已指定

指定的StageName屬性時, AWS SAM 會產生資AWS::ApiGatewayV2::Stage AWS CloudFormation 源。AWS::Serverless::HttpApi

AWS::ApiGatewayV2::Stage

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

<stage‑name>是屬StageName性設定的字串。例如,如果您設定StageNameGamma,則LogicalId為:MyHttpApiGamma舞台。

可引用的屬性:<httpapi‑LogicalId>.Stage

StageName未指定屬性

指定的StageNameAWS::Serverless::HttpApi性時, AWS SAM 會產生資AWS::ApiGatewayV2::Stage AWS CloudFormation 源。

AWS::ApiGatewayV2::Stage

LogicalId: <httpapi‑LogicalId>ApiGatewayDefaultStage

可引用的屬性:<httpapi‑LogicalId>.Stage

DomainName屬性已指定

當指定的DomainNameDomain性的屬性AWS::Serverless::HttpApi時, AWS SAM 會產生資AWS::ApiGatewayV2::DomainName AWS CloudFormation 源。

AWS::ApiGatewayV2::DomainName

LogicalId: ApiGatewayDomainNameV2<sha>

<sha>是建立堆疊時產生的唯一雜湊值。例如,ApiGatewayDomainNameV2926 電子郵件 1。

可引用的屬性:<httpapi‑LogicalId>.DomainName