Queries the details of the stack instances associated with a specified stack group in an Alibaba Cloud region.
Operation description
This topic provides an example on how to query the stack instances in the MyStackGroup stack group that uses the self-managed permissions mode in the China (Hangzhou) region.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:ListStackInstances |
get |
*StackInstance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the stack group. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| StackGroupName |
string |
Yes |
The name of the stack group. The name must be unique within a region. |
MyStackGroup |
| StackInstanceAccountId |
string |
No |
The ID of the execution account to which the stack belongs.
Note
For more information about execution accounts, see Overview. |
156552876021**** |
| StackInstanceRegionId |
string |
No |
The region to which the stack belongs. |
cn-beijing |
| PageSize |
integer |
No |
Settings for the number of entries per page during paging in a paged query.
|
10 |
| PageNumber |
integer |
No |
Settings for the page number during paging in a paged query.
|
1 |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The total number of stack instances. |
1 |
| RequestId |
string |
The request ID. |
85DE34BD-7FF9-480F-8C21-556E9DA93ACD |
| PageSize |
integer |
Settings for the number of entries per page during paging in a paged query. |
1 |
| PageNumber |
integer |
Settings for the page number during paging in a paged query. |
1 |
| StackInstances |
array<object> |
The stack instances. |
|
|
object |
|||
| Status |
string |
The status of the stack instance. Valid values:
|
CURRENT |
| StackGroupId |
string |
The ID of the stack group. |
fd0ddef9-9540-4b42-a464-94f77835**** |
| StackId |
string |
The ID of the stack. Note
This parameter is returned only when the status of the stack instance is CURRENT. |
35ad60e3-6a92-42d8-8812-f0700d45**** |
| DriftDetectionTime |
string |
The time when the last successful drift detection was performed on the stack instance. The time is displayed in the YYYY-MM-DDThh:mm:ss format. Note
This parameter is returned only when drift detection has been performed on the stack group. |
2020-02-27T07:47:47 |
| StackDriftStatus |
string |
The drift status of the stack instance after the last successful drift detection. Valid values:
Note
This parameter is returned only when drift detection has been performed on the stack group. |
IN_SYNC |
| StatusReason |
string |
The reason for instance status. Note
This parameter is returned only when instance status of the stack instance is OUTDATED. |
User initiated stop |
| StackGroupName |
string |
The name of the stack group. |
MyStackGroup |
| AccountId |
string |
The ID of the execution account to which the stack instance belongs. |
156552876021**** |
| RegionId |
string |
The region to which the stack belongs. |
cn-beijing |
| RdFolderId |
string |
The ID of the folder in the resource directory. Note
This parameter is returned only for stack groups that use the service-managed permissions mode. |
fd-4PvlVLOL8v |
Examples
Success response
JSON format
{
"TotalCount": 1,
"RequestId": "85DE34BD-7FF9-480F-8C21-556E9DA93ACD",
"PageSize": 1,
"PageNumber": 1,
"StackInstances": [
{
"Status": "CURRENT",
"StackGroupId": "fd0ddef9-9540-4b42-a464-94f77835****",
"StackId": "35ad60e3-6a92-42d8-8812-f0700d45****",
"DriftDetectionTime": "2020-02-27T07:47:47",
"StackDriftStatus": "IN_SYNC",
"StatusReason": "User initiated stop",
"StackGroupName": "MyStackGroup",
"AccountId": "156552876021****",
"RegionId": "cn-beijing",
"RdFolderId": "fd-4PvlVLOL8v"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.