All Products
Search
Document Center

Resource Orchestration Service:CancelStackOperation

Last Updated:Sep 12, 2024

Cancels operations on a stack.

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

Request parameters

ParameterTypeRequiredDescriptionExample
StackIdstringYes

The stack ID.

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

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

cn-hangzhou
CancelTypestringNo

The method that you want to use to cancel the operations. Valid values:

  • Quick: cancels the operations on the stack at the earliest opportunity. In this case, Resource Orchestration Service (ROS) stops scheduling new resources and stops running resources at the earliest opportunity. If you use this method, the resource status may become invalid and subsequent stack operations may be affected.
  • Safe (default): cancels the operations on the stack in a secure manner. In this case, ROS stops scheduling new resources and waits for running resources to be stopped.
Safe
AllowedStackOperationsarrayNo

The operations that you want to cancel on the stack.

stringNo

The operation N that you want to cancel on the stack. Valid values:

  • CREATE: creates a stack, or continues to create a stack from where the creation operation is stopped.
  • UPDATE: updates a stack.
  • IMPORT_UPDATE: creates a stack by importing resources.
  • IMPORT_UPDATE: updates a stack by importing resources.
  • DELETE: deletes a stack.
  • NOT_ROLLBACK (default): all types of non-rollback operations, including CREATE, UPDATE, IMPORT_CREATE, IMPORT_UPDATE, and DELETE. If you cancel a rollback operation on a stack, the stack status may become invalid and subsequent stack operations may be affected. We recommend that you do not cancel rollback operations.
  • CREATE_ROLLBACK: rolls back resources after a stack fails to be created.
  • ROLLBACK: rolls back resources after a stack fails to be updated.
  • IMPORT_CREATE_ROLLBACK: rolls back resources after a stack fails to be created by using imported resources.
  • IMPORT_UPDATE_ROLLBACK: rolls back resources after a stack fails to be updated by using imported resources.
  • ALL: all types of operations, including CREATE, UPDATE, IMPORT_CREATE, IMPORT_UPDATE, DELETE, CREATE_ROLLBACK, ROLLBACK, IMPORT_CREATE_ROLLBACK, and IMPORT_UPDATE_ROLLBACK.

Valid values of N: 1 to 10.

NOT_ROLLBACK

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

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
No change history