本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
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 屬性
AWS::Serverless::HttpApi 指定 的 StageName 屬性時, AWS SAM 會產生 AWS::ApiGatewayV2::Stage AWS CloudFormation 資源。
AWS::ApiGatewayV2::Stage-
LogicalId:<httpapi‑LogicalId><stage‑name>Stage是<stage‑name>StageName屬性設定為 的字串。例如,如果您將StageName設定為Gamma,則LogicalId為:MyHttpApiGammaStage。可參考屬性:
<httpapi‑LogicalId>.Stage
未指定 StageName 屬性
AWS::Serverless::HttpApi 未指定 的 StageName 屬性時, AWS SAM 會產生 AWS::ApiGatewayV2::Stage AWS CloudFormation 資源。
AWS::ApiGatewayV2::Stage-
LogicalId:<httpapi‑LogicalId>ApiGatewayDefaultStage可參考屬性:
<httpapi‑LogicalId>.Stage
已指定 DomainName 屬性
Domain AWS::Serverless::HttpApi 指定 屬性DomainName時, AWS SAM 會產生 AWS::ApiGatewayV2::DomainName AWS CloudFormation 資源。
AWS::ApiGatewayV2::DomainName-
LogicalId:ApiGatewayDomainNameV2<sha>是建立堆疊時產生的唯一雜湊值。例如,<sha>ApiGatewayDomainNameV2926eeb5ff1。可參考屬性:
<httpapi‑LogicalId>.DomainName