批量添加删除镜像标签BatchAddOrDeleteTags
功能介绍
该接口用于为指定 镜像 批量添加/更新、删除标签。
约束与限制
调试
您可以在API Explorer中调试该接口。
URI
POST /v2/{project_id}/images/{image_id}/tags/action
请求消息
请求示例
- 批量添加镜像标签,其中,标签键为“key1”对应的值为“value1”、标签键为“key2”对应的值为“value2”。
POST https://{Endpoint}/v2/fd73a4a14a4a4dfb9771a8475e5198ea/images/67e17426-359e-49fb-aa12-0bd1756ec240/tags/action { "tags": [{ "value": "value1", "key": "key1" }, { "value": "value2", "key": "key2" }, { "value": "", "key": "key3" }], "action": "create" }
- 批量删除镜像标签,其中,标签键为“key1”对应的值为“value1”、标签键为“key2”对应的值为“value2”。
POST https://{Endpoint}/v2/fd73a4a14a4a4dfb9771a8475e5198ea/images/67e17426-359e-49fb-aa12-0bd1756ec240/tags/action { "tags": [{ "value": "value1", "key": "key1" }, { "value": "value2", "key": "key2" }, { "value": "", "key": "key3" }], "action": "delete" }