In this example, the information about a stack group named \\`MyStackGroup\\` is queried. The stack group is granted self-managed permissions and created in the China (Hangzhou) region.
Operation description
For more information about common request parameters, see Common parameters.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ros:GetStackGroup | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | 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 can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter. Note
You must specify one of the StackGroupName and StackGroupId parameters.
| cn-hangzhou |
StackGroupName | string | No | The ID of the stack group. Note
You must specify one of the StackGroupName and StackGroupId parameters.
| MyStackGroup |
StackGroupId | string | No | The ID of the request. | fd0ddef9-9540-4b42-a464-94f77835**** |
Error code | Error message | HTTP status code | Description |
---|---|---|---|
StackGroupNotFound | The StackGroup ({name}) could not be found. | 404 | The error message returned because the specified stack group does not exist. name indicates the name of the stack group. |
Response parameters
The operation that you want to perform. Set the value to GetStackGroup.
Examples
Sample success responses
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}"
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-10 | The response structure of the API has changed | View Change Details |
2023-05-10 | The response structure of the API has changed | View Change Details |