最近更新时间:2024.02.26 20:17:37
首次发布时间:2022.12.07 17:14:42
为指定的资源绑定标签。
调用该 API 时的请求参数如下,除此之外还需传入公共请求参数。公共请求参数说明,请参见 公共参数。
参数名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | TagResources | 公共参数,本接口值:TagResources。 |
Version | String | 是 | 2022-05-12 | 公共参数,本接口值:2022-05-12。 |
ResourceType | String | 是 | Cluster | 绑定标签的资源类型。当前仅支持为集群和节点池绑定资源标签:
|
ResourceIds | Array of String | 是 | ["cc5silumrsfeq****"] | 资源 ID 列表,即集群 ID 列表或节点池 ID 列表。 注意
|
Tags | Array of Tag | 是 | 资源绑定标签信息。
|
POST /?Action=TagResources&Version=2022-05-12 HTTP/1.1 Content-Type:application/json { { "ResourceType": "Cluster", "ResourceIds": [ "cc5silumrsfeq****" ], "Tags": [ { "Key": "key", "Value": "value" } ] }
本接口无专有返回参数,公共返回参数请参见 返回结果。
HTTP/1.1 200 OK Content-Type:application/json { "ResponseMetadata": { "RequestId": "021635330810134****", "Action": "TagResources", "Version": "2022-05-12", "Service": "vke", "Region": "cn-beijing" }, "Result": {} }
本接口错误码如下表所示,公共错误码请参见 公共错误码。
HTTP状态码 | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | QuotaExceeded.{{ResourceType}} | The quota of {{ResourceType}} has reached the limit. | 创建标签资源达到系统限额。 |