Unbind tags

Last Updated: Jul 25, 2017

Description

A resource ID can be specified to unbind a tag on an instance, disk, snapshot, image, and security group.

Request parameter

Name Type Required? Description
Action String Yes Operation interface name, value: RemoveTags.
RegionId String Yes Indicates the resource region.
ResourceId String Yes Indicates the resource ID of the tag to be unbound.
ResourceType String Yes Resource type are categorized as follows:
  • image
  • instance
  • snapshot
  • disk
  • securitygroup
All values are in lowercase.
Tag.n.Key String No Indicates the tag key. The tag key can be up to 64 characters in length, where n ranges from 1 to 5.
Tag.n.Value String No Indicates the tag value. The tag value can be up to 128 characters in length, where n ranges from 1 to 5. If this parameter is not specified, the tag whose key is the specified Tag.n.Key will be unbound from the specified resource.

Return parameter

Name Type Description
RequestId String Request ID

Error type

Error code Description HTTP status code Meaning
MissingParameter The input parameter ResourceId that is mandatory for processing this request is not supplied. 400 ResourceId parameter is not specified.
InvalidResourceId.NotFound The specified ResourceId is not found in our records. 404 Specified ResourceId does not exist.
MissingParameter The input parameter RegionId that is mandatory for processing this request is not supplied. 400 RegionId parameter is not specified.
InvalidRegionId.NotFound The specified RegionId does not exist. 404 Specified RegionId does not exist.
InvalidResourceType.NotFound The ResourceType provided does not exist in our records. 404 Specified ResourceType does not exist.
InvalidTagCount The specified tags are beyond the permitted range. 400 More than 5 tags are specified.

Example

Request example

  1. https://ecs.aliyuncs.com/?Action=RemoveTags
  2. &ResourceId=s-946ntx4wr
  3. &ResourceType=snapshot
  4. &RegionId=cn-shenzhen
  5. &Tag.1.Key=test
  6. &Tag.1.Value=api
  7. &<Public request parameter>

Return example

XMLFormat

  1. <RemoveTagsResponse>
  2. <RequestId>6A2C8AB5-E15D-478C-B56A-CF3DAF060028</RequestId>
  3. </RemoveTagsResponse>

JSONFormat

  1. {
  2. "RequestId": "6A2C8AB5-E15D-478C-B56A-CF3DAF060028"
  3. }
Thank you! We've received your feedback.