为资源实例绑定资源标签。
接口说明
使用说明
标签是您为实例分配的标记,每个标签都由一对键值对(Key-Value)组成。标签的使用说明如下:
一个实例上的每条标签的标签键(Key)必须唯一。
不支持未绑定实例的空标签存在,标签必须绑定在实例上。
单个实例最多可绑定 20 条标签。绑定标签前,阿里云会校验资源已有标签数量。超过限制值后返回报错信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vpc:TagResources |
update |
Ipam
IpamPool
IpamScope
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
资源所属的地域 ID。 |
cn-beijing |
| ResourceId |
array |
是 |
资源 ID 列表。 |
|
|
string |
否 |
资源 ID。最多支持输入 20 个资源 ID。 说明
调用该 API 时,ResourceId.N 参数必须输入。 |
ipam-uq5dcfc2eqhpf4**** |
|
| ResourceType |
string |
是 |
资源类型。取值:
|
IPAM |
| Tag |
array<object> |
是 |
标签列表。 |
|
|
object |
否 |
标签列表。 |
||
| Key |
string |
否 |
资源的标签键。最多支持输入 20 个标签键。一旦传入该值,则不允许为空字符串。 最多支持 64 个字符,必须以字母或中文开头,可包含数字、半角句号(.)、下划线(_)和短划线(-),不能以 |
FinanceDept |
| Value |
string |
否 |
资源的标签值。最多支持输入 20 个标签值。一旦传入该值,可以为空字符串。 最多支持 128 个字符,不能包含 |
FinanceJoshua |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回的信息列表。 |
||
| RequestId |
string |
请求 ID。 |
BF872550-9700-52FD-839C-4D3F05543FA8 |
示例
正常返回示例
JSON格式
{
"RequestId": "BF872550-9700-52FD-839C-4D3F05543FA8"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | MissingParameter.ResourceIds | The input parameter ResourceIds that is mandatory for processing this request is not supplied. | 参数ResourceIds未传入。 |
| 400 | MissingParameter.ResourceType | The input parameter ResourceType that is mandatory for processing this request is not supplied. | 参数ResourceType未传入。 |
| 400 | MissingParameter.TagKey | The input parameter TagKey that is mandatory for processing this request is not supplied. | 参数TagKey未传入。 |
| 400 | MissingParameter.Tags | The input parameter Tags that is mandatory for processing this request is not supplied. | 参数Tags未传入。 |
| 400 | MissingParameter.TagValue | The input parameter TagValue that is mandatory for processing this request is not supplied. | 参数TagValue未传入。 |
| 400 | IllegalParamSize.ResourceIds | The number of Param ResourceIds exceeded the limit. | 传入的ResourceIds参数超过数量限制。 |
| 400 | IllegalParamSize.Tags | The number of Parameter Tags exceeded the limit. | 传入的Tags参数超过数量限制。 |
| 400 | DuplicatedParam.TagKey | TagKey duplicate. | TagKey参数重复。 |
| 400 | ResourceNotFound.Ipam | The specified resource of ipam is not found. | 输入的IPAM不存在。 |
| 400 | ResourceNotFound.IpamScope | The specified resource of IPAM scope is not found. | 输入的IPAM作用范围不存在。 |
| 400 | IllegalParam.TagKey | The input parameter TagKey is invalid. | 参数TagKey非法。 |
| 400 | DuplicatedParam.ResourceIds | The parameter of ResourceIds contains duplicate values. | |
| 404 | ResourceNotFound.IpamPool | The dependent IPAM pool is not found. | 依赖资源IPAM Pool不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。