Cookie の設定を選択する

当社は、当社のサイトおよびサービスを提供するために必要な必須 Cookie および類似のツールを使用しています。当社は、パフォーマンス Cookie を使用して匿名の統計情報を収集することで、お客様が当社のサイトをどのように利用しているかを把握し、改善に役立てています。必須 Cookie は無効化できませんが、[カスタマイズ] または [拒否] をクリックしてパフォーマンス Cookie を拒否することはできます。

お客様が同意した場合、AWS および承認された第三者は、Cookie を使用して便利なサイト機能を提供したり、お客様の選択を記憶したり、関連する広告を含む関連コンテンツを表示したりします。すべての必須ではない Cookie を受け入れるか拒否するには、[受け入れる] または [拒否] をクリックしてください。より詳細な選択を行うには、[カスタマイズ] をクリックしてください。

AWS::ApiGateway::Deployment

フォーカスモード
AWS::ApiGateway::Deployment - AWS CloudFormation
このページはお客様の言語に翻訳されていません。 翻訳のリクエスト
フィルタビュー

The AWS::ApiGateway::Deployment resource deploys an API Gateway RestApi resource to a stage so that clients can call the API over the internet. The stage acts as an environment.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::ApiGateway::Deployment", "Properties" : { "DeploymentCanarySettings" : DeploymentCanarySettings, "Description" : String, "RestApiId" : String, "StageDescription" : StageDescription, "StageName" : String } }

YAML

Type: AWS::ApiGateway::Deployment Properties: DeploymentCanarySettings: DeploymentCanarySettings Description: String RestApiId: String StageDescription: StageDescription StageName: String

Properties

DeploymentCanarySettings

The input configuration for a canary deployment.

Required: No

Type: DeploymentCanarySettings

Update requires: Replacement

Description

The description for the Deployment resource to create.

Required: No

Type: String

Update requires: No interruption

RestApiId

The string identifier of the associated RestApi.

Required: Yes

Type: String

Update requires: Replacement

StageDescription

The description of the Stage resource for the Deployment resource to create. To specify a stage description, you must also provide a stage name.

Required: Conditional

Type: StageDescription

Update requires: No interruption

StageName

The name of the Stage resource for the Deployment resource to create.

Required: No

Type: String

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the deployment ID, such as 123abc.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

DeploymentId

The ID for the deployment. For example: abc123.

Examples

The following sections provide examples for declaring API Gateway deployments.

Deployment with an empty embedded stage

The following example deploys the MyApi API to a stage named DummyStage.

JSON

{ "Deployment": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "MyApi" }, "Description": "My deployment", "StageName": "DummyStage" } } }

YAML

Deployment: Type: 'AWS::ApiGateway::Deployment' Properties: RestApiId: !Ref MyApi Description: My deployment StageName: DummyStage

AWS::ApiGateway::Method Dependency

If you create an AWS::ApiGateway::RestApi resource and its methods (using AWS::ApiGateway::Method) in the same template as your deployment, the deployment must depend on the RestApi's methods. To create a dependency, add a DependsOn attribute to the deployment. If you don't, AWS CloudFormation creates the deployment right after it creates the RestApi resource that doesn't contain any methods, and AWS CloudFormation encounters the following error: The REST API doesn't contain any methods.

JSON

{ "Deployment": { "DependsOn": "MyMethod", "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "MyApi" }, "Description": "My deployment", "StageName": "DummyStage" } } }

YAML

Deployment: DependsOn: MyMethod Type: 'AWS::ApiGateway::Deployment' Properties: RestApiId: !Ref MyApi Description: My deployment StageName: DummyStage

See also

このページの内容

プライバシーサイト規約Cookie の設定
© 2025, Amazon Web Services, Inc. or its affiliates.All rights reserved.