All Products
Search
Document Center

Resource Orchestration Service:GetChangeSet

Last Updated:Feb 22, 2024

Queries change sets. You can determine whether to query the templates of change sets.

Operation description

In this example, the details of a change set whose ID is 4c11658d-bd47-4dd0-ba64-727edc62**** is queried. The change set is 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.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ros:GetChangeSetREAD
  • stack
    acs:ros:{#regionId}:{#accountId}:stack/{#stackId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ShowTemplatebooleanNo

Specifies whether to obtain the template. Valid values:

  • true
  • false (default)
false
RegionIdstringYes

The region ID of the change set. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ChangeSetIdstringYes

The ID of the change set.

4c11658d-bd47-4dd0-ba64-727edc62****

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

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Statusstring

The status of the change set.

CREATE_COMPLETE
Changesobject []

The changes of the change set.

object

The change of the change set.

For more information, see Data structure.

Descriptionstring

The description of the change set.

It is a demo.
Parametersobject []

The parameters of the stack.

ParameterKeystring

The key of the parameter.

ALIYUN::Region
ParameterValuestring

The value of the parameter.

cn-hangzhou
RequestIdstring

The ID of the request.

3766EE04-76DD-50F9-9C23-3AF136CD5708
StatusReasonstring

The reason why the change set is in its current state.

too many changes.
CreateTimestring

The time when the change set was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format. The time is displayed in UTC.

2021-12-01T02:20:56
TemplateBodystring

The template body of the change set.

Note This parameter takes effect only if you set ShowTemplate to true.
{"ROSTemplateFormatVersion": "2015-09-01"}
ChangeSetNamestring

The name of the change set.

ChangeSet_template
ChangeSetIdstring

The ID of the change set.

4c11658d-bd47-4dd0-ba64-727edc62****
ExecutionStatusstring

The execution status of the change set.

AVAILABLE
ChangeSetTypestring

The type of the change set.

UPDATE
RegionIdstring

The region ID of the change set.

cn-hangzhou
DisableRollbackboolean

Indicates whether rollback was performed when the stack failed to be created or updated.

false
StackNamestring

The name of the stack with which the change set is associated.

stack_2021-10-13
TimeoutInMinutesinteger

The timeout period that is specified for the stack creation or update operation.

60
StackIdstring

The ID of the stack with which the change set is associated.

a486fc19-ebb7-4ce9-a70b-554a7c3d****
Logobject

The output logs of the change set.

TerraformLogsobject []

The Terraform logs. This parameter is returned only for change sets of Terraform stacks.

Note This parameter is not returned for change sets that are in the Creating state. This parameter indicates the logs of the change set creation operation for Terraform stacks.
Commandstring

The name of the Terraform command that is run. Valid values:

  • apply
  • plan
  • destroy
  • version

For more information about Terraform commands, see Command .

apply
Streamstring

The output stream. Valid values:

  • stdout: standard output stream
  • stderr: standard error stream
stdout
Contentstring

The content of the output stream that is returned after the command is run.

Apply complete! Resources: 42 added, 0 changed, 0 destroyed.

Examples

Sample success responses

JSONformat

{
  "Status": "CREATE_COMPLETE",
  "Changes": [
    {
      "test": "test",
      "test2": 1
    }
  ],
  "Description": "It is a demo.",
  "Parameters": [
    {
      "ParameterKey": "ALIYUN::Region",
      "ParameterValue": "cn-hangzhou"
    }
  ],
  "RequestId": "3766EE04-76DD-50F9-9C23-3AF136CD5708",
  "StatusReason": "too many changes.",
  "CreateTime": "2021-12-01T02:20:56",
  "TemplateBody": "{\"ROSTemplateFormatVersion\": \"2015-09-01\"}",
  "ChangeSetName": "ChangeSet_template",
  "ChangeSetId": "4c11658d-bd47-4dd0-ba64-727edc62****",
  "ExecutionStatus": "AVAILABLE",
  "ChangeSetType": "UPDATE",
  "RegionId": "cn-hangzhou",
  "DisableRollback": false,
  "StackName": "stack_2021-10-13",
  "TimeoutInMinutes": 60,
  "StackId": "a486fc19-ebb7-4ce9-a70b-554a7c3d****",
  "Log": {
    "TerraformLogs": [
      {
        "Command": "apply",
        "Stream": "stdout",
        "Content": "Apply complete! Resources: 42 added, 0 changed, 0 destroyed."
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history