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.

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
  • CREATE_ROLLBACK_IN_PROGRESS
  • CREATE_ROLLBACK_FAILED
  • CREATE_ROLLBACK_COMPLETE
  • ROLLBACK_IN_PROGRESS
  • ROLLBACK_FAILED
  • ROLLBACK_COMPLETE
  • CHECK_IN_PROGRESS
  • CHECK_FAILED
  • CHECK_COMPLETE
  • REVIEW_IN_PROGRESS
  • IMPORT_CREATE_IN_PROGRESS
  • IMPORT_CREATE_FAILED
  • IMPORT_CREATE_COMPLETE
  • IMPORT_CREATE_ROLLBACK_IN_PROGRESS
  • IMPORT_CREATE_ROLLBACK_FAILED
  • IMPORT_CREATE_ROLLBACK_COMPLETE
  • IMPORT_UPDATE_IN_PROGRESS
  • IMPORT_UPDATE_FAILED
  • IMPORT_UPDATE_COMPLETE
  • IMPORT_UPDATE_ROLLBACK_IN_PROGRESS
  • IMPORT_UPDATE_ROLLBACK_FAILED
  • IMPORT_UPDATE_ROLLBACK_COMPLETE

Valid values of N: 1 to 5.

PageSize Long No 10

The number of entries to return on each page.

Maximum value: 50.

Default value: 10.

ParentStackId String No 4a6c9851-3b0f-4f5f-b4ca-a14bf691****

The ID of the parent stack.

StackName.N RepeatList No MyStack

The name of stack N.

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. Fuzzy search with an asterisk (*) is supported.

Valid values of N: 1 to 5.

PageNumber Long No 1

The number of the page to return.

Pages start from page 1.

Default value: 1.

ShowNestedStack Boolean No true

Specifies whether to display nested stacks. Default value: false. Valid values:

  • true
  • false
    Note This parameter is set to true if ParentStackId is specified.
Tag.N.Key String No usage

The key of tag N of the instance.

Valid values of N: 1 to 20.

Tag.N.Value String No test

The value of tag N of the instance.

Valid values of N: 1 to 20.

StackId String No 4a6c9851-3b0f-4f5f-b4ca-a14bf691****

The ID of the stack. If detailed information about the stack is not required, you can use this parameter to replace the GetStack operation.

Response parameters

Parameter Type Example Description
Stacks Array of Stack

The list of stacks.

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

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

DisableRollback Boolean false

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

  • true: disables rollback on stack creation failure.
  • false: enables rollback on stack creation failure.
DriftDetectionTime String 2020-02-27T07:47:47

The time when the last successful drift detection operation was initiated.

ParentStackId String 4a6c9851-3b0f-4f5f-b4ca-a14bf692****

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.

StackDriftStatus String IN_SYNC

The drift status of the stack in the last successful drift detection. Valid values:

  • DRIFTED: The stack has drifted.
  • NOT_CHECKED: No drift detection has been completed on the stack.
  • IN_SYNC: The stack is being synchronized.
StackId String 4a6c9851-3b0f-4f5f-b4ca-a14bf691****

The ID of the stack.

StackName String MyStack

The name of the stack.

StackType String ROS

The type of the stack. Valid values:

  • ROS: The stack uses an ROS template.
  • Terraform: The stack uses a Terraform template.
Status String 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
  • CREATE_ROLLBACK_IN_PROGRESS
  • CREATE_ROLLBACK_FAILED
  • CREATE_ROLLBACK_COMPLETE
  • ROLLBACK_IN_PROGRESS
  • ROLLBACK_FAILED
  • ROLLBACK_COMPLETE
  • CHECK_IN_PROGRESS
  • CHECK_FAILED
  • CHECK_COMPLETE
  • REVIEW_IN_PROGRESS
  • IMPORT_CREATE_IN_PROGRESS
  • IMPORT_CREATE_FAILED
  • IMPORT_CREATE_COMPLETE
  • IMPORT_CREATE_ROLLBACK_IN_PROGRESS
  • IMPORT_CREATE_ROLLBACK_FAILED
  • IMPORT_CREATE_ROLLBACK_COMPLETE
  • IMPORT_UPDATE_IN_PROGRESS
  • IMPORT_UPDATE_FAILED
  • IMPORT_UPDATE_COMPLETE
  • IMPORT_UPDATE_ROLLBACK_IN_PROGRESS
  • IMPORT_UPDATE_ROLLBACK_FAILED
  • IMPORT_UPDATE_ROLLBACK_COMPLETE
StatusReason String Stack successfully created

The reason why 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 stack was last updated. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

PageSize Integer 10

The number of entries returned per page.

Maximum value: 50.

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-a14bf691****</StackId>
            <ParentStackId>4a6c9851-3b0f-4f5f-b4ca-a14bf692****</ParentStackId>
            <StackName>StackName</StackName>
            <RegionId>cn-hangzhou</RegionId>
            <DisableRollback>false</DisableRollback>
            <CreateTime>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>
            <DriftDetectionTime>2020-02-27T07:47:47</DriftDetectionTime>
            <StackDriftStatus>IN_SYNC</StackDriftStatus>
            <StackType>ROS</StackType>
        </Stack>
    </Stacks>
    <PageNumber>1</PageNumber>
    <PageSize>10</PageSize>
    <TotalCount>1</TotalCount>
    <RequestId>B288A0BE-D927-4888-B0F7-B35EF84B6E6F</RequestId>    
</ListStacksResponse>

JSON format

{
    "Stacks": [
        {
            "StackId": "4a6c9851-3b0f-4f5f-b4ca-a14bf691****",
            "ParentStackId": "4a6c9851-3b0f-4f5f-b4ca-a14bf692****",
            "StackName": "MyStack",
            "RegionId": "cn-hangzhou",
            "DisableRollback": false,
            "CreateTime": "2019-08-01T04:07:39",
            "Status": "CREATE_COMPLETE",
            "StatusReason": "Stack successfully created",
            "TimeoutInMinutes": 10,
            "UpdatedTime": "2019-08-01T04:07:39",
            "DriftDetectionTime": "2020-02-27T07:47:47",
		    "StackDriftStatus": "IN_SYNC",
            "StackType": "ROS"
        }
    ],
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 1,
    "RequestId": "B288A0BE-D927-4888-B0F7-B35EF84B6E6F"    
}

Error codes

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