Binding labels
Describe
Tag allows to be created on an ECS instance, disk, snapshot, mirror, security group.
You can bind up to 10 tags per resource.
If the Key to bind Tag already exists on the specified resource, the Value is overwritten.
Tag.n.key and Tag.n.value must be one by one matched.
Request parameters
name |
type |
must |
describe |
action |
|
operation interface name, Addtags. |
regionid |
string |
|
Resource-owned territory." |
resourceid |
string< /td> |
|
|
resourcetype |
strin G |
is |
Resource type:
- image< /li>
- instance
- Snapshot
- Disk
- Securitygroup
All values are lowercase. |
tag.n.key |
string |
|
supports up to 64 characters does not support Aliyun does not support http://and https://opening is not allowed as an empty string. |
tag.n.value |
string |
|
supports up to 128 characters does not support Aliyun does not support http://and https://opening allow empty strings. |
return parameters
name |
type |
Description |
RequestID |
String |
Request ID |
Error code
Error code |
Description |
HTTP status Code |
Semantics |
Missingparameter |
The input parameter "ResourceID" is mandatory to processing this request isn't supplied. |
400 |
ResourceID parameter not specified |
Invalidresourceid.notfound |
The specified ResourceID isn't found in our records |
60v |
The specified ResourceID does not exist |
Missingparameter |
The input parameter "RegionID" is mandatory to processing this request isn't supplied. |
400 |
RegionID parameter not specified |
Invalidregionid.notfound |
The RegionID provided does not exist at our records. |
404 |
The specified RegionID does not exist |
Missingparameter |
The input parameter "ResourceType" is mandatory to processing this request isn't supplied. |
400 |
ResourceType parameter not specified |
Invalidresourcetype.notfound |
The resourcetype provided does not exist at our records. |
404 |
The specified resourcetype does not exist |
Missingparameter.tagkey |
The input parameter "Tag.n.key" is mandatory to processing this request isn't supplied. |
400 |
Tag.n.key parameter not specified |
Invalidtagkey.malformed |
The specified Tag.n.key is not valid |
400 |
The specified Tag.n.key is illegal |
Missingparameter.tagvalue |
The input parameter "Tag.n.value" is mandatory to processing this request isn't supplied. |
400 |
Tag.n.value parameter not specified |
Invalidtagvalue.malformed |
The specified tag.n.value is not valid |
400 |
The specified tag.n.value is illegal |
Operationdenied.quotaexceed |
The quota of tags on resource is beyond permitted range |
400 |
There are more than 10 user tags on the resource |
Invalidtag.mismatch |
The specified Tag.n.key and Tag.n.value are not match |
400 |
Tag.n.key and Tag.n.value no one by one correspondence. |
Invalidtagcount |
The specified tags are beyond the permitted range |
400 |
The specified number of tags exceeds 5 |
invalidresourceid.notsupported |
The specified ResourceID does not support tagging |
403 |
The specified resource ID does not support playing Tag |
Example
Request sample
Https://ecs.aliyuncs.com/?Action=AddTags
&resourceid=s-946ntx4wr
&resourcetype=snapshot
®ionid=cn-shenzhen
&tag.1.key=test
&tag.1.value=api
&< Public Request Parameters >
Return sample