为指定的负载均衡实例添加标签。
接口说明
为指定的负载均衡实例添加标签。
调用该接口时,请注意:
-
每个负载均衡实例最多可绑定 10 个 Tag。
-
单次绑定的标签数最多为 5 对。
-
一个负载均衡实例下的所有 Tag 和 Key 不能重复。
-
当添加的标签与原有标签 Key 相同,但 Value 不同时,则覆盖原有的标签。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
slb:AddTags |
create |
*全部资源
|
|
无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
负载均衡实例的地域 ID。 |
cn-hangzhou |
| LoadBalancerId |
string |
是 |
负载均衡实例 ID。 |
lb-bp1kuzyb****** |
| Tags |
string |
是 |
需要添加的 Tag 列表。 |
[{"TagKey":"Key1","TagValue":"Value1"},{"TagKey":"Key2","TagValue":"Value2"}] |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
365F4154-92F6-4AE4-92F8-7FF34****** |
示例
正常返回示例
JSON格式
{
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34******"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter.TagValue | The specified tag value is illegal. | 指定的TagValue无效。请检查参数约束,并在修改后重试。 |
| 400 | QuotaExceeded.Tag | The number of Tag exceeds the limit. | Tag数量已达到配额上限。 |
| 400 | InvalidParameter.TagKey | The specified tag key is invalid. | 指定的TagKey无效。请检查参数约束,并在修改后重试。 |
| 400 | MissingParameter.Tags | The parameter Tags should not be null. | 参数Tags缺失。 |
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | 参数TagKey重复。 |
| 400 | NoPermission.Operator | The operator is not permission for this operate. | 操作者无权进行此操作。 |
| 400 | QuotaExceed.TagsPerResource | The maximum number of tags for each resource is exceeded. | 单个资源的标签配额超限。 |
| 400 | InvalidOperation.ConcurrentModification | The resource %s is modified concurrently. | 当前资源的tag正在添加中,请稍后重试。 |
| 400 | InnerRateLimiting | Internal service rate limiting, please try again later. | |
| 400 | SystemError | The request processing has failed due to unknow error, exception or failure. | 由于未知错误、异常或失败,请求处理失败。 |
| 400 | InternalInvokeError | The request processing has failed due to some unknown error, exception or failure. | 由于未知错误、异常或失败,请求处理失败。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。