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

Elastic Compute Service

Copy page
Download PDF
Volume tag
DescribeTags - Query Tags
Copy page
Download PDF
DescribeTags - Query Tags
Call the DescribeTags interface to query resources with bound tags.​
precautions​
  • Each call to this interface supports querying up to 10 tags at most.​
  • The same tag key supports querying up to 3 tag values simultaneously.​
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 interface-specific request parameters and some common parameters are listed below. For more information, see Common Parameters.​
Action string required Example value: DescribeTags​
Action required, possible values: DescribeTags​
​
Version string required Example value: 2020-04-01​
The version of the API is: 2020-04-01.​
​
ResourceType string required Example value: volume​
Resource Type, values:​
  • volume: cloud disk.​
  • Snapshot: snapshot.​
  • Snapshot Policy: automatic snapshot policy.​
  • snapshotgroup: snapshot consistency group.​
​
SysTagVisible boolean Optional Example: true​
Whether to display system tags. The range of values is as follows:​
  • true: Display system tags.​
  • false: Do not display system tags. The default value is false.​
​
TagFilters.N.Key string[] Optional Example value: TagFilters.1.Key=tag​
Specifying the tag key when querying resources by tags. Description as follows:​
  • TagFilters.N.Key: N indicates the sequence number of the tag key. Value range: 1~10.​
  • Use & to separate multiple tag keys; duplicates are not allowed.​
  • If this parameter is not provided, it implies querying all tags.​
  • When an empty string is passed, the error code InvalidTagFilterKey.Malformed is returned.​
​
TagFilters.N.Values.N string[] Optional Example value: TagFilters.1.Values.1=tag&TagFilters.1.Values.2=test​
Specifies the tag value when querying resources by tags. Description as follows:​
  • TagFilters.N.Values.N: The first N indicates the sequence number of the tag key. Value range: 1~10.​
  • TagFilters.N.Values.N: The second N indicates the sequence number of the tag value. Value range: 1 to 3.​
  • Separate multiple tag values with &.​
  • If this parameter is passed in, you must first pass in TagFilters.N.Key.​
  • Not providing this parameter means querying all tag values under the same tag key.​
  • When an empty string is entered, it means querying tags with empty tag values.​
​
ResourceIds.N string[] required Example value: ResourceIds.1=vol-76pwr6rilv8lzwxv****&ResourceIds.2=vol-76pwr6rilv8lzwxv****​
Resource ID required for querying tags. Description as follows:​
  • ResourceIds.N: N refers to the resource number. Value range: 1~50.​
  • Separate multiple resources with &.​
​
PageNumber integer Optional Example value: 1​
Page index.​
​
PageSize integer Optional Example value: 100​
Page capacity for pagination.​
​
​
​
Response Parameters​
Only the unique response parameters for this API are listed below. For more information, refer to the response structure.​
PageNumber integer Example: 1​
Page index.​
​
PageSize integer Example value: 100​
Page capacity for pagination.​
​
TotalCount integer Example: 3​
Total number of tags that meet the criteria.​
​
TagResources object[] Example value: -​
Tag information.​
ResourceId string Example: snap-3wr1z86cky4p5d6d****​
Resource ID.​
​
TagKey string Example value: user​
Tag key.​
​
ResourceType string Example: snapshot​
Resource Type, values:​
  • volume: cloud disk.​
  • Snapshot: snapshot.​
  • Snapshot Policy: automatic snapshot policy.​
  • SnapshotGroup: snapshot consistency group.​
​
TagValue string Example value: data​
Tag value.​
​
​
​
​
Request example​
​
GET /?Action=DescribeTags&Version=2020-04-01&ResourceIds.1=vol-***&ResourceType=volume&PageNumber=1&PageSize=15&SysTagVisible=true HTTP/1.1​
Host: open.volcengineapi.com​
Region: cn-beijing​
ServiceName: storage_ebs​
​
Back to example​
​
{​
"ResponseMetadata": {​
"RequestId": "20220308180931010225243139000DF***",​
"Action": "DescribeTags",​
"Version": "2020-04-01",​
"Service": "EBS",​
"Region": "cn-nanjing-bbit"​
},​
"Result": {​
"PageNumber": 1,​
"PageSize": 15,​
"TagResources": [],​
"TotalCount": 0​
}​
}​
​
error code​
The table below lists error codes related to the business logic of this API. For common error codes, see the Common Error Codes document.​
​
Status code​
error code​
error message​
Create Volume​
400​
ErrTagNotFound​
tag not found in request​
No tag found in the request.​
400​
ErrTagServiceUnavailable​
tag service unavailable​
Tag service is unavailable.​
400​
ErrResourceTypeNotFound​
resource type not found​
Resource type not found.​
400​
ErrMaximumTagFilterKeys​
too many tag filter keys​
Tag filter key exceeds the limit.​
400​
ErrTagFilterKeyConflict​
tag filter key conflict​
Tag filter key conflict.​
400​
ErrInvalidTagFilterKey​
tag filter key invalid​
Invalid tag filter key.​
400​
ErrMaximumTagFilterValues​
too many tag filter value​
The tag filter value exceeds the limit.​
400​
ErrInvalidTagFilterValue​
tag filter value invalid​
Invalid tag filter value.​
400​
ErrInvalidAccountId​
account id invalid​
Account ID is invalid.​
​
Last updated: 2026.01.09 18:19:56