All Products
Search
Document Center

Resource Orchestration Service:DeleteStack

Last Updated:Apr 24, 2024

Deletes a stack. You can specify whether to retain resources.

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:DeleteStackWRITE
  • stack
    acs:ros:{#regionId}:{#accountId}:stack/{#stackId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
StackIdstringYes

The ID of the stack.

4a6c9851-3b0f-4f5f-b4ca-a14bf691****
RetainAllResourcesbooleanNo

Specifies whether to retain all resources in the stack.

Valid values:

  • true
  • false (default)
false
RegionIdstringYes

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

cn-hangzhou
RamRoleNamestringNo

The name of the RAM role. Resource Orchestration Service (ROS) assumes the RAM role to create the stack and uses the credentials of the role to call the APIs of Alibaba Cloud services.
ROS assumes the role to perform operations on the stack. If you have permissions to perform operations on the stack but do not have permissions to use the RAM role, ROS still assumes the RAM role. You must make sure that the least privileges are granted to the RAM role.
If you leave this parameter empty when you call the DeleteStack operation, ROS cannot assume the existing RAM role that is associated with the stack. If you want ROS to assume a RAM role, you must specify this parameter. If no RAM roles are available, ROS uses a temporary credential that is generated from the credentials of your account.
The name of the RAM role can be up to 64 bytes in length.

test-role
RetainResourcesarrayNo

The resources that you want to retain.

stringNo

The names of the resources that you want to retain.

my_disk
DeleteOptionsarrayNo

The options for deleting the stack.

stringNo

The option for deleting the stack. Valid values:

  • Null (default): When you delete the stack, subscription resources are ignored.
  • ThrowErrorWithSubscriptionResources: When you delete the stack, an error is reported if subscription resources exist.
["ThrowErrorWithSubscriptionResources"]

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

B288A0BE-D927-4888-B0F7-B35EF84B6E6F

Examples

Sample success responses

JSONformat

{
  "RequestId": "B288A0BE-D927-4888-B0F7-B35EF84B6E6F"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-03-30The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: DeleteOptions