All Products
Search
Document Center

Resource Orchestration Service:Update a stack by using a change set, 使用更改集更新资源栈

Last Updated:Aug 26, 2026

A change set lets you preview the impact of proposed changes on your running resources before you apply them. This topic describes how to use a change set to update a stack in Resource Orchestration Service (ROS).

Use cases

When you want to verify the impact of a stack update before it takes effect — for example, to check whether key resources will be deleted or replaced — create a change set instead of updating the stack directly. The change set shows you what will change. The update takes effect only after you execute the change set. Before executing, you can review and modify the stack template to confirm it meets your requirements. For more information, see Update a stack by using a change set.

Prerequisites

A stack must already exist. For more information, see Create a stack.

Limitations

You can create a change set only for a stack that is in one of the following states.

State

Description

CREATE_COMPLETE

The stack is successfully created.

UPDATE_FAILED

The stack update failed.

UPDATE_COMPLETE

The stack update is complete.

ROLLBACK_COMPLETE

The stack rollback is complete.

ROLLBACK_FAILED

The stack rollback failed.

IMPORT_CREATE_COMPLETE

The stack is successfully created from imported resources.

IMPORT_UPDATE_COMPLETE

The stack is successfully updated with imported resources.

IMPORT_UPDATE_FAILED

The stack update from imported resources failed.

IMPORT_UPDATE_ROLLBACK_COMPLETE

The stack update from imported resources failed, and the rollback is complete.

IMPORT_UPDATE_ROLLBACK_FAILED

The stack update from imported resources failed, and the rollback also failed.

CHECK_FAILED

The stack validation failed.

CHECK_COMPLETE

The stack validation is complete.

Supported methods

  • Console: Use the ROS console to update a stack with a change set.

    For instructions, see the procedures in this topic.

  • API: Call the CreateChangeSet API operation to update a stack with a change set.

    For more information, see CreateChangeSet.

  • Alibaba Cloud CLI: Use the Alibaba Cloud CLI to update a stack with a change set.

    For instructions, see the procedures in this topic.

Update a stack by using the console

  1. Log in to the ROS console.

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

  3. In the top navigation bar, select the region where you want to create a stack from the region drop-down list. For example, select China (Hangzhou).

  4. On the Stacks page, click the name of your stack.

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

  6. On the Change Sets tab, click Create Change Set.

  7. On the Select Template page, select an existing or public template, and then click Next.

  8. On the Configure Parameters page, set the Change set name and other parameters from the template.

    Note

    The template parameters are parsed from the selected template. Enter the values as prompted on the page.

  9. In the Configure Change Set section, configure the Stack Policy, Rollback on Failure, Timeout Period, Maximum Concurrent Resources, RAM Role, and Whether to enable replacement update options. Then, click Next.

  10. On the Check and Confirm page, click Create Change Set.

Update a stack by 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. Create a change set to update the stack.

    Run the aliyun ros CreateChangeSet command. You must set the ChangeSetType parameter to UPDATE and specify the stack name, region ID, template, and change set name.

    For more information, see CreateChangeSet.

    aliyun ros CreateChangeSet --ChangeSetType UPDATE --StackName <your_stack_name> --RegionId <your_region_id> --TemplateBody <your_template_body> --ChangeSetName <your_change_set_name> 
  4. Run the aliyun ros ExecuteChangeSet command to execute the change set.

    aliyun ros ExecuteChangeSet --ChangeSetId <change_set_id>

References

  • View the impacts of a change set and inspect the stack template. For more information, see View a change set, and Data structures.

  • 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.

  • To create a change set using the API, see CreateChangeSet.