全部产品
阿里云办公

废弃资源栈

更新时间:2018-02-28 11:50:24

通过 DELETE 方法调用 /stacks/{StackName}/{StackId}/abandon 可废弃某个资源栈,但是保留该资源栈下的所有资源。

请求参数

名称 位置 类型 是否必须 描述
StackName URI String 资源栈名称,需符合该正则表达式^[a-zA-Z][a-zA-Z0-9_.-]*$。长度不超过 255 个字符。
StackId URI String 资源栈 ID。
RegionId Query String 创建资源栈时,指定的地域。

返回参数

名称 参数类型 描述
Id String 资源栈的 ID
Name String 资源栈的名称
Action String 操作
Status String 状态
Template Json 模板
Resources Json 资源
Environment Json 环境

错误码

错误代码 描述 Http状态码 语义
InternalError Server error 500 服务器端出现未知异常。
StackNotFound The Stack (%(stack_name)s) could not be found. 404 资源栈不存在。

示例

请求示例

  1. DELETE http://ros.aliyuncs.com/stacks/myStack/28087440-3701-40ef-bbe8-6e80787d307f/abandon HTTP/1.1
  2. x-acs-signature-method: HMAC-SHA1
  3. Authorization: acs ACSTQDkNtSMrZtwL:3TCZAbfoSw8bpVeg/X5Uag1KgM8=
  4. Date: Fri, 11 Sep 2015 05:30:02 GMT
  5. x-acs-signature-version: 1.0
  6. x-sdk-client: Java/2.0.0
  7. Accept: application/octet-stream
  8. x-acs-version: 2015-09-01
  9. Cache-Control: no-cache
  10. Pragma: no-cache
  11. User-Agent: Java/1.6.0_27
  12. Host: ros.aliyuncs.com
  13. Connection: keep-alive

返回示例

  1. HTTP/1.1 200 OK
  2. Date: Fri, 11 Sep 2015 05:29:18 GMT
  3. Content-Type: application/json; charset=UTF-8
  4. Content-Length: 521
  5. Connection: close
  6. Access-Control-Allow-Origin: *
  7. Access-Control-Allow-Methods: POST, GET, OPTIONS
  8. Access-Control-Allow-Headers: X-Requested-With, X-Sequence, _aop_secret, _aop_signature
  9. Access-Control-Max-Age: 172800
  10. X-Acs-Request-Id: 8E3F90A8-2F10-443E-9F54-4895CFEFD342
  11. Server: Jetty(7.2.2.v20101205)
  12. {
  13. "Status" : "COMPLETE",
  14. "Name" : "test",
  15. "Environment" : {
  16. "parameter_defaults" : {},
  17. "parameters" : {},
  18. "resource_registry" : {
  19. "resources" : {}
  20. }
  21. },
  22. "Template" : {
  23. "Outputs" : {
  24. "secret1_v" : {
  25. "Description" : "secret1",
  26. "Value" : {
  27. "get_attr" : ["secret1", "value"]
  28. }
  29. }
  30. },
  31. "Resources" : {
  32. "secret1" : {
  33. "Type" : "ALIYUN::RandomString"
  34. },
  35. "securet3" : {
  36. "Type" : "ALIYUN::RandomString",
  37. "Properties" : {
  38. "length" : 100,
  39. "sequence" : "octdigits"
  40. }
  41. },
  42. "securet2" : {
  43. "Type" : "ALIYUN::RandomString",
  44. "Properties" : {
  45. "length" : 10
  46. }
  47. }
  48. },
  49. "ROSTemplateFormatVersion" : "2015-09-01"
  50. },
  51. "Action" : "CREATE",
  52. "Id" : "698ac08a-239d-4f2c-9609-afda80823531",
  53. "Resources" : {
  54. "secret1" : {
  55. "status" : "COMPLETE",
  56. "name" : "secret1",
  57. "resource_data" : {
  58. "value" : "ccsE2UZXxWX4oqu0lUpFqaZFulSc70jx"
  59. },
  60. "resource_id" : "test-secret1-x7equc4ngnfw",
  61. "action" : "CREATE",
  62. "type" : "ALIYUN::RandomString",
  63. "metadata" : {}
  64. },
  65. "securet3" : {
  66. "status" : "COMPLETE",
  67. "name" : "securet3",
  68. "resource_data" : {
  69. "value" : "asfdasdf"
  70. },
  71. "resource_id" : "test-securet3-hj5nvc7xaerg",
  72. "action" : "CREATE",
  73. "type" : "ALIYUN::RandomString",
  74. "metadata" : {}
  75. },
  76. "securet2" : {
  77. "status" : "COMPLETE",
  78. "name" : "securet2",
  79. "resource_data" : {
  80. "value" : "qGOkT6QX61"
  81. },
  82. "resource_id" : "test-securet2-xehhwo52odw6",
  83. "action" : "CREATE",
  84. "type" : "ALIYUN::RandomString",
  85. "metadata" : {}
  86. }
  87. }
  88. }