Querying All Tags of a Specific Resource
Function
This API is used to query all tags of a specific resource.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
dns:tag:get
Read
zone
-
-
-
ptr
-
URI
GET /v2/{project_id}/{resource_type}/tags
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
resource_type |
Yes |
String |
Resource type. The value can be DNS-public_zone, DNS-private_zone, DNS-public_recordset, DNS-private_recordset, or DNS-ptr_record. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition The user token. The token can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. For details about how to obtain a user token, seeObtaining a User Token. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
tags |
Array of tagValues objects |
Tag list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Key. It can contain a maximum of 128 Unicode characters. The tag key cannot be left blank. (This parameter is not verified in the search process.) |
|
values |
Array of strings |
Value list. Each value can contain a maximum of 255 Unicode characters. An asterisk (*) is a reserved character. If the value starts with an asterisk, fuzzy matching will work for the string following the asterisk. If this parameter is not specified, any value is matched. All values are in the OR relationship. |
Example Requests
None
Example Responses
Status code: 200
Tag list.
{
"tags" : [ {
"key" : "key1",
"values" : [ "value1", "value2" ]
}, {
"key" : "key2",
"values" : [ "value1", "value2" ]
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Tag list. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.