{"base_path":null,"components":{"parameters":{"ProjectId":{"description":"租户项目ID","in":"path","name":"project_id","required":true,"schema":{"maxLength":36,"minLength":0,"pattern":"[a-fA-F0-9]{32}","type":"string"}},"TagsResourceType":{"description":"- 专线服务资源类型,包括dc-directconnect/dc-vgw/dc-vif\n- dc-directconnect: 专线物理连接\n- dc-vgw: 虚拟网关\n- dc-vif: 虚拟接口","in":"path","name":"resource_type","required":true,"schema":{"enum":["dc-directconnect","dc-vgw","dc-vif"],"type":"string"}}},"schemas":{"ListTagResourceInstancesRequestBody":{"description":"查询资源实例的请求体。","properties":{"action":{"description":"操作标识(仅限于filter,count):filter(过滤),count(查询总条数)\n如果是filter就是分页查询,如果是count只需按照条件将总条数返回即可。禁止返回其他字段。","enum":["filter","count"],"type":"string","x-huawei-extraAnnotation":""},"limit":{"description":"查询记录数(action为count时无此参数)如果action为filter默认为1000,limit最多为1000,不能为负数,最小值为1","pattern":"[0-9]+","type":"string","x-huawei-extraAnnotation":""},"matches":{"description":"搜索字段,key为要匹配的字段,如resource_name等。value为匹配的值。此字段为固定字典值。\n根据不同的字段确认是否需要模糊匹配,如resource_name默认为模糊搜索(不区分大小写),如果value为空字符串精确匹配。resource_id为精确匹配。第一期只做resource_name,后续在扩展。","items":{"$ref":"#/components/schemas/Match"},"type":"array","x-huawei-extraAnnotation":""},"not_tags":{"description":"不包含标签,最多包含10个key,每个key下面的value最多10个, 结构体不能缺失,key不能为空或者空字符串。Key不能重复,同一个key中values不能重复。返回不包含标签的资源列表,key之间是与的关系,key-value结构中value是或的关系。无过滤条件时返回全量数据。","items":{"$ref":"#/components/schemas/Tags"},"type":"array","x-huawei-extraAnnotation":""},"not_tags_any":{"description":"不包含任意标签,最多包含10个key,每个key下面的value最多10个,结构体不能缺失,key不能为空或者空字符串。Key不能重复,同一个key中values不能重复。返回不包含标签的资源列表,key之间是或的关系,key-value结构中value是或的关系。无过滤条件时返回全量数据。","items":{"$ref":"#/components/schemas/Tags"},"type":"array","x-huawei-extraAnnotation":""},"offset":{"description":"索引位置, 从offset指定的下一条数据开始查询。 查询第一页数据时,不需要传入此参数,查询后续页码数据时,将查询前一页数据时响应体中的值带入此参数(action为count时无此参数)如果action为filter默认为0,必须为数字,不能为负数","pattern":"[0-9]+","type":"string","x-huawei-extraAnnotation":""},"sys_tags":{"description":"仅op_service权限可以使用此字段做资源实例过滤条件。目前TMS调用时只包含一个tag结构体。key:_sys_enterprise_project_id,value:企业项目id列表。目前TMS调用时,key下面只包含一个value。0表示默认企业项目。sys_tags和租户标签过滤条件(without_any_tag 、tags、tags_any、not_tags、not_tags_any)不能同时使用。","items":{"$ref":"#/components/schemas/Tags"},"type":"array","x-huawei-extraAnnotation":""},"tags":{"description":"包含标签,最多包含10个key,每个key下面的value最多10个,结构体不能缺失,key不能为空或者空字符串。Key不能重复,同一个key中values不能重复。返回包含所有标签的资源列表,key之间是与的关系,key-value结构中value是或的关系。无tag过滤条件时返回全量数据。","items":{"$ref":"#/components/schemas/Tags"},"type":"array","x-huawei-extraAnnotation":""},"tags_any":{"description":"包含任意标签,最多包含10个key,每个key下面的value最多10个,结构体不能缺失,key不能为空或者空字符串。Key不能重复,同一个key中values不能重复。返回包含标签的资源列表,key之间是或的关系,key-value结构中value是或的关系。无过滤条件时返回全量数据。","items":{"$ref":"#/components/schemas/Tags"},"type":"array","x-huawei-extraAnnotation":""}},"required":["action"],"type":"object"},"ListTagResourceInstancesResponseBody":{"description":"资源列表对象","properties":{"request_id":{"description":"请求ID","type":"string"},"resources":{"description":"资源列表。","items":{"$ref":"#/components/schemas/Resource"},"type":"array","x-huawei-extraAnnotation":""},"total_count":{"description":"总记录数。","example":10,"format":"int32","type":"integer","x-huawei-extraAnnotation":""}},"required":["request_id"],"type":"object"},"Match":{"properties":{"key":{"description":"键。取值范围为包括dc-directconnect/dc-vgw/dc-vif","type":"string"},"value":{"description":"值。每个值最大长度255个unicode字符。","type":"string"}},"required":["key","value"],"type":"object"},"Resource":{"description":"资源信息","properties":{"resource_detail":{"description":"资源详情。\n资源对象,用于扩展。默认为空。","properties":{},"type":"object","x-huawei-extraAnnotation":""},"resource_id":{"description":"资源的ID。","example":"e5ad289f-9c56-4daf-b08b-2e53a983473a","type":"string","x-huawei-extraAnnotation":""},"resource_name":{"description":"资源名称,资源没有名称时默认为空字符串。","type":"string","x-huawei-extraAnnotation":""},"sys_tags":{"description":"标签列表,没有标签默认为空数组。","items":{"$ref":"#/components/schemas/Tag"},"type":"array","x-huawei-extraAnnotation":""},"tags":{"description":"标签列表,没有标签默认为空数组。","items":{"$ref":"#/components/schemas/Tag"},"type":"array","x-huawei-extraAnnotation":""}},"required":["resource_id","tags"],"type":"object"},"Tag":{"description":"资源标签。","properties":{"key":{"description":"标签键,最大长度36个unicode字符,格式为大小写字母,数字,中划线“-”,下划线“_”,中文。","example":"key","maxLength":36,"minLength":0,"type":"string","x-open-region-cloud":"hws,hws_hk,ocb,cmcc"},"value":{"description":"标签值,最大长度43个unicode字符,格式为大小写字母,数字,中划线“-”,下划线“_”,点“.”,中文。","example":"value","maxLength":43,"minLength":0,"type":"string","x-open-region-cloud":"hws,hws_hk,ocb,cmcc"}},"required":["key"],"type":"object"},"Tags":{"properties":{"key":{"description":"键。最大长度127个unicode字符。 key不能为空。","type":"string"},"values":{"description":"值列表。每个值最大长度255个unicode字符。","items":{"type":"string"},"type":"array"}},"required":["key","values"],"type":"object"}}},"consumes":"","definitions":null,"description":null,"group_id":"044e9f7ee6954f958198fe6f41f8bf50","host":"dcaas.cn-north-4.myhuaweicloud.com","id":"630788acccfb4f208698e6b31f73dad6","info_version":"v3","method":"post","name":"ListTagResourceInstances","parameters":null,"paths":{"/v3/{project_id}/{resource_type}/resource-instances/action":{"post":{"deprecated":false,"description":"通过标签查询资源实例","operationId":"ListTagResourceInstances","parameters":[{"$ref":"#/components/parameters/ProjectId"},{"$ref":"#/components/parameters/TagsResourceType"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTagResourceInstancesRequestBody"}}},"description":"This is a auto create Body Object","required":true},"responses":{"200":{"content":{"application/json":{"example":{"request_id":"9a4f4dfc4fb2fc101e65bba07d908535","resources":[],"total_count":0},"schema":{"$ref":"#/components/schemas/ListTagResourceInstancesResponseBody"}}},"description":"OK"}},"summary":"通过标签查询资源实例","tags":["TagManage"],"x-codegen-request-body-name":"ListTagResourceInstancesRequestBody","x-is-registered":"Y","x-open-region-cloud":"hws,hws_hk,ocb,cmcc,hws_ocb,hws_eu","x-request-examples-1":{"action":"filter","limit":"10","matches":[{"key":"resource_name","value":"resource1"}],"not_tags":[{"key":"key1","values":["*value1","value2"]}],"not_tags_any":[{"key":"key1","values":["value1","value2"]}],"offset":"10","tags":[{"key":"key1","values":["*value1","value2"]}],"tags_any":[{"key":"key1","values":["value1","value2"]}]},"x-request-examples-2":{"action":"count","matches":[{"key":"resource_name","value":"resource1"}],"not_tags":[{"key":"key1","values":["value1","*value2"]}],"not_tags_any":[{"key":"key1","values":["value1","value2"]}],"sys_tags":[{"key":"_sys_enterprise_project_id","values":["5aa119a8-d25b-45a7-8d1b-88e127885635"]}],"tags":[{"key":"key1","values":["value1","value2"]},{"key":"key2","values":["value1","value2"]}],"tags_any":[{"key":"key1","values":["value1","value2"]}]},"x-request-examples-description-1":"action为filter时,根据标签查询资源。","x-request-examples-description-2":"action为count时,查询资源总数。","x-request-examples-url-1":"https://{endpoint}/v3/cfa563efb77d4b6d9960781d82530fd8/dc-vgw/resource-instances/action","x-request-examples-url-2":"https://{endpoint}/v3/cfa563efb77d4b6d9960781d82530fd8/dc-vgw/resource_instances/action","x-support-sdk":"Y"}}},"product_short":"DC","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"通过标签查询资源实例","tags":"标签管理","uri":null,"version":"3.0.1"}