doc-exports/docs/ims/api-ref/en-us_topic_0020092108.html
guoyanyan 313c8b6ba0 ims_api_1109
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: guoyanyan <guoyanyan3@huawei.com>
Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
2023-01-31 12:48:42 +00:00

10 KiB

Deleting an Image (Native OpenStack API)

Function

This API is used to delete a private image. You can only delete your own private images.

URI

DELETE /v2/images/{image_id}

Table 1 lists the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Type

Description

image_id

Yes

String

Specifies the image ID.

Request

  • Request parameters

    Parameter

    Mandatory

    Type

    Description

    delete_backup

    No

    Boolean

    Specifies whether to delete the CSBS backups or CBR backups associated with a full-ECS image when the image is deleted. The value can be true or false.

    • true: When a full-ECS image is deleted, its CSBS backups or CBR backups are also deleted.
    • false: When a full-ECS image is deleted, its CSBS backups or CBR backups are not deleted.
  • Example request
    DELETE https://{Endpoint}/v2/images/4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba90
    1
    2
    3
    {
        "delete_backup": true
    }
    

Response

  • Response parameters

    None

  • Example response
    STATUS CODE 204

Returned Values

  • Normal

    204

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    You do not have the rights to perform the operation.

    404 Not Found

    The requested resource was not found.

    500 Internal Server Error

    Internal service error.

    503 Service Unavailable

    The service is unavailable.