Queries the information about a stack group.

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.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetStackGroup

The operation that you want to perform. Set the value to GetStackGroup.

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.

StackGroupName String No MyStackGroup

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.
StackGroupId String No fd0ddef9-9540-4b42-a464-94f77835****

The ID of the stack group.

Note You must specify one of the StackGroupName and StackGroupId parameters.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 14A07460-EBE7-47CA-9757-12CC4761D47A

The ID of the request.

StackGroup Object

The details of the stack group.

StackGroupId String fd0ddef9-9540-4b42-a464-94f77835****

The ID of the stack group.

Status String ACTIVE

The status of the stack group.

Valid values:

  • ACTIVE
  • DELETED
AdministrationRoleName String AliyunROSStackGroupAdministrationRole

The name of the RAM role that is specified for the administrator account in Resource Orchestration Service (ROS) when you create the self-managed stack group. If this parameter is not specified, the default value AliyunROSStackGroupAdministrationRole is returned.

Parameters Array of Parameter

The parameters of the stack group.

ParameterKey String Amount

The key of the parameter.

ParameterValue String 12

The value of the parameter.

Description String StackGroup Description

The description of the stack group.

StackGroupName String MyStackGroup

The name of the stack group.

ExecutionRoleName String AliyunROSStackGroupExecutionRole

The name of the RAM role that is specified for the execution account when you create the self-managed stack group. The administrator role AliyunROSStackGroupAdministrationRole assumes the execution role. If this parameter is not specified, the default value AliyunROSStackGroupExecutionRole is returned.

TemplateBody String {"ROSTemplateFormatVersion": "2015-09-01"}

The template body.

StackGroupDriftDetectionDetail Object

The details of the last drift detection that was performed on the stack group.

DriftDetectionTime String 2020-02-27T07:47:47

The time when drift detection was performed on the stack group.

TotalStackInstancesCount Integer 2

The number of stack instances.

FailedStackInstancesCount Integer 0

The number of stack instances that failed drift detection.

DriftDetectionStatus String COMPLETED

The status of drift detection on the stack group.

Valid values:

  • COMPLETED: Drift detection is performed and completed on all stack instances.
  • FAILED: Drift detection is performed. The number of stack instances that failed the drift detection exceeds the specified threshold.
  • PARTIAL_SUCCESS: Drift detection is performed. The number of stack instances that failed the drift detection does not exceed the specified threshold.
  • IN_PROGRESS: Drift detection is being performed on the stack group.
  • STOPPED: Drift detection is canceled for the stack group.
StackGroupDriftStatus String DRIFTED

The drift status of the stack group.

Valid values:

  • DRIFTED: At least one stack instance in the stack group has drifted.
  • NOT_CHECKED: No drift detection is completed on the stack group.
  • IN_SYNC: All the stack instances in the stack group are being synchronized.
InProgressStackInstancesCount Integer 0

The number of stack instances on which drift detection was being performed.

InSyncStackInstancesCount Integer 1

The number of stack instances that were being synchronized.

CancelledStackInstancesCount Integer 0

The number of stack instances for which drift detection was canceled.

DriftedStackInstancesCount Integer 1

The number of stack instances that have drifted.

ResourceGroupId String rg-acfmxazb4ph6aiy****

The ID of the resource group. This parameter is specified when you create the stack group.

PermissionModel String SELF_MANAGED

The permission model.

Valid values:

  • SELF_MANAGED: the self-managed permission model
  • SERVICE_MANAGED: the service-managed permission model
Note For more information about the permission models of stack groups, see Overview.
AutoDeployment Object

The information about automatic deployment settings.

Note This parameter is returned only when the PermissionModel parameter is set to SERVICE_MANAGED.
Enabled Boolean true

Indicates whether automatic deployment is enabled.

Valid values:

  • true: Automatic deployment is enabled. If a member account is added to the folder to which the stack group belongs after automatic deployment is enabled, the stack group deploys its stack instances in the specified region where the added account is deployed. If the account is deleted from the folder, the stack instances in the specified region are deleted from the stack group.
  • false: Automatic deployment is disabled. After automatic deployment is disabled, the stack instances remain unchanged when the member account in the folder is changed.
RetainStacksOnAccountRemoval Boolean true

Indicates whether stacks in the member account are retained when the member account is deleted from the folder.

Valid values:

  • true: The stacks are retained.
  • false: The stacks are deleted.
Note This parameter is returned only when the Enabled parameter is set to true.
RdFolderIds Array of String ["fd-4PvlVLOL8v"]

The folder IDs of the resource directory. This parameter is used to deploy stack instances within all the accounts in the folders.

Note This parameter is returned only when the PermissionModel parameter is set to SERVICE_MANAGED.

Examples

Sample requests

http(s)://ros.aliyuncs.com/?Action=GetStackGroup
&RegionId=cn-hangzhou
&StackGroupName=MyStackGroup
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetStackGroupResponse>
    <RequestId>14A07460-EBE7-47CA-9757-12CC4761D47A</RequestId>
    <StackGroup>
        <Status>ACTIVE</Status>
        <ResourceGroupId>rg-acfmxazb4ph6aiy****</ResourceGroupId>
        <StackGroupName>MyStackGroup</StackGroupName>
        <StackGroupId>fd0ddef9-9540-4b42-a464-94f77835****</StackGroupId>
        <AdministrationRoleName>AliyunROSStackGroupAdministrationRole</AdministrationRoleName>
        <TemplateBody>
            <ROSTemplateFormatVersion>2015-09-01</ROSTemplateFormatVersion>
        </TemplateBody>
        <PermissionModel>SELF_MANAGED</PermissionModel>
        <ExecutionRoleName>AliyunROSStackGroupExecutionRole</ExecutionRoleName>
    </StackGroup>
</GetStackGroupResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "14A07460-EBE7-47CA-9757-12CC4761D47A",
  "StackGroup" : {
    "Status" : "ACTIVE",
    "Parameters" : [ ],
    "ResourceGroupId" : "rg-acfmxazb4ph6aiy****",
    "StackGroupName" : "MyStackGroup",
    "StackGroupId" : "fd0ddef9-9540-4b42-a464-94f77835****",
    "AdministrationRoleName" : "AliyunROSStackGroupAdministrationRole",
    "TemplateBody" : {
      "ROSTemplateFormatVersion" : "2015-09-01"
    },
    "PermissionModel" : "SELF_MANAGED",
    "ExecutionRoleName" : "AliyunROSStackGroupExecutionRole"
  }
}

Error codes

For a list of error codes, visit the API Error Center.

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.