Adds tags to a file system or overwrites existing tags.

Limits

  • Each tag includes a TagKey and a TagValue.
  • Placeholders at the start and end of each TagKey and TagValue are automatically removed. These placeholders include the spacebar ( ), tab (\t), line break (\n), and carriage return (\r).
  • You must specify a TagKey. You can leave a TagValue empty.
  • A TagKey and TagValue are not case-sensitive.
  • A TagKey can be a maximum of 64 characters in length. A TagValue can be a maximum of 128 characters in length.
  • You can add a maximum of 10 tags to a file system at a time. If you add two tags with the same TagKey, the new tag added will overwrite the existing tag.
  • If you remove a tag from all linked file systems, the tag is automatically deleted.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AddTags

The operation that you want to perform. Set the value to AddTags.

FileSystemId String Yes 0addcw13cd

The ID of the file system.

Tag.N.Key String No keyN

The key of each tag. The tag includes a TagKey and TagValue. You can add a maximum of 10 tags at a time. You must specify a TagKey. You can leave a TagValue empty.

Tag.N.Value String No valueN

The value of each tag. The tag includes a TagKey and TagValue. You can add a maximum of 10 tags at a time. You must specify a TagKey. You can leave a TagValue empty.

Response parameters

Parameter Type Example Description 
RequestId String 98696EF0-1607-4E9D-B01D-F20930B68845

The ID of the request.

Examples

Sample requests

GET https://nas.cn-hangzhou.aliyuncs.com/?Action=AddTags
&FileSystemId=109c042666
&Tag.1.Key=test_key
&Tag.1.Value=test_value
&<Common request parameters>

Sample success responses

XML format

<AddTagsResponse>
    <RequestId>98696EF0-1607-4E9D-B01D-F20930B68845</RequestId>
</AddTagsResponse>

JSON format

{
  "RequestId":"98696EF0-1607-4E9D-B01D-F20930B68845"
}

Error codes

For a list of error codes, visit the API Error Center.