edit-icon download-icon

Query stack lists

Last Updated: May 18, 2018

Use GET method to call the URI (/stacks) to query stack lists.

Request parameters

Name Location Type Required Description
RegionId Query String Yes The ID of the region specified during the stack creation.
StackId Query String No Stack ID.
Name Query String No Name of the stack, which must comply with the regular expression ^[a-zA-Z][a-zA-Z0-9_.-]*$. It can contain up to 255 characters.
Status Query String No Stack status used by filter. Value options: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, and ROLLBACK_IN_PROGRESS.
PageNumber Query Integer No Page number of the stack list. The start value is 1, and the default value is 1.
PageSize Query Integer No Number of rows per page in the case of querying by page. The maximum value is 100, and the default value is 10.

Return parameters

Name Parameter type Description
TotalCount Integer Total number of stacks.
PageNumber Integer Page number of the stack list.
PageSize Integer Number of rows per page.
Stacks List Stack list.

Stack

Name Parameter type Description
Region String Region where the stack is located.
Id String Stack ID.
Name String Stack name.
Updated String Stack update time, which follows the ISO8601 standard and uses UTC time. The format is YYYY-MM-DDThh:mm:ssZ.
Created String Stack creation time, which follows the ISO8601 standard and uses UTC time. The format is YYYY-MM-DDThh:mm:ssZ.
StatusReason String Reason of the status.
Status String Stack status. Values: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, and ROLLBACK_IN_PROGRESS.
Description String Stack description.
DisableRollback Boolean Whether to disable rollback when the stack fails to be created. “True” indicates that rollback is disabled. That is, rollback is not performed when the stack creation fails. “False” indicates that rollback is not disabled. That is, rollback is performed when the stack creation fails.
TimeoutMins Integer Timeout for stack creation, in minutes.

Error codes

Error code Description HTTP status code Meaning
InternalError Server error. 500 Server-side unknown exception.
StackNotFound The Stack (%(stack_name)s) could not be found. 404 The stack does not exist.

Example

Request example

  1. GET http://ros.aliyuncs.com/stacks HTTP/1.1
  2. x-acs-signature-method: HMAC-SHA1
  3. Authorization: acs ACSTQDkNtSMrZtwL:E9tMDBiLOywWyO1NJubGXV2Dq08=
  4. Date: Fri, 11 Sep 2015 05:28:05 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. Host: ros.aliyuncs.com
  12. Connection: keep-alive

Response example

  1. HTTP/1.1 200 OK
  2. Date: Fri, 11 Sep 2015 05:28:06 GMT
  3. Content-Type: application/json; charset=UTF-8
  4. Content-Length: 945
  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: 1DD1048F-0B74-48EB-9364-E509C5072964
  11. {
  12. "TotalCount" : 5,
  13. "PageNumber" : 1,
  14. "Stacks" : [{
  15. "Status" : "CREATE_COMPLETE",
  16. "Updated" : null,
  17. "Description" : "No description",
  18. "Created" : "2015-10-23T07:54:29",
  19. "Region" : "cn-beijing",
  20. "StatusReason" : "Stack CREATE completed successfully",
  21. "DisableRollback" : true,
  22. "TimeoutMins" : 15,
  23. "Id" : "2669808f-c5e1-4777-85b9-5a2a39718cc4",
  24. "Name" : "hope_test_chinese"
  25. }, {
  26. "Status" : "CREATE_COMPLETE",
  27. "Updated" : null,
  28. "Description" : "No description",
  29. "Created" : "2015-10-23T05:17:59",
  30. "Region" : "cn-beijing",
  31. "StatusReason" : "Stack CREATE completed successfully",
  32. "DisableRollback" : true,
  33. "TimeoutMins" : 15,
  34. "Id" : "4cf2a4bd-c09c-4b4e-b2ab-d0e381108f45",
  35. "Name" : "hope_test_ScalingGroup"
  36. }
  37. ],
  38. "PageSize" : 2
  39. }
Thank you! We've received your feedback.