Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of using DescribeTags to query available tags

Shulou Source: shulou.com Published: 2022-06-02 04:22:50 10月29日 Update

This article mainly introduces the method of using DescribeTags to query the tags that can be used, which has a certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

DescribeTags

Query the tags that are available to you. You can query tags based on criteria such as resource type, resource ID, tag key or tag value. The filter conditions are logical and (&), and return tags that meet all filter criteria.

Description

If you specify a tag key (Tag.n.Key) but no tag value (Tag.n.Value), we will query all tag key value pairs corresponding to that tag key. If you specify a label key-value pair, query the tag that exactly matches that key-value pair.

Request parameter

Return parameters

Example

Request example

Https://ecs.aliyuncs.com/?Action=DescribeTags&ResourceType=snapshot&ResourceId=s-946ntx4wr&RegionId=cn-hangzhou&Tag.1.Key=test&Tag.1.Value=api&

Return the example

XML format

B04B8CF3-4489-432D-83BA-6F128E4F2295 1 50 test api 1

JSON format

{"PageNumber": 1, "PageSize": 50, "RequestId": "B04B8CF3-4489-432D-83BA-6F128E4F2295", "Tags": {"Tag": [{"TagKey": "test", "TagValue": "api"}]}, "TotalCount": 1}

Error code

The following are the error codes specific to this API. For more error codes, please visit the API error Center.

Thank you for reading this article carefully. I hope it is helpful for everyone to share the methods and contents of using DescribeTags to query the tags that can be used. At the same time, I also hope that you can support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

Tags: Tags queries errors methods conditions examples articles parameters formats resources precision between value content at the same time interfaces more friends types ribbons Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn MySQL OPPO Reno Shulou Information macOS