edit-icon download-icon

AddTags

Last Updated: Apr 12, 2018

Description

Add tags for the specified Server Load Balancer instance.

Note:

  • You can bind up to 10 tags to a Server Load Balancer instance.

  • You can bind up to five pairs of tags once.

  • All the tag keys added to a Server Load Balancer instance cannot be the same.

  • If you add a tag of which the key is the same as that of an existing tag but the value is different, the new tag overwrites the existing one.

Request parameters

Name Type Required Description
Action String Yes

The action to perform. Valid value:

AddTags

RegionId String Yes The region ID of the Server Load Balancer instance.
LoadBalancerID String Yes The ID of the Server Load Balancer instance.
Tags JSON String Yes

The tags to add.

A maximum of five tags can be contained.

Tags objects
TagKey String Yes

The key of the tag.

It can contain up to 64 characters, and cannot start with aliyun or be empty.

TagValue String No

The value of the tag.

It can contain up to 128 characters and cannot start with aliyun.

Response parameters

Name Type Description
RequestId String The ID of the request.

Examples

Request example

  1. https://slb.aliyuncs.com/
  2. &Action=AddTags
  3. &RegionId=cn-east-hangzhou-01
  4. &LoadBalancerID=139a00604ad-cn-east-hangzhou-01
  5. &Tags=[
  6. {"TagKey":"Key1","TagValue":"Value1"}
  7. {"TagKey":"Key2","TagValue":"Value2"}]
  8. &<Common parameters>

Response example

  • XML format

    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <AddTagsResponse>
    3. <RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
    4. </AddTagsResponse>
  • JSON format

    1. {
    2. "RequestId":"365F4154-92F6-4AE4-92F8-7FF34B540710",
    3. }
Thank you! We've received your feedback.