MapReduce服务 MRS-查询特定标签的集群列表:请求示例

时间:2023-11-01 16:25:03

请求示例

  • 查询action为filter时的集群列表

    POST https://{endpoint}/v1.1/{project_id}/{resource_type}/resource_instances/action{  "offset" : "100",  "limit" : "100",  "action" : "filter",  "matches" : [ {    "key" : "resource_name",    "value" : "clusterA"  } ],  "not_tags" : [ {    "key" : "key1",    "values" : [ "value1", "value2" ]  } ],  "tags" : [ {    "key" : "key1",    "values" : [ "value1", "value2" ]  } ],  "tags_any" : [ {    "key" : "key1",    "values" : [ "value1", "value2" ]  } ],  "not_tags_any" : [ {    "key" : "key1",    "values" : [ "value1", "value2" ]  } ]}
  • 查询action为count时的集群列表

    POST https://{endpoint}/v1.1/{project_id}/{resource_type}/resource_instances/action{  "action" : "count",  "not_tags" : [ {    "key" : "key1",    "values" : [ "value1", "value2" ]  } ],  "tags" : [ {    "key" : "key1",    "values" : [ "value1", "value2" ]  }, {    "key" : "key2",    "values" : [ "value1", "value2" ]  } ],  "tags_any" : [ {    "key" : "key1",    "values" : [ "value1", "value2" ]  } ],  "not_tags_any" : [ {    "key" : "key1",    "values" : [ "value1", "value2" ]  } ],  "matches" : [ {    "key" : "resource_name",    "value" : "clusterA"  } ]}
support.huaweicloud.com/api-mrs/ListClustersByTags.html