You need to enable JavaScript to run this app.
导航
GetResources - 查询资源及资源绑定标签信息
最近更新时间:2023.11.03 11:33:40首次发布时间:2023.08.24 21:41:31

查询资源及资源绑定标签信息

请求参数

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

GetResources

要执行的操作,取值:GetResources

Version
String

2022-06-01

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

TagFilters.N.Key
Array of String

tagkey

过滤标签键

TagFilters.N.Values.N
Array of String

tagvalue

过滤标签值

ResourceTrnList.N
Array of String

trn:ecs:cn-guilin-boe:2000000000:instance/i-ybndd8fy3rkdvbtuguu9

资源列表

ResourceTypeFilters.N
Array of String

instance

过滤资源类型

MaxResults
Integer

10

资源数量大小

NextToken
String

eyJOZXh0SW5mbyI6IntcIklEXCI6NzgzODg2MzV9IiwiU2lnblRpbWUiOjE2OTIyNjUwODksIlNpZ25hdHVyZSI6IjQ4ZTc2OWRkZDcxMmNhNDJmNzkxNjI2NDRiZmZlODA3MzZhNmVmMDVjM2FlNWEyYmZjY2I3YjIwZTI3MTY2NGEifQ==

分页参数

响应数据

名称
类型
示例值
描述
NextToken
String

eyJOZXh0SW5mbyI6IntcIklEXCI6NzgzODg2MzV9IiwiU2lnblRpbWUiOjE2OTIyNjUwODksIlNpZ25hdHVyZSI6IjQ4ZTc2OWRkZDcxMmNhNDJmNzkxNjI2NDRiZmZlODA3MzZhNmVmMDVjM2FlNWEyYmZjY2I3YjIwZTI3MTY2NGEifQ==

分页参数

ResourceTagMappingList
Array of ResourceTagMappingList

{
"ResourceTrn": "trn:ecs:cn-guilin-boe:2000000000:instance/i-ybndd8fy3rkdvbtuguu9",
"ResourceID": "i-ybndd8fy3rkdvbtuguu9",
"ResourceType": "instance",
"ServiceName": "ecs",
"Region": "cn-beijing",
"Tags": [
{
"Key": "tagkey",
"Value": "tagvalue",
"Type": "Custom"
}
]
}

资源标签映射关系

示例

请求

http://open.volcengineapi.com/?Action=GetResources&Version=2022-06-01

响应

{
    "ResponseMetadata": {
        "RequestId": "202308011906530E3C0CF2131383029AEC",
        "Action": "GetResources",
        "Version": "2022-06-01",
        "Service": "tag",
        "Region": "cn-north-1"
    },
    "Result": {
        "NextToken": "",
        "ResourceTagMappingList": [
            {
                "ResourceTrn": "trn:vpc:cn-beijing:2100138470:eip/eip-rrhkw91rw6psv0x57iv7",
                "ResourceID": "eip-rrhkw91rw6psv0x57iv7",
                "ResourceType": "eip",
                "ServiceName": "vpc",
                "Region": "cn-beijing",
                "Tags": [
                    {
                        "Key": "volc:ecs:linkedresource",
                        "Value": "trn:ecs:cn-beijing:2100138470:instance/i-yckp3e5m3l2udbueo8xu",
                        "Type": "System"
                    }
                ]
            }
        ]
    }
}

错误码

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