You can call this operation to query the list of stack instances associated with a stack group.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListStackInstances |
The operation that you want to perform. Set the value to ListStackInstances. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the stack. You can call the DescribeRegions operation to query the most recent region list. |
StackGroupName | String | Yes | MyStackGroup |
The name of the stack group. The name must be unique in a region. 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. |
StackInstanceAccountId | String | No | 12**** |
The account to which the stack instance belongs. |
StackInstanceRegionId | String | No | cn-beijing |
The region ID of the stack instance. |
PageSize | Long | No | 10 |
The number of entries to return per page. Valid values: 1 to 50. Default value: 10. |
PageNumber | Long | No | 1 |
The number of the page to return. Pages start from page 1. Default value: 1. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageNumber | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 10 |
The number of entries returned per page. |
RequestId | String | 14A07460-EBE7-47CA-9757-12CC4761D47A |
The ID of the request. |
StackInstances | Array |
The list of stack instances. |
|
AccountId | String | 12**** |
The account to which the stack instance belongs. |
DriftDetectionTime | String | 2020-02-27T07:47:47 |
The time when the last successful drift detection operation was initiated. |
RegionId | String | cn-beijing |
The region ID of the stack instance. |
StackDriftStatus | String | IN_SYNC |
The drift status of the stack in the last successful drift detection. Valid values:
|
StackGroupId | String | fd0ddef9-9540-4b42-a464-94f77835**** |
The ID of the stack group. |
StackGroupName | String | MyStackGroup |
The name of the stack group. |
StackId | String | 35ad60e3-6a92-42d8-8812-f0700d45**** |
The ID of the stack corresponding to the stack instance. |
Status | String | CURRENT |
The status of the stack instance. Valid values:
|
StatusReason | String | User initiated stop |
The reason why the stack has the current status. |
TotalCount | Integer | 1 |
The total number of queried entries. |
Examples
Sample requests
http(s)://ros.aliyuncs.com/? Action=ListStackInstances
&RegionId=cn-hangzhou
&StackGroupName=MyStackGroup
&<Common request parameters>
Sample success responses
XML
format
<ListStackInstancesResponse>
<PageNumber>1</PageNumber>
<TotalCount>1</TotalCount>
<PageSize>10</PageSize>
<StackInstances>
<StatusReason></StatusReason>
<Status>CURRENT</Status>
<StackGroupId>fd0ddef9-9540-4b42-a464-94f77835****</StackGroupId>
<AccountId>12****</AccountId>
<StackId>35ad60e3-6a92-42d8-8812-f0700d45****</StackId>
<StackGroupName>MyStackGroup</StackGroupName>
<RegionId>cn-hangzhou</RegionId>
<DriftDetectionTime>2020-02-27T07:47:47</DriftDetectionTime>
<StackDriftStatus>IN_SYNC</StackDriftStatus>
</StackInstances>
<RequestId>85DE34BD-7FF9-480F-8C21-556E9DA93ACD</RequestId>
</ListStackInstancesResponse>
JSON
format
{
"PageNumber": 1,
"TotalCount": 1,
"PageSize": 10,
"StackInstances": [
{
"StatusReason": "",
"Status": "CURRENT",
"StackGroupId": "fd0ddef9-9540-4b42-a464-94f77835****",
"AccountId": "12****",
"StackId": "35ad60e3-6a92-42d8-8812-f0700d45****",
"StackGroupName": "MyStackGroup",
"RegionId": "cn-hangzhou",
"DriftDetectionTime": "2020-02-27T07:47:47",
"StackDriftStatus": "IN_SYNC"
}
],
"RequestId": "85DE34BD-7FF9-480F-8C21-556E9DA93ACD"
}
Error codes
For a list of error codes, visit the API Error Center.
Error code |
Error message |
HTTP status code |
Description |
---|---|---|---|
InvalidParameter |
The specified parameter {name} is invalid, {reason}. |
400 |
The error message returned because the specified parameter is invalid. name indicates the parameter name, and reason indicates the reason for the error. |
StackGroupNotFound |
The StackGroup ({name}) could not be found. |
404 |
The error message returned because the specified stack group does not exist. name indicates the stack group name. |