Queries the information of a change set.

In this example, the information of the change set whose ID is 4c11658d-bd47-4dd0-ba64-727edc62**** is queried.

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 GetChangeSet

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

ShowTemplate Boolean No false

Specifies whether to show the template. Default value: false. Valid values:

  • true: shows the template.
  • false: does not show the template.
RegionId String Yes cn-hangzhou

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

ChangeSetId String Yes 4c11658d-bd47-4dd0-ba64-727edc62****

The ID of the change set.

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

Response parameters

Parameter Type Example Description
Status String CREATE_COMPLETE

The status of the change set.

Changes Array of Object See sample success responses.

The changes of the change set.

For more information, see Data structure.

Description String It is a demo.

The description of the change set.

Parameters Array of Parameter

The parameters of the stack.

ParameterKey String ALIYUN::Region

The name of the parameter.

ParameterValue String cn-hangzhou

The value of the parameter.

RequestId String 3766EE04-76DD-50F9-9C23-3AF136CD5708

The ID of the request.

StatusReason String too many changes.

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

CreateTime String 2021-12-01T02:20:56

The time when the resource was created. The time is displayed in UTC.

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

The template body of the change set.

Note This parameter takes effect only when the ShowTemplate parameter is set to true.
ChangeSetName String ChangeSet_template

The name of the change set.

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

The ID of the change set.

ExecutionStatus String AVAILABLE

The execution status of the change set.

ChangeSetType String UPDATE

The type of the change set.

RegionId String cn-hangzhou

The ID of the region.

DisableRollback Boolean false

Indicates whether rollback was performed.

StackName String stack_2021-10-13

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

TimeoutInMinutes Integer 60

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

StackId String a486fc19-ebb7-4ce9-a70b-554a7c3d****

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

Log Object

The logs of the change set.

TerraformLogs Array of TerraformLog

The logs of the Terraform stack. This parameter is returned only for the change set of a Terraform stack.

Note This parameter is not returned for change sets that are in the creating state. This parameter indicates the change set creation logs of the Terraform stack.
Command String apply

The name of the Terraform command. Valid values:

  • apply
  • plan
  • destroy
  • version

For more information about the Terraform commands, see Provisioning Infrastructure with Terraform.

Stream String stdout

The output stream. Valid values:

  • stdout: the standard output stream.
  • stderr: the standard error stream.
Content String Apply complete! Resources: 42 added, 0 changed, 0 destroyed.

The content of the output stream.

Examples

Sample requests

http(s)://ros.aliyuncs.com/?Action=GetChangeSet
&ShowTemplate=false
&RegionId=cn-hangzhou
&ChangeSetId=4c11658d-bd47-4dd0-ba64-727edc62****
&Common request parameters

Sample success responses

XML format

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

