Queries the stack groups.
In this example, the stack groups that are in the active state and created in the China (Hangzhou) region are queried.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListStackGroups |
The operation that you want to perform. Set the value to ListStackGroups. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the stack group. You can call the DescribeRegions operation to query the most recent region list. |
Status | String | No | ACTIVE |
The status of the stack group. If you do not specify this parameter, stack groups in all states in the specified region are queried. Valid values:
|
PageSize | Long | No | 10 |
The number of entries to return on each page.
|
PageNumber | Long | No | 1 |
The number of the page to return.
|
ResourceGroupId | String | No | rg-acfmzawhxxcj**** |
The ID of the resource group. If you do not specify this parameter, the stack groups in all the resource groups are queried. Note To obtain the resource group ID, go to the Resource Group page in the Resource Management console. For more information, see View basic information about a resource group.
|
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
StackGroups | Array of StackGroup |
The details of the stack groups. |
|
StackGroupId | String | fd0ddef9-9540-4b42-a464-94f77835**** |
The ID of the stack group. |
Status | String | ACTIVE |
The status of the stack group. Valid values:
|
DriftDetectionTime | String | 2020-02-27T07:47:47 |
The time when the last drift detection was performed on the stack group. |
Description | String | My Stack Group |
The description of the stack group. |
StackGroupDriftStatus | String | IN_SYNC |
The drift status of the stack group on which the last drift detection was performed. Valid values:
|
StackGroupName | String | MyStackGroup |
The name of the stack group. |
ResourceGroupId | String | rg-acfmzawhxxcj**** |
The ID of the resource group. |
PermissionModel | String | SELF_MANAGED |
The permission model. Valid values:
Note For more information about the permission models of stack groups, see Overview.
|
AutoDeployment | Object |
The information about automatic deployment settings. |
|
Enabled | Boolean | true |
Indicates whether automatic deployment is enabled. Valid values:
|
RetainStacksOnAccountRemoval | Boolean | true |
Indicates whether stacks in the member account are retained when the member account is deleted from the folder. Valid values:
Note This parameter is returned only when the Enabled parameter is set to true.
|
TotalCount | Integer | 1 |
The total number of stack groups. |
RequestId | String | 14A07460-EBE7-47CA-9757-12CC4761D47A |
The ID of the request. |
PageSize | Integer | 10 |
The number of entries returned per page. |
PageNumber | Integer | 1 |
The page number of the returned page. |
Examples
Sample requests
http(s)://ros.aliyuncs.com/?Action=ListStackGroups
&RegionId=cn-hangzhou
&Status=ACTIVE
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListStackGroupsResponse>
<StackGroups>
<Status>ACTIVE</Status>
<StackGroupDriftStatus>NOT_CHECKED</StackGroupDriftStatus>
<AutoDeployment/>
<ResourceGroupId>rg-acfmzawhxxcj****</ResourceGroupId>
<PermissionModel>SELF_MANAGED</PermissionModel>
<StackGroupName>MyStackGroup</StackGroupName>
<StackGroupId>fd0ddef9-9540-4b42-a464-94f77835****</StackGroupId>
</StackGroups>
<TotalCount>1</TotalCount>
<RequestId>14A07460-EBE7-47CA-9757-12CC4761D47A</RequestId>
<PageSize>10</PageSize>
<PageNumber>1</PageNumber>
</ListStackGroupsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"StackGroups" : [ {
"Status" : "ACTIVE",
"StackGroupDriftStatus" : "NOT_CHECKED",
"AutoDeployment" : { },
"ResourceGroupId" : "rg-acfmzawhxxcj****",
"PermissionModel" : "SELF_MANAGED",
"StackGroupName" : "MyStackGroup",
"StackGroupId" : "fd0ddef9-9540-4b42-a464-94f77835****"
} ],
"TotalCount" : 1,
"RequestId" : "14A07460-EBE7-47CA-9757-12CC4761D47A",
"PageSize" : 10,
"PageNumber" : 1
}
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. reason indicates the reason for the error. |