镜像服务 IMS-批量添加删除镜像标签:请求示例

时间:2024-11-13 14:59:39

请求示例

  • 批量添加镜像标签,其中,标签键为“key1”对应的值为“value1”、标签键为“key2”对应的值为“value2”。
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    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”。
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    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"
    }
    
support.huaweicloud.com/api-ims/ims_03_0617.html