edit-icon download-icon

ALIYUN::ApiGateway::Deployment

Last Updated: Jun 13, 2018

ALIYUN::ApiGateway::Deployment can be used to release an API to a specified running stage, or switch a released API to a specified version.

Syntax

  1. {
  2. "Type" : "ALIYUN::ApiGateway::Deployment",
  3. "Properties" : {
  4. "HistoryVersion" : String,
  5. "ApiId" : String,
  6. "Description" : String,
  7. "StageName" : String,
  8. "GroupId" : String
  9. }
  10. }

Attribute

Attribute name Type Required Update allowed Description
ApiId string Yes No API ID
StageName string Yes Yes Running stage name. Values: TEST, PRE, or RELEASE
GroupId string Yes No API group ID.
HistoryVersion string No Yes If this parameter is specified, switch the released API to a specified version. If this parameter is not specified, release the API. StageName and HistoryVersion cannot be updated at the same time
Description string No Yes Remarks of the release.

Example

  1. {
  2. "ROSTemplateFormatVersion": "2015-09-01",
  3. "Parameters": {
  4. "GroupId": {
  5. "Type": "String",
  6. "Description": "API group ID"
  7. },
  8. "ApiId": {
  9. "Type": "String",
  10. "Description": "API ID"
  11. }
  12. },
  13. "Resources": {
  14. "Deployment": {
  15. "Type": "ALIYUN::ApiGateway::Deployment",
  16. "Properties": {
  17. "GroupId": {
  18. "Ref": "GroupId"
  19. },
  20. "ApiId": {
  21. "Ref": "ApiId"
  22. },
  23. "StageName": "PRE",
  24. "Description": "TEST_ONLY_CHANGE"
  25. }
  26. }
  27. }
  28. }
Thank you! We've received your feedback.