ALIYUN::ApiGateway::Deployment is used to release an API to a specified runtime environment, or switch a released API to a specified version.

Syntax

{
  "Type": "ALIYUN::ApiGateway::Deployment",
  "Properties": {
    "HistoryVersion": String ,
    "ApiId": String ,
    "Description": String ,
    "StageName": String ,
    "GroupId": String 
  }
}

Properties

Property Type Required Editable Description Constraint
ApiId String Yes No The ID of the API. None.
StageName String Yes Yes The name of the runtime environment. Valid values:
  • TEST
  • PRE
  • RELEASE
You cannot specify both the HistoryVersion and StageName parameters at the same time.
GroupId String Yes No The ID of the API group. None.
HistoryVersion String No Yes The history version of the API. If this parameter is specified, the released API is switched to the specified version. If this parameter is not specified, the API is released. You cannot specify both the HistoryVersion and StageName parameters at the same time.
Description String No Yes The description of the current release. None.

Response parameters

Fn::GetAtt

None.

Examples

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "GroupId": {
      "Type": "String ",
      "Description": "API group ID"
    },
    "ApiId": {
      "Type": "String ",
      "Description": "API ID"
    }
  },
  "Resources": {
    "Deployment": {
      "Type": "ALIYUN::ApiGateway::Deployment",
      "Properties": {
        "GroupId": {
          "Ref": "GroupId"
        },
        "ApiId": {
          "Ref": "ApiId"
        },
        "StageName": "PRE",
        "Description": "TEST_ONLY_CHANGE"
      }
    }
  }
}