All Products
Search
Document Center

Resource Orchestration Service:Enable deletion protection

Last Updated:Jan 16, 2024

Resource Orchestration Service (ROS) provides the deletion protection feature for you to prevent your stacks from being accidentally deleted. After you enable deletion protection for a stack, the stack cannot be deleted.

Prerequisites

You are granted the permissions on deletion protection. You can call the SetDeletionProtection operation of ROS to enable deletion protection. For more information, see Use RAM to control access to resources.

Background information

You cannot enable deletion protection for stacks that are being deleted. The deletion protection property of a nested stack is the same as the deletion protection property of its parent stack and cannot be changed. If you want to enable deletion protection for a nested stack, you must enable deletion protection only for its parent stack.

Enable deletion protection when you create a stack

  1. Log on to the ROS console.

  2. In the left-side navigation pane, 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, you can select China (Hangzhou).

  4. On the Stacks page, click Create Stack and select Use ROS from the drop-down list.

  5. In the Select Template step, specify a template based on your business requirements and click Next.

  6. In the Configure Parameters step, configure the Stack Name parameter and parameters in the Configure Template Parameters section.

  7. In the Configure Stack Settings section, set the Deletion Protection parameter to one of the following values and click Next.

    • Enabled: enables deletion protection.

    • Disabled: disables deletion protection.

  8. On the Compliance Precheck page, complete the compliance precheck and click Next.

    Note

    The compliance precheck feature is available only for specific resources. For more information, see Compliance precheck of ROS.

    1. In the Evaluate Rules section, add compliance rules.

      You can add compliance rules based on the cloud resources in the ROS template.

    2. Click Evaluate.

      You can modify the template content based on the suggestions that are provided to remediate invalid resources to ensure the compliance of the resources.

  9. In the Check and Confirm step, click Create.

Enable deletion protection for an existing stack

  1. In the left-side navigation pane, click Stacks.

  2. In the top navigation bar, select the region where the stack you want to manage resides from the region drop-down list. For example, you can select China (Hangzhou).

  3. On the Stacks page, find the stack and click the stack ID in the Stack Name column.

  4. In the Basic Information section on the Stack Information tab, turn on Deletion Protection.

    Note

    You can also turn off Deletion Protection to disable deletion protection.

Enable deletion protection for a nested stack

You cannot directly enable deletion protection for nested stacks. If you want to enable deletion protection for a nested stack, you must enable deletion protection only for its parent stack.

  1. In the left-side navigation pane, click Stacks.

  2. In the top navigation bar, select the region where the nested stack you want to manage resides from the region drop-down list. For example, you can select China (Hangzhou).

  3. On the Stacks page, select Show Nested Stacks.

  4. On the Stacks page, find the nested stack and click the stack ID in the Stack Name column.

  5. In the Basic Information section on the Stack Information tab of the nested stack, click the parent stack ID.

  6. In the Basic Information section on the Stack Information tab of the parent stack, turn on Deletion Protection.

    Note

    You can also turn off Deletion Protection to disable deletion protection.