Queries the details of a stack group by name in a region.
Operation description
This topic provides an example to query the information of an existing stack group named MyStackGroup that uses the self-managed permissions model in the China (Hangzhou) region.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:GetStackGroup |
get |
*StackGroup
|
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 |
No |
The name of the stack group. The name must be unique within a region. Note
You must specify only one of the StackGroupName and StackGroupId parameters. |
MyStackGroup |
| StackGroupId |
string |
No |
The ID of the stack group. Note
You must specify only one of the StackGroupName and StackGroupId parameters. |
fd0ddef9-9540-4b42-a464-94f77835**** |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
14A07460-EBE7-47CA-9757-12CC4761D47A |
| StackGroup |
object |
The details of the stack group. |
|
| StackGroupId |
string |
The ID of the stack group. |
fd0ddef9-9540-4b42-a464-94f77835**** |
| Status |
string |
The status of the stack group. Valid values:
|
ACTIVE |
| AdministrationRoleName |
string |
The name of the RAM administrator role that Resource Orchestration Service (ROS) assumes when you create a stack group that uses the self-managed permissions model. If you do not specify this parameter, the default value AliyunROSStackGroupAdministrationRole is returned. |
AliyunROSStackGroupAdministrationRole |
| Parameters |
array<object> |
The parameters of the stack group. |
|
|
object |
|||
| ParameterKey |
string |
The name of the parameter. |
Amount |
| ParameterValue |
string |
The value of the parameter. |
12 |
| Description |
string |
The description of the stack group. |
StackGroup Description |
| StackGroupName |
string |
The name of the stack group. |
MyStackGroup |
| ExecutionRoleName |
string |
The name of the RAM execution role that the administrator role (AliyunROSStackGroupAdministrationRole) assumes when you create a stack group that uses the self-managed permissions model. If you do not specify this parameter, the default value AliyunROSStackGroupExecutionRole is returned. |
AliyunROSStackGroupExecutionRole |
| TemplateBody |
string |
The structure of the template body. Note
This response parameter is not recommended. Use TemplateContent instead. |
{"ROSTemplateFormatVersion": "2015-09-01"} |
| StackGroupDriftDetectionDetail |
object |
The details of the last successful drift detection for the stack group. |
|
| DriftDetectionTime |
string |
The time when the drift detection was performed on the stack group. The time is in the YYYY-MM-DDThh:mm:ss format. |
2020-02-27T07:47:47 |
| TotalStackInstancesCount |
integer |
The total number of stack instances. |
2 |
| FailedStackInstancesCount |
integer |
The number of stack instances that failed the drift detection. |
0 |
| DriftDetectionStatus |
string |
The drift detection status of the stack group. Valid values:
|
COMPLETED |
| StackGroupDriftStatus |
string |
The drift status of the stack group. Valid values:
|
DRIFTED |
| InProgressStackInstancesCount |
integer |
The number of stack instances for which drift detection is in progress. |
0 |
| InSyncStackInstancesCount |
integer |
The number of stack instances that are in sync. |
1 |
| CancelledStackInstancesCount |
integer |
The number of stack instances for which drift detection is canceled. |
0 |
| DriftedStackInstancesCount |
integer |
The number of stack instances that have drifted. |
1 |
| ResourceGroupId |
string |
The ID of the resource group. The value depends on the resource group ID specified when the stack group was created. |
rg-acfmxazb4ph6aiy**** |
| PermissionModel |
string |
The permission model. Valid values:
Note
For more information about the permission models of stack groups, see Overview. |
SELF_MANAGED |
| AutoDeployment |
object |
The auto-deployment settings. Note
This parameter is returned only when PermissionModel is set to SERVICE_MANAGED. |
|
| Enabled |
boolean |
Specifies whether to enable auto-deployment. Valid values:
|
true |
| RetainStacksOnAccountRemoval |
boolean |
Specifies whether to retain the stacks in member accounts when member accounts are removed from the target folder. Valid values:
Note
This parameter is returned only when Enabled is set to true. |
true |
| RdFolderIds |
array |
The list of target folder IDs in the resource directory. Stack instances are deployed to all accounts in the folders. Note
This parameter is returned only when PermissionModel is set to SERVICE_MANAGED. |
|
|
string |
The list of target folder IDs in the resource directory. Stack instances are deployed to all accounts in the folders. Note
This parameter is returned only when PermissionModel is set to SERVICE_MANAGED. |
["fd-4PvlVLOL8v"] |
|
| TemplateContent |
string |
The structure of the template body in JSON format. For more information, see Template syntax. |
{ "ROSTemplateFormatVersion": "2015-09-01" } |
| CreateTime |
string |
The time when the stack group was created. The time is in the YYYY-MM-DDThh:mm:ss format. |
2024-06-14T02:13:50 |
| UpdateTime |
string |
The time when the stack group was updated. The time is in the YYYY-MM-DDThh:mm:ss format. |
2024-06-15T02:01:00 |
Examples
Success response
JSON format
{
"RequestId": "14A07460-EBE7-47CA-9757-12CC4761D47A",
"StackGroup": {
"StackGroupId": "fd0ddef9-9540-4b42-a464-94f77835****",
"Status": "ACTIVE",
"AdministrationRoleName": "AliyunROSStackGroupAdministrationRole",
"Parameters": [
{
"ParameterKey": "Amount",
"ParameterValue": "12"
}
],
"Description": "StackGroup Description",
"StackGroupName": "MyStackGroup",
"ExecutionRoleName": "AliyunROSStackGroupExecutionRole",
"TemplateBody": "{\"ROSTemplateFormatVersion\": \"2015-09-01\"}",
"StackGroupDriftDetectionDetail": {
"DriftDetectionTime": "2020-02-27T07:47:47",
"TotalStackInstancesCount": 2,
"FailedStackInstancesCount": 0,
"DriftDetectionStatus": "COMPLETED",
"StackGroupDriftStatus": "DRIFTED",
"InProgressStackInstancesCount": 0,
"InSyncStackInstancesCount": 1,
"CancelledStackInstancesCount": 0,
"DriftedStackInstancesCount": 1
},
"ResourceGroupId": "rg-acfmxazb4ph6aiy****",
"PermissionModel": "SELF_MANAGED",
"AutoDeployment": {
"Enabled": true,
"RetainStacksOnAccountRemoval": true
},
"RdFolderIds": [
"[\"fd-4PvlVLOL8v\"]"
],
"TemplateContent": "{\n \"ROSTemplateFormatVersion\": \"2015-09-01\"\n}",
"CreateTime": "2024-06-14T02:13:50",
"UpdateTime": "2024-06-15T02:01:00"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.