You can call this operation to query the list of stacks.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListStacks

The operation that you want to perform. Set the value to ListStacks.

RegionId String Yes cn-hangzhou

The region ID of the stack. You can call the DescribeRegions operation to query the most recent region list.

StackName.N RepeatList No MyStack

The name of stack N. The name must be unique among different stacks. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.

Status.N RepeatList No CREATE_COMPLETE

The status of stack N.

Valid values:

  • CREATE_IN_PROGRESS
  • CREATE_FAILED
  • CREATE_COMPLETE
  • UPDATE_IN_PROGRESS
  • UPDATE_FAILED
  • UPDATE_COMPLETE
  • DELETE_IN_PROGRESS
  • DELETE_FAILED
  • DELETE_COMPLETE
  • ROLLBACK_IN_PROGRESS
  • ROLLBACK_FAILED
  • ROLLBACK_COMPLETE
  • CHECK_IN_PROGRESS
  • CHECK_FAILED
  • CHECK_COMPLETE
  • REVIEW_IN_PROGRESS
ParentStackId String No xxxx

The ID of the parent stack. The ID is used for displaying nested stacks.

ShowNestedStack Boolean No true

Specifies whether to display nested stacks. This parameter takes effect only when the ParentStackId parameter is specified.

PageNumber Long No 1

The number of the page to return. Pages start from page 1.

Default value: 1.

PageSize Long No 10

The number of entries to return on each page. Maximum value: 100.

Default value: 10.

Response parameters

Parameter Type Example Description
Stacks

The list of stacks.

CreateTime String 2019-08-01T04:07:39

The time when the task was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format. The time is displayed in UTC.

DisableRollback Boolean false

Indicates whether rollback for stack creation failure is disabled. Default value: false. Valid values:

  • true: indicates that rollback is not performed when a stack fails to be created.
  • false: indicates that rollback is performed when a stack fails to be created.
ParentStackId String xxxxxxx

The ID of the parent stack.

RegionId String cn-hangzhou

The region ID of the stack. You can call the DescribeRegions operation to query the most recent region list.

StackId String 4a6c9851-3b0f-4f5f-b4ca-a14bf691f2ff

The ID of the stack.

StackName String MyStack

The name of the stack.

Status String CREATE_COMPLETE

The status of the stack.

Valid values:

  • CREATE_IN_PROGRESS
  • CREATE_FAILED
  • CREATE_COMPLETE
  • UPDATE_IN_PROGRESS
  • UPDATE_FAILED
  • UPDATE_COMPLETE
  • DELETE_IN_PROGRESS
  • DELETE_FAILED
  • DELETE_COMPLETE
  • ROLLBACK_IN_PROGRESS
  • ROLLBACK_FAILED
  • ROLLBACK_COMPLETE
  • CHECK_IN_PROGRESS
  • CHECK_FAILED
  • CHECK_COMPLETE
  • REVIEW_IN_PROGRESS
StatusReason String Stack successfully created

The reason that the stack is in its current status.

TimeoutInMinutes Integer 10

The timeout period that is specified for the stack creation request. Unit: minutes.

UpdateTime String 2019-08-01T04:07:39

The time when the task was last updated. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format. The time is displayed in UTC.

PageSize Integer 10

The number of entries returned per page. Maximum value: 100.

Default value: 10.

PageNumber Integer 1

The page number of the returned page.

TotalCount Integer 1

The total number of stacks.

RequestId String B288A0BE-D927-4888-B0F7-B35EF84B6E6F

The ID of the request.

Examples

Sample requests


http(s)://ros.aliyuncs.com/? Action=ListStacks
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<ListStacksResponse>
      <Stacks>
            <Stack>
                  <StackId>4a6c9851-3b0f-4f5f-b4ca-a14bf691f2ff</StackId>
                  <ParentStackId>xxxx</ParentStackId>
                  <StackName>StackName</StackName>
                  <RegionId>cn-hangzhou</RegionId>
                  <DisableRollback>false</DisableRollback>
                  <CreationTime>2019-08-01T04:07:39</CreationTime>
                  <Status>CREATE_COMPLETE</Status>
                  <StatusReason>Stack successfully created</StatusReason>
                  <TimeoutInMinutes>10</TimeoutInMinutes>
                  <UpdatedTime>2019-08-01T04:07:39</UpdatedTime>
            </Stack>
      </Stacks>
      <PageNumber>1</PageNumber>
      <PageSize>10</PageSize>
      <TotalCount>1</TotalCount>
      <RequestId>B288A0BE-D927-4888-B0F7-B35EF84B6E6F</RequestId>    
</ListStacksResponse>

JSON format

{
	"PageNumber":1,
	"TotalCount":1,
	"PageSize":10,
	"RequestId":"B288A0BE-D927-4888-B0F7-B35EF84B6E6F",
	"Stacks":[
		{
			"CreationTime":"2019-08-01T04:07:39",
			"StatusReason":"Stack successfully created",
			"Status":"CREATE_COMPLETE",
			"TimeoutInMinutes":10,
			"ParentStackId":"xxxxxxx",
			"StackId":"4a6c9851-3b0f-4f5f-b4ca-a14bf691f2ff",
			"RegionId":"cn-hangzhou",
			"UpdatedTime":"2019-08-01T04:07:39",
			"DisableRollback":false,
			"StackName":"MyStack"
		}
	]
}

Error codes

For a list of error codes, visit the API Error Center.