有奖捉虫:云通信与企业服务文档专题,速来> HOT

接口描述

查询资源所有标签键标签值 GetResourceTagsByResourceIds 用于查询已有资源标签键值对。

请求域名:tag.api.qcloud.com

输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数

参数名称 必选 类型 描述
createUin Int 创建者用户 uin,不传或为空则将当前登录 uin 作为条件查询
page Int 页码,默认为1
rp Int 每页大小,默认为15
region String 资源所在地域
serviceType String 业务类型
resourcePrefix String 资源前缀
resourceIds Array 资源唯一标记

输出参数

data 的参数如下:

参数名称 类型 描述
total Int 结果总数
page Int 当前页码
rp Int 每页大小
rows Array 标签列表

rows 的参数如下:

参数名称 类型 描述
tagKey String 标签键
tagValue String 标签值
resourceId String 资源唯一标记

错误码

错误码 描述
30004 主账号 Uin 不存在

示例

输入示例

https://domain/v2/index.php?Action=GetResourceTagsByResourceIds&region=ap-guangzhou&seviceType=cvm&prefix=instance&resourceId.0=ins-123&resourceId.1=ins-456&<公共请求参数>

输出示例

{
        "total": 4,
        "page": 1,
        "rp": 15,
        "rows": [
            {
                "tagKey": "testTagKey1",
                "tagValue": "testTagVal1",
                "resourceId": "ins-123"
            },
            {
                "tagKey": "testTagKey2",
                "tagValue": "testTagVal2",
                "resourceId": "ins-123"
            },
            {
                "tagKey": "testTagKey3",
                "tagValue": "testTagVal3",
                "resourceId": "ins-123"
            },
            {
                "tagKey": "testTagKey1",
                "tagValue": "testTagVal1",
                "resourceId": "ins-456"
            }
        ]
    }