弹性云服务器 ECS-按标签查询云服务器列表(废弃):示例

时间:2025-02-12 15:02:28

示例

  • 请求示例
    POST  https://{endpoint}/v1/{project_id}/cloudservers/resource_instances/action
    {    "offset": "100",     "limit": "1",     "action": "filter",     "matches":[    {        "key": "resource_name",         "value": "ecs_test"     }],     "tags": [    {        "key": "key1",         "values": [            "value1",             "value2"        ]    }]}
  • 响应示例
    {      "resources": [         {            "resource_detail": null,             "resource_id": "31760ffa-6711-406d-bc94-bce4ae925a8a",             "resource_name": "ecs_test",             "tags": [                {                   "key": "key1",                   "value": "value1"                }             ]         }       ],       "total_count": 1000}
support.huaweicloud.com/api-ecs/ecs_02_1005.html