View a change set

更新时间:
复制 MD 格式

Preview how proposed changes affect your stack and view a detailed list of modifications in JSON format.

Prerequisites

Make sure that you have created a change set. For more information, see Update a stack by using a change set.

Supported methods

View change sets using the console

  1. Log on to the Resource Orchestration Service (ROS) console.

  2. In the navigation pane on the left, click Stacks.

  3. On the Stacks page, click the name of the target stack.

  4. On the stack details page, click the Change Sets tab.

  5. On the Change Sets tab, click the name of the target change set.

  6. On the change set details page, review the change set details.

    • Overview tab: Displays basic information about the change set, such as the ID, status, and creation time.

    • Change Records tab: Shows the proposed changes to the stack and information about affected resources.

    • Template tab: Displays the updated template.

    • JSON Changes tab: Provides a detailed view of the specific changes to the stack. For more information, see Data structures.

View change sets using the CLI

  1. Install the Alibaba Cloud CLI.

    For more information, see Install Alibaba Cloud CLI.

  2. Configure Alibaba Cloud credentials.

    For more information, see Configure credentials.

  3. List the change sets for a stack.

    Run the aliyun ros ListChangeSets command to list the change sets for a stack. You must specify the stack ID and region ID.

    aliyun ros ListChangeSets --StackId <stack_id> --RegionId <region_id>

    Sample response:

    {
            "TotalCount": 1,
            "PageSize": 10,
            "RequestId": "A94A31B7-EC3A-4528-90D8-FA31FA4D13BB",
            "PageNumber": 1,
            "ChangeSets": [
                    {
                            "Status": "CREATE_COMPLETE",
                            "ChangeSetId": "<change_set_id>",
                            "ExecutionStatus": "AVAILABLE",
                            "CreateTime": "2020-03-03T06:36:20",
                            "ChangeSetType": "UPDATE",
                            "RegionId": "cn-hangzhou",
                            "ChangeSetName": "test-change-set",
                            "StackName": "test-change-set",
                            "StackId": "<stack_id>"
                    }
            ]
    }
  4. View the details of a specific change set.

    Run the aliyun ros GetChangeSet command to view the details of a change set. You must specify the change set ID and region ID. For more information, see GetChangeSet.

    aliyun ros GetChangeSet --ChangeSetId <change_set_id> --RegionId <region_id>

    Sample response. The Changes property lists the proposed changes to resources. For more information, see Data structures.

    {
            "ExecutionStatus": "AVAILABLE",
            "Parameters": [
                    {
                            "ParameterValue": "<account_id>",
                            "ParameterKey": "ALIYUN::AccountId"
                    },
                    {
                            "ParameterValue": "None",
                            "ParameterKey": "ALIYUN::NoValue"
                    },
                    {
                            "ParameterValue": "cn-hangzhou",
                            "ParameterKey": "ALIYUN::Region"
                    },
                    {
                            "ParameterValue": "<stack_id>",
                            "ParameterKey": "ALIYUN::StackId"
                    },
                    {
                            "ParameterValue": "test-change-set",
                            "ParameterKey": "ALIYUN::StackName"
                    },
                    {
                            "ParameterValue": "<tenant_id>",
                            "ParameterKey": "ALIYUN::TenantId"
                    },
                    {
                            "ParameterValue": "1",
                            "ParameterKey": "Count"
                    }
            ],
            "TimeoutInMinutes": 60,
            "Changes": [
                    {
                            "Type": "Resource",
                            "ResourceChange": {
                                    "LogicalResourceId": "WaitConditionHandle",
                                    "Replacement": "False",
                                    "PhysicalResourceId": "WaitConditionHandle",
                                    "ResourceType": "ALIYUN::ROS::WaitConditionHandle",
                                    "Action": "Modify",
                                    "Details": [
                                            {
                                                    "Evaluation": "Static",
                                                    "Target": {
                                                            "Name": "Count",
                                                            "RequiresRecreation": "Never",
                                                            "Attribute": "Properties"
                                                    },
                                                    "CausingEntity": "Count",
                                                    "ChangeSource": "ParameterReference"
                                            },
                                            {
                                                    "Evaluation": "Dynamic",
                                                    "Target": {
                                                            "Name": "Count",
                                                            "RequiresRecreation": "Never",
                                                            "Attribute": "Properties"
                                                    },
                                                    "ChangeSource": "DirectModification"
                                            }
                                    ],
                                    "Scope": [
                                            "Properties"
                                    ]
                            }
                    }
            ],
            "ChangeSetId": "<change_set_id>",
            "StackId": "<stack_id>",
            "DisableRollback": false,
            "ChangeSetName": "test-change-set",
            "ChangeSetType": "UPDATE",
            "StackName": "test-change-set",
            "Status": "CREATE_COMPLETE",
            "CreateTime": "2020-03-03T06:36:20",
            "RegionId": "cn-hangzhou",
            "RequestId": "DB9B48C8-C22D-4009-A3B0-85FDF3D26D2D"
    }

Next steps

  • After you execute a change set, ROS automatically deletes the other change sets associated with that stack. For more information, see Execute a change set.

  • If a change set no longer meets your requirements, delete it before it is executed. For more information, see Delete a change set.