Querying All Tags
Function
This API is used to query all tags of a user in the current project, including the keys and values. This facilitates tag management by group.
Calling Method
For details, see Calling APIs.
URI
GET /v1.0/{project_id}/{resource_type}/tags
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name. Constraints N/A Range Project ID of an account. The value contains 32 characters, consisting of lowercase letters and digits. Default Value N/A |
| resource_type | Yes | String | Definition: Resource type. Currently, its value can only be css-cluster. Constraints: N/A Value range: css-cluster: Indicates the cluster type. Default value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| tags | Array of ShowAllTagsTagsResp objects | Definition: List of cluster tags. Value range: N/A |
Example Requests
Query all cluster tags in a project.
GET https://{Endpoint}/v1.0/{project_id}/css-cluster/tags Example Responses
Status code: 200
Request succeeded.
{
"tags" : [ {
"key" : "key1",
"values" : [ "value1", "value2" ]
}, {
"key" : "key2",
"values" : [ "value1", "value2" ]
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
| 400 | Invalid request. The client should modify the request instead of re-initiating it. |
| 404 | The requested resource could not be found. The client should not repeat the request without modifications. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot