Creates tags and attaches the tags to one or more file systems.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | TagResources |
The operation that you want to perform. Set the value to TagResources. |
ResourceId.N | RepeatList | Yes | 03e08484f0 |
The ID of the resource N. The ID of the file system for which you want to create a tag. Valid values of N: 1 to 50. |
ResourceType | String | Yes | filesystem |
The type of the resource. Set the value to filesystem. |
Tag.N.Key | String | Yes | nastest |
The key of the tag N. Limits:
|
Tag.N.Value | String | Yes | filetest |
The value of the tag N. Limits:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 2D69A58F-345C-4FDE-88E4-BF518948**** |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=TagResources
&ResourceId.1=03e08484f0
&ResourceType=filesystem
&Tag.1.Key=nastest
&Tag.1.Value=filetest
&<Common request parameters>
Sample success responses
XML
format
<TagResorucesResponse>
<RequestId>2D69A58F-345C-4FDE-88E4-BF518948****</RequestId>
</TagResourcesResponse>
JSON
format
{"RequestId":"2D69A58F-345C-4FDE-88E4-BF518948****"}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | NumberExceed.ResourceIds | The maximum number of ResourceIds is exceeded. The maximum is 50. | The error message returned because the number of resource IDs has exceeded the upper limit. You can specify a maximum of 50 resource IDs. |
400 | MissingParameter.ResourceIds | You must specify ResourceIds. | The error message returned because the ResourceId parameter is not specified. |
400 | Duplicate.ResourceId | The request contains duplicated ResourceId. | The error message returned because the resource ID already exists. |
400 | NumberExceed.Tags | The maximum number of Tags is exceeded. The maximum is 20. | The error message returned because the number of tags has exceeded the upper limit. You can create a maximum of 20 tags. |
400 | Duplicate.TagKey | The Tag.N.Key contains a duplicated key. | The error message returned because the value of the TagKey parameter already exists. |
400 | InvalidResourceId.NotFound | The ResourceId does not exist. | The error message returned because the resource ID does not exist. |
400 | InvalidParameter.TagKey | The specified Tag.n.Key is invalid. | The error message returned because the value of the TagKey parameter is invalid. |
400 | InvalidParameter.TagValue | The specified Tag.n.Value is invalid. | The error message returned because the value of the TagValue parameter is invalid. |
403 | OperationDenied.KeyValueNotNull | The key value cannot be null. | The error message returned because the Tag.N.Value parameter is not specified. |
400 | CustomTag.NumberExceed | The maximum number of system tags for each resource is 20. | The error message returned because the number of added tags has exceeded the upper limit. You can add a maximum of 20 tags to each resource. |
For a list of error codes, visit the API Error Center.