AWS::ApiGatewayV2::Deployment - Amazon CloudFormation
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.

AWS::ApiGatewayV2::Deployment

The AWS::ApiGatewayV2::Deployment resource creates a deployment for an API.

Syntax

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

JSON

{ "Type" : "AWS::ApiGatewayV2::Deployment", "Properties" : { "ApiId" : String, "Description" : String, "StageName" : String } }

YAML

Type: AWS::ApiGatewayV2::Deployment Properties: ApiId: String Description: String StageName: String

Properties

ApiId

The API identifier.

Required: Yes

Type: String

Update requires: Replacement

Description

The description for the deployment resource.

Required: No

Type: String

Update requires: No interruption

StageName

The name of an existing stage to associate with the deployment.

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

DeploymentId

Not currently supported by Amazon CloudFormation.

Examples

Deployment creation example

The following example creates a deployment resource for the MyApi API, which has the MyRoute route defined.

JSON

{ "Deployment": { "Type": "AWS::ApiGatewayV2::Deployment", "DependsOn": [ "MyRoute" ], "Properties": { "Description": "My deployment", "ApiId": { "Ref": "MyApi" }, "StageName": "Beta" } } }

YAML

Deployment: Type: 'AWS::ApiGatewayV2::Deployment' DependsOn: - MyRoute Properties: Description: My deployment ApiId: !Ref MyApi StageName: Beta

See also