Updated on 2023-11-15 GMT+08:00

Deleting a Stack

Function

This API is used to delete a stack.

URI

DELETE /v2/stacks/{stack_id}

Table 1 Parameter description

Parameter

Mandatory

Description

stack_id

Yes

Stack ID, which has a length of 1 to 64 characters

force

No

Whether to forcibly delete a stack. The value can be true or false. The forcible deletion operation can be performed only when the deletion operation has been performed before.

Request

N/A

Response

  • Response parameters

    A response parameter is a character string or response structure.

    • Null is returned when the deletion starts.
    • The failure response structure is returned when the deletion fails.

    If a success response is returned, it indicates that the deletion is started. To check whether the deletion is successful, you need to perform operations in Querying the Execution Record of a Stack.

    If the deletion is successful, the stack cannot be queried. The cause of the deletion failure can be obtained from the returned value of this interface. The failure response structure returned is shown in Table 5.

  • Example response
    {}

Status Code

  • Normal
    Table 2 Status code

    Status Code

    Description

    200

    The stack deletion starts.

  • Abnormal
    Table 3 Status code

    Status Code

    Description

    404

    The requested resource does not exist.

    500

    The server encountered an unexpected condition which prevented it from fulfilling the request.