You need to enable JavaScript to run this app.
导航
GetTags - 查询标签键值对
最近更新时间:2023.10.18 11:18:21首次发布时间:2023.08.24 21:41:31

查询标签键值对

请求参数

名称
类型
是否必填
示例值
描述
Action
String

GetTags

要执行的操作,取值:GetTags

Version
String

2022-06-01

API的版本,取值:2022-06-01

MaxResults
Integer

10

获取的资源数量

TagKeys.N
Array of String

tagkey

标签键列表

CountResources
Boolean

true

是否返回标签绑定的资源数量

NextToken
String

eyJOZXh0SW5mbyI6IntcIklEXCI6NzgzODg2MzV9IiwiU2lnblRpbWUiOjE2OTIyNjQ2NzEsIlNpZ25hdHVyZSI6ImE0MjhkYmMzZmU3Njk1NzA5ZGJhNmQxYTU1NWQ5YjZiOTMxMjgzNTNlZGFhYzFmMWRhNjJiY2MyOGUzYWE2M2IifQ==

分页参数

响应数据

名称
类型
示例值
描述
Tags
Array of TagRes2

{
"Key": "tagkey",
"Value": "tagvalue",
"Type": "Custom"
}

标签结果

NextToken
String

eyJOZXh0SW5mbyI6IntcIklEXCI6NzgzODg2MzV9IiwiU2lnblRpbWUiOjE2OTIyNjQ4MjIsIlNpZ25hdHVyZSI6IjBkMjJlNjM2MTZjYmJkZTBjMjQzNTQ0Nzk1OGE2M2RkMWQzMDQ3MDEwMWRhY2QxNTdmZDRiNjlkNjFkMTdlZWYifQ==

分页参数

示例

请求

http://open.volcengineapi.com/?Action=GetTags&Version=2022-06-01&TagKeys.1=key&CountResources=true

响应

{
    "ResponseMetadata": {
        "RequestId": "202308011811272C31750FC6D44801A508",
        "Action": "GetTags",
        "Version": "2022-06-01",
        "Service": "tag",
        "Region": "cn-north-1"
    },
    "Result": {
        "Tags": [
            {
                "Key": "key",
                "Value": "value",
                "Type": "Custom",
                "ResourcesNum": 1
            }
        ],
        "NextToken": ""
    }
}

错误码

您可访问公共错误码,获取详细信息。