调用DescribeTagKeys接口返回标签键。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vpc:DescribeTagKeys |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ResourceType |
string |
否 |
资源类型。取值:
|
VPC |
| Keyword |
string |
否 |
标签键。 |
keyword |
| RegionId |
string |
是 |
资源所属的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
| NextToken |
string |
否 |
是否拥有下一次查询的令牌(Token)。取值:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResult |
integer |
否 |
分页大小,取值范围:1~50,默认值:50。 |
50 |
| ResourceId |
array |
否 |
资源 ID。最多支持输入 50 个资源 ID。 |
|
|
string |
否 |
资源 ID。最多支持输入 50 个资源 ID。 说明
当输入该参数时,必须输入 ResourceType 参数。 |
vpc-bp16qjewdsunr41m1**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
object |
||
| NextToken |
string |
是否拥有下一次查询的令牌(Token)。取值:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
请求 ID。 |
DE65F6B7-7566-4802-9007-96F2494AC512 |
| TagKeys |
object |
||
| TagKey |
array<object> |
标签键集合。 |
|
|
object |
标签键集合。 |
||
| Type |
string |
标签键的类型。取值:
|
Custom |
| TagKey |
string |
标签键。 |
FinanceDept |
示例
正常返回示例
JSON格式
{
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "DE65F6B7-7566-4802-9007-96F2494AC512",
"TagKeys": {
"TagKey": [
{
"Type": "Custom",
"TagKey": "FinanceDept"
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | BothEmpty.TagsAndResources | The specified Tags and ResourcesIds are not allow to both empty. | 标签和资源组不能同时为空 |
| 400 | MissingParameter.TagKey | The input parameter TagKey that is mandatory for processing this request is not supplied. | 缺少参数TagKey |
| 400 | MissingParameter.TagValue | The input parameter TagValue that is mandatory for processing this request is not supplied. | 缺少参数TagValue |
| 400 | InvalidTagKey | The tag keys are not valid. | 无效的标签索引 |
| 400 | InvalidTagValue | The tag values are not valid. | 无效的标签值 |
| 400 | MissingParam | %s | |
| 400 | InvalidInstanceType.NotFound | The instance type is not found | 实例类型没有找到 |
| 400 | InvalidInstanceIds.NotFound | The instanceIds are not found | 实例ID没有找到 |
| 400 | Forbidden.TagKeys | The request do not allow to operate the tag keys | 没有权限操作TagKeys |
| 400 | QuotaExceeded.TagNum | Custom Tags quota exceeded | quota超限 |
| 400 | Forbidden.NotAllowedCategary | The System tag is not valid | 系统tag无效 |
| 400 | Forbidden.TagKey.Duplicated | The specified tag key already exists. | 标签资源重复 |
| 400 | SizeLimitExceeded.TagNum | The maximum number of tags is exceeded. | 标签数量超限 |
| 400 | SizeLimitExceeded.ResourceId | The maximum number of resource IDs is exceeded. | 资源组ID数目超限 |
| 403 | Forbidden | User not authorized to operate on the specified resource. | 您没有权限操作指定资源,请申请权限后再操作。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。