<GetChangeSetResponse>
    <Status>CREATE_COMPLETE</Status>
    <Changes>
        <Type>Resource</Type>
        <ResourceChange>
            <Action>Remove</Action>
            <LogicalResourceId>WaitCondition</LogicalResourceId>
            <PhysicalResourceId>WaitCondition</PhysicalResourceId>
            <ResourceType>ALIYUN::ROS::WaitCondition</ResourceType>
        </ResourceChange>
    </Changes>
    <Changes>
        <Type>Resource</Type>
        <ResourceChange>
            <Action>Remove</Action>
            <LogicalResourceId>WaitConHandle</LogicalResourceId>
            <PhysicalResourceId>WaitConHandle</PhysicalResourceId>
            <ResourceType>ALIYUN::ROS::WaitConditionHandle</ResourceType>
        </ResourceChange>
    </Changes>
    <Parameters>
        <ParameterValue>151266687691****</ParameterValue>
        <ParameterKey>ALIYUN::AccountId</ParameterKey>
    </Parameters>
    <Parameters>
        <ParameterValue>None</ParameterValue>
        <ParameterKey>ALIYUN::NoValue</ParameterKey>
    </Parameters>
    <Parameters>
        <ParameterValue>cn-hangzhou</ParameterValue>
        <ParameterKey>ALIYUN::Region</ParameterKey>
    </Parameters>
    <Parameters>
        <ParameterValue>a486fc19-ebb7-4ce9-a70b-554a7c3d****</ParameterValue>
        <ParameterKey>ALIYUN::StackId</ParameterKey>
    </Parameters>
    <Parameters>
        <ParameterValue>stack_2021-10-13</ParameterValue>
        <ParameterKey>ALIYUN::StackName</ParameterKey>
    </Parameters>
    <Parameters>
        <ParameterValue>151266687691****</ParameterValue>
        <ParameterKey>ALIYUN::TenantId</ParameterKey>
    </Parameters>
    <RequestId>3766EE04-76DD-50F9-9C23-3AF136CD5708</RequestId>
    <CreateTime>2021-12-01T02:20:56</CreateTime>
    <ChangeSetName>ChangeSet_template</ChangeSetName>
    <ChangeSetId>4c11658d-bd47-4dd0-ba64-727edc62****</ChangeSetId>
    <ExecutionStatus>AVAILABLE</ExecutionStatus>
    <ChangeSetType>UPDATE</ChangeSetType>
    <RegionId>cn-hangzhou</RegionId>
    <DisableRollback>false</DisableRollback>
    <StackName>stack_2021-10-13</StackName>
    <TimeoutInMinutes>60</TimeoutInMinutes>
    <StackId>a486fc19-ebb7-4ce9-a70b-554a7c3d****</StackId>
</GetChangeSetResponse>

JSON format

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

{
  "Status" : "CREATE_COMPLETE",
  "Changes" : [ {
    "Type" : "Resource",
    "ResourceChange" : {
      "Action" : "Remove",
      "LogicalResourceId" : "WaitCondition",
      "Details" : [ ],
      "Scope" : [ ],
      "PhysicalResourceId" : "WaitCondition",
      "ResourceType" : "ALIYUN::ROS::WaitCondition"
    }
  }, {
    "Type" : "Resource",
    "ResourceChange" : {
      "Action" : "Remove",
      "LogicalResourceId" : "WaitConHandle",
      "Details" : [ ],
      "Scope" : [ ],
      "PhysicalResourceId" : "WaitConHandle",
      "ResourceType" : "ALIYUN::ROS::WaitConditionHandle"
    }
  } ],
  "Parameters" : [ {
    "ParameterValue" : "151266687691****",
    "ParameterKey" : "ALIYUN::AccountId"
  }, {
    "ParameterValue" : "None",
    "ParameterKey" : "ALIYUN::NoValue"
  }, {
    "ParameterValue" : "cn-hangzhou",
    "ParameterKey" : "ALIYUN::Region"
  }, {
    "ParameterValue" : "a486fc19-ebb7-4ce9-a70b-554a7c3d****",
    "ParameterKey" : "ALIYUN::StackId"
  }, {
    "ParameterValue" : "stack_2021-10-13",
    "ParameterKey" : "ALIYUN::StackName"
  }, {
    "ParameterValue" : "151266687691****",
    "ParameterKey" : "ALIYUN::TenantId"
  } ],
  "RequestId" : "3766EE04-76DD-50F9-9C23-3AF136CD5708",
  "CreateTime" : "2021-12-01T02:20:56",
  "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****"
}

Error codes

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

Error code

Error message

HTTP status code

Description

ChangeSetNotFound

The ChangeSet ({name}) of Stack ({stack}) could not be found.

404

The error message returned because the specified change set does not exist. "name" indicates the name or ID of the change set, and "stack" indicates the name or ID of the stack.

ChangeSetNotFound

The ChangeSet {ID} could not be found.

404

The error message returned because the specified change set does not exist. "ID" indicates the ID of the change set.

StackNotFound

The Stack ({name}) could not be found.

404

The error message returned because the specified stack does not exist. "name" indicates the name or ID of the stack.