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

Name Type Required Editable Description
ApiId String Yes No The ID of the API.
StageName String Yes Yes The name of the runtime environment. Valid values: TEST, PRE, and RELEASE.
GroupId String Yes No The ID of the API group.
HistoryVersion String No Yes The history version of the API. If this parameter is specified, the released API is switched to a specified version. If this parameter is not specified, the API is released. You cannot update both this parameter and the StageName parameter.
Description String No Yes The description of the current release.

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"
      }
    }
  }
}