Updated on 2022-02-22 GMT+08:00

Deleting a Template

Function

This API is used to delete a template.

The deletion can be performed only when the template is not used to create a stack.

URI

DELETE /v2/templates/{template_id}

Table 1 Parameter description

Parameter

Mandatory

Description

template_id

Yes

Template ID

Request

N/A

Response

If the deletion is successful, the response body is empty with only an HTTP header.

Response messages when the deletion fails are listed in Table 5.

Status Code

  • Normal
    Table 2 Status code

    Status Code

    Description

    204

    The template is deleted successfully.

  • Abnormal
    Table 3 Status code

    Status Code

    Description

    400

    The request parameter is incorrect.

    404

    The requested resource does not exist.

    409

    A stack that uses the template exists.

    500

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