You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Tags
DeleteTags - Deletes tags (earlier version)
Copy page
Download PDF
DeleteTags - Deletes tags (earlier version)
Call the DeleteTags operation to delete tags from one or multiple resources.​
Usage notes​
Warning​
This page describes the tag-targeted operation of the earlier version, which may be ​discontinued in the future. Tag-targeted interfaces of the new version support a wider range of scenarios. We recommend that new users use tag-targeted interfaces of the following new versions. Learn more.​
Usage notes​
  • This operation supports deleting a maximum of 20 tags per query.​
  • Repeatedly disassociating a tag overrides the original result and updates the tag value.​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Only the request parameters specific to this operation and some common parameters are listed below. For more information, refer to Common parameters.​
Action string required Sample value: DeleteTags​
The operation that you want to perform. Value: DeleteTags.​
​
Version string required Sample value: 2020-04-01​
The version of the API. Valid value: 2020-04-01.​
​
ClientToken string Optional Sample value: 333456899ff****​
The ClientToken is used to ensure the request idempotency. You can use the client to automatically generate a token, but you must make sure that the token is unique among different requests. This prevents repeated actions due to multiple client retries when the call of the API action times out or an internal server error occurs.​
Value: Only ASCII characters are supported. The length is no more than 64 ASCII characters.​
​
ResourceIds.N string[] required Sample value: ResourceIds.1=i-l8u0p77yseabkpak****&ResourceIds.2=i-l8u0p7xyseabkbak****​
The resource ID.​
  • Argument - N: indicates the serial number of the resource. Valid range: 1-50.​
  • Separate resources with &.​
​
ResourceType string required Sample value: instance​
The resource type. Valid values:​
  • instance: instance​
  • image: image​
  • reservedinstance: Reserved Instances (RI)​
  • scheduledinstance: Elastic Scheduled Instances (ESI)​
  • keypair: key pair​
​
TagKeys.N string[] required Sample value: TagKeys.1=k1​
The tag key of the tag to be deleted from the resource.​
  • Argument - N: specifies the serial number of the tag key. Valid range: 1–20.​
  • Separate multiple tag keys with &.​
Naming rules:​
  • Cannot start with volc: or sys: in any case form.​
Tags that start with volc: or sys: are reserved for the system. You cannot create tags starting with them.​
  • It can contain only language characters, digits, spaces, and English symbols of " _", ".", ":", "/", "=", "+", "-", and "@".​
  • It must be 1 to 128 characters in length.​
​
​
​
Response parameters​
Only the response parameters specific to this operation are listed below. For more information, refer to Response structure.​
tip​
The following error codes for the operation are returned only when invalid values are specified for request parameters. If valid values are specified for the request parameters, no error code is displayed, and a status code of 200 is returned. However, this does not mean that the operation on all resources is successful. To view the operation result on a single resource, see the information in the following response parameters.​
OperationDetails object[] Sample value: --​
The operation details.​
Error object Sample value: --​
The error message for the resource being operated on.​
Code string Sample value: InvalidInstance.NotFound​
The error code for the failure of a specific individual request during batch operations. Valid values:​
  • InvalidResourceId.NotFound: The specified resource does not exist.​
  • InternalError: An internal error occurred. Try again. If multiple attempts fail, submit a ticket.​
  • FlowLimitExceeded: You have exceeded the rate limit for resource requests.​
tip​
Each Code corresponds to a Message in sequence.​
​
Message string Sample value: The specified instance does not exist.​
The error information for the failure of a specific individual request during batch operations. Valid values:​
  • The specified ResourceId does not exist.​
  • An internal error has occurred.​
  • You've reached the limit on request rate of resources.​
tip​
Each Code corresponds to a Message in sequence.​
​
​
ResourceId string Sample value: i-l8u0p77yseabkpak****​
The ID of the target resource.​
​
​
​
​
Sample request​
​
GET /?Action=DeleteTags&Version=2020-04-01&ResourceType=instance&ResourceIds.1=i-l8u0p77yseabkpak****&ResourceIds.2=i-l8u0p7xyseabkbak****&TagKeys.1=k1 HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
Region: cn-beijing​
ServiceName: ecs​
​
Sample response​
​
{​
"ResponseMetadata": {​
"RequestId": "2021062415303301022514515207C4****",​
"Action": "DeleteTags",​
"Version": "2020-04-01",​
"Service": "ecs",​
"Region": "cn-beijing"​
},​
"Result": {​
"OperationDetails": [​
{​
"Error": null,​
"ResourceId": "i-l8u0p77yseabkpak****"​
},​
{​
"Error": {​
"Code": "InvalidResourceId.NotFound",​
"Message": "The specified ResourceId does not exist."​
},​
"ResourceId": "i-l8u0p7xyseabkbak****"​
}​
]​
}​
}​
​
Error codes​
The table below lists the business-related error codes of the operation. For more information, refer to Common error codes.​
​
Status code​
Error code​
Error message​
Description​
400​
IdempotentParameterMismatch​
The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.​
The idempotent parameters are inconsistent.​
400​
InvalidArgument​
The specified argument is invalid.​
The specified parameter is invalid.​
400​
InvalidClientToken.Malformed​
The specified ClientToken is malformed.​
The specified ClientToken is invalid.​
400​
InvalidTagKey.Malformed​
The specified TagKey is malformed.​
The specified tag key is invalid.​
400​
LimitExceeded.MaximumResourceIds​
You've reached the limit on the number of ResourceIds that you can set.​
The specified number of resource IDs exceeds the limit.​
400​
LimitExceeded.MaximumTagKeys​
You've reached the limit on the number of TagKeys that you can set.​
The specified tag key is out of range.​
404​
InvalidResourceId.NotFound​
The specified ResourceId does not exist.​
The specified resource does not exist.​
404​
InvalidResourceType.NotFound​
The specified ResourceType does not exist.​
The specified resource type does not exist.​
404​
InvalidTagKey.NotFound​
The specified TagKey does not exist.​
The specified tag key does not exist.​
412​
IdempotentProcessing​
The request uses the same client token as a previous one that is still in process.​
The previous idempotent request is still in process. Please try again later.​
500​
InternalError​
An internal error has occurred.​
An internal error occurred. Try again. If multiple attempts fail, submit a ticket.​
​
​
Last updated: 2026.06.18 17:48:24