Queries the details of a stack group by its name in an Alibaba Cloud region.
Operation description
This topic provides an example of how to query a stack group named MyStackGroup. The stack group is in the China (Hangzhou) region and uses the self-managed permission mode.
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. The name can be up to 255 characters in length, and must start with a digit or a letter. It can contain digits, letters, hyphens (-), and underscores (_). 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, refer to Common parameters.
Response parameters
Parameter | Type | Description | Example |
object | |||
RequestId | string | The request ID. | 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 is assumed by ROS. This parameter is specified when you create a stack group in self-managed permission mode. If you do not specify this parameter, the default value AliyunROSStackGroupAdministrationRole is returned. | AliyunROSStackGroupAdministrationRole |
| Parameters | array<object> | The list of 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 is assumed by the administrator role AliyunROSStackGroupAdministrationRole. This parameter is specified when you create a stack group in self-managed permission mode. If you do not specify this parameter, the default value AliyunROSStackGroupExecutionRole is returned. | AliyunROSStackGroupExecutionRole |
TemplateBody | string | The structure of the template body. Note We recommend that you do not use this parameter. Use TemplateContent instead. | {"ROSTemplateFormatVersion": "2015-09-01"} |
| StackGroupDriftDetectionDetail | object | The details of the last successful drift detection operation on the stack group. | |
DriftDetectionTime | string | The time when the drift detection operation was performed on the stack group. | 2020-02-27T07:47:47 |
TotalStackInstancesCount | integer | The number of stack instances. | 2 |
FailedStackInstancesCount | integer | The number of stack instances for which the drift detection operation failed. | 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 on which a drift detection operation is in progress. | 0 |
InSyncStackInstancesCount | integer | The number of stack instances that are in the IN_SYNC state. | 1 |
CancelledStackInstancesCount | integer | The number of stack instances for which the drift detection operation was canceled. | 0 |
DriftedStackInstancesCount | integer | The number of stack instances that are in the DRIFTED state. | 1 |
ResourceGroupId | string | The ID of the resource group. This value is determined by the resource group ID that you specify when you create the stack group. | rg-acfmxazb4ph6aiy**** |
PermissionModel | string | The permission model. Valid values:
Note For more information about the permission models of stack groups, refer to Overview. | SELF_MANAGED |
| AutoDeployment | object | The information about automatic deployment settings. Note This parameter is returned only if PermissionModel is set to SERVICE_MANAGED. | |
Enabled | boolean | Indicates whether automatic deployment is enabled or disabled. Valid values:
| true |
RetainStacksOnAccountRemoval | boolean | Indicates whether to retain the stacks in the member account when the member account is removed from the folder. Valid values:
Note This parameter is returned only if Enabled is set to true. | true |
| RdFolderIds | array | The IDs of the folders in the resource directory. Stack instances are deployed in all the accounts in the folders. Note This parameter is returned only if PermissionModel is set to SERVICE_MANAGED. | |
string | The IDs of the folders in the resource directory. Stack instances are deployed in all the accounts in the folders. Note This parameter is returned only if PermissionModel is set to SERVICE_MANAGED. | ["fd-4PvlVLOL8v"] | |
TemplateContent | string | The structure of the template body. The structure is in the JSON format. For more information, refer to Template syntax. | { "ROSTemplateFormatVersion": "2015-09-01" } |
CreateTime | string | The time when the stack group was created. | |
UpdateTime | string | The time when the stack group was updated. |
The action to perform. Set the value to GetStackGroup.
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.