Deleting Image Groups
Function
This API is used to delete all version objects from an image group. For a private image, you can also delete its SWR image content using parameters. This API applies to the following scenarios: When an image is no longer required, the configuration is incorrect, or resources need to be cleared, you can use this API to delete all versions within the specified image group. Before using this API, ensure that the image group exists and you have the permission to delete it. After the deletion is complete, all version objects within the image group are permanently removed, and related resources and configurations are cleared. If the image group does not exist, you do not have the operation permission, or the image is being used, the API will return an error message.
Constraints
No constraints.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
DELETE /v1/{project_id}/images/group/{id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| id | Yes | String | Definition: Image group ID. The ID is in the format of a Universally Unique Identifier (UUID). Constraints: N/A Range: N/A Default Value: N/A |
| project_id | Yes | String | Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: N/A Range: N/A. Default Value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| is_force | No | Boolean | Specifies whether to delete the associated SWR images. The default value is false. Definition: Specifies whether to delete the associated SWR images. Constraints: true or false. Range: boolean. Default Value: false |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition: Image name. Range: N/A |
| create_at | Long | Definition: UTC time when the image is created, accurate to millisecond. Range: N/A |
| namespace | String | Definition: SWR organization to which the image belongs. Range: N/A |
| update_at | Long | Definition: Time (UTC) when the image was last updated, accurate to millisecond. Range: N/A |
| version_count | Integer | Definition: Number of image versions. Range: N/A |
| description | String | Definition: Image description. Range: N/A |
| read_me | String | Definition: Image guide information. Range: N/A |
| icon_name | String | Definition: Image icon name. Range: N/A |
| id | String | Definition: Image ID. Range: N/A |
| swr_instance_id | String | Definition: SWR enterprise repository ID. This field is null if the SWR enterprise repository is not used. Constraints: The value can contain a maximum of 128 characters. Range: 0–128 characters, including digits (0–9) and lowercase letters (a–z). Default Value: N/A |
| swr_instance_name | String | Definition: Image repository name of the SWR enterprise edition. Constraints: The value can contain 3 to 48 characters. Range: 3–48 characters. Default Value: N/A |
Status code: 204
No content.
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Range: N/A |
| error_msg | String | Definition: Error message. Range: N/A |
Status code: 403
Example Requests
Delete an image group and the associated SWR image content.
DELETE https://{endpoint}/v1/{project_id}/images/group/{id}
{
"is_force" : true
} Example Responses
Status code: 200
Succeeded.
{
"create_at" : 1773668206040,
"description" : "custome_image",
"icon_name" : "Docker",
"id" : "0679184a-c22a-4326-b94d-011224ada4a4",
"name" : "pytorch",
"namespace" : "image_dev",
"read_me" : "### Redme \n\n",
"update_at" : 1773668206040,
"version_count" : 1
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Succeeded. |
| 204 | No content. |
| 401 | Unauthorized. |
| 403 | Forbidden. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot