Queries the details of an operation that you perform on a stack group.

In this example, the operation ID 6da106ca-1784-4a6f-a7e1-e723863d∗∗∗∗ is set to query the details of an operation that you perform on a stack group named MyStackGroup. The stack group is granted self-managed permissions and deployed 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 GetStackGroupOperation

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

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.

OperationId String Yes 6da106ca-1784-4a6f-a7e1-e723863d****

The ID of the operation that you want to query. You can call the ListStackGroupOperations operation to query the operation.

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.

StackGroupOperation Object

The details of the operation on the stack group.

Status String SUCCEEDED

The status of the operation.

Valid values:

  • RUNNING: The operation is being performed.
  • SUCCEEDED: The operation succeeded.
  • FAILED: The operation failed.
  • STOPPING: The operation is being stopped.
  • STOPPED: The operation is stopped.
StackGroupId String fd0ddef9-9540-4b42-a464-94f77835****

The ID of the stack group.

Action String DELETE

The operation that was performed.

Valid values:

  • CREATE
  • UPDATE
  • DELETE
  • DETECT_DRIFT
CreateTime String 2020-01-20T09:22:3

The time when the operation was initiated.

RetainStacks Boolean true

Indicates whether the relevant stacks are retained when stack instances are deleted in the stack group.

Valid values:

  • true: The stacks are retained.
  • false: The stacks are deleted. Proceed with caution.
Note This parameter is returned only when the stack instances are deleted.
StackGroupName String MyStackGroup

The name of the stack group.

OperationId String 6da106ca-1784-4a6f-a7e1-e723863d****

The ID of the operation that was performed on the stack group.

OperationDescription String Create stack instance in hangzhou

The description of the operation.

Note This parameter is returned only if the OperationDescription request parameter is specified in the CreateStackInstances operation to create stack instances.
StackGroupDriftDetectionDetail Object

The details of the drift detection.

Note This parameter is returned only when the drift detection is performed on the stack group.
DriftDetectionTime String 2020-02-27T07:47:47

The time when the drift detection was initiated.

TotalStackInstancesCount Integer 2

The number of stack instances.

FailedStackInstancesCount Integer 0

The number of stack instances that failed the drift detection.

DriftDetectionStatus String COMPLETED

The status of the drift detection.

Valid values:

  • COMPLETED: The drift detection is performed and completed on all stack instances.
  • FAILED: The drift detection is performed. The number of stack instances that failed the drift detection exceeds the specified threshold.
  • PARTIAL_SUCCESS: The drift detection is performed. The number of stack instances that failed the drift detection does not exceed the specified threshold.
  • IN_PROGRESS: The drift detection is being performed on the stack group.
  • STOPPED: The 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 is drifted.
  • NOT_CHECKED: No drift detection is completed in 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 the 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 the drift detection was canceled.

DriftedStackInstancesCount Integer 1

The number of stack instances that were drifted.

OperationPreferences Object

The operation preferences.

MaxConcurrentCount Integer 1

The maximum number of accounts within which operations are performed on stacks concurrently in each region.

Valid values: 1 to 20.

Note Only one of the MaxConcurrentCount and MaxConcurrentPercentage parameters is returned.
FailureToleranceCount Integer 1

The maximum number of stack operation failures that can occur within the accounts in each region. When the value is exceeded, the operation fails to be performed in the region. If the operation fails to be performed in one region, the operation fails to be performed in other regions.

Valid values: 0 to 20.

Note Only one of the FailureToleranceCount and FailureTolerancePercentage parameters is returned.
MaxConcurrentPercentage Integer 10

The percentage of the total number of accounts within which operations are performed on stacks concurrently to the total number of accounts in each region.

Valid values: 1 to 100.

Note Only one of the MaxConcurrentCount and MaxConcurrentPercentage parameters is returned.
RegionIdsOrder Array of String ["cn-hangzhou","cn-beijing"]

The regions in the order of which the operation is performed.

FailureTolerancePercentage Integer 10

The percentage of the total number of accounts within which stack operation failures can occur to the total number of accounts in each region. When the value is exceeded, the operation fails to be performed in the region.

Valid values: 0 to 100.

Note Only one of the FailureToleranceCount and FailureTolerancePercentage parameters is returned.
EndTime String 2020-01-20T09:22:4

The time when the operation ended.

ExecutionRoleName String AliyunROSStackGroupExecutionRole

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

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 stack group that is granted self-managed permissions. If this parameter is not specified, the default value AliyunROSStackGroupAdministrationRole is returned.

DeploymentTargets Object

The folders in which you want to deploy the stack instances that are granted service-managed permissions.

RdFolderIds Array of String ["fd-4PvlVLOL8v"]

The folder IDs of the resource directory.

AccountIds Array of String ["151266687691****","141261387191****"]

The IDs of the member accounts in the resource directory.

Note This parameter is returned only if the AccountIds request parameter is specified in the UpdateStackInstances operation to update stack instances.

Examples

Sample requests

http(s)://ros.aliyuncs.com/?Action=GetStackGroupOperation
&OperationId=6da106ca-1784-4a6f-a7e1-e723863d****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

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

<GetStackGroupOperationResponse>
    <RequestId>14A07460-EBE7-47CA-9757-12CC4761D47A</RequestId>
    <StackGroupOperation>
        <Status>SUCCEEDED</Status>
        <Action>DELETE</Action>
        <RetainStacks>false</RetainStacks>
        <EndTime>2020-01-20T09:22:4</EndTime>
        <OperationId>645d0eed-f1e6-40b0-8e8f-0e1eaa34da6f</OperationId>
        <CreateTime>2020-01-20T09:22:3</CreateTime>
        <StackGroupName>MyStackGroup</StackGroupName>
        <StackGroupId>fd0ddef9-9540-4b42-a464-94f77835****</StackGroupId>
        <AdministrationRoleName>AliyunROSStackGroupAdministrationRole</AdministrationRoleName>
        <OperationPreferences>
            <MaxConcurrentCount>1</MaxConcurrentCount>
            <RegionIdsOrder>cn-hangzhou</RegionIdsOrder>
            <RegionIdsOrder>cn-beijing</RegionIdsOrder>
            <FailureToleranceCount>0</FailureToleranceCount>
        </OperationPreferences>
        <ExecutionRoleName>AliyunROSStackGroupExecutionRole</ExecutionRoleName>
    </StackGroupOperation>
</GetStackGroupOperationResponse>

JSON format

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

{
  "RequestId" : "14A07460-EBE7-47CA-9757-12CC4761D47A",
  "StackGroupOperation" : {
    "Status" : "SUCCEEDED",
    "Action" : "DELETE",
    "RetainStacks" : false,
    "EndTime" : "2020-01-20T09:22:4",
    "OperationId" : "645d0eed-f1e6-40b0-8e8f-0e1eaa34da6f",
    "CreateTime" : "2020-01-20T09:22:3",
    "StackGroupName" : "MyStackGroup",
    "StackGroupId" : "fd0ddef9-9540-4b42-a464-94f77835****",
    "AdministrationRoleName" : "AliyunROSStackGroupAdministrationRole",
    "OperationPreferences" : {
      "MaxConcurrentCount" : 1,
      "RegionIdsOrder" : [ "cn-hangzhou", "cn-beijing" ],
      "FailureToleranceCount" : 0
    },
    "ExecutionRoleName" : "AliyunROSStackGroupExecutionRole"
  }
}

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.

StackGroupOperationNotFound

The StackGroupOperation ({OperationId}) could not be found.

404

The error message returned because the specified operation is not performed on the stack group. OperationId indicates the ID of the operation.