Querying Tags of a Specified Cluster
Function
Tags are cluster identifiers. You can add tags to clusters to identify and manage cluster resources. You can add tags to a cluster when creating a cluster or add them on the details page of a created cluster. This API is used to query the tags of a specified cluster. It facilitates tag management.
Calling Method
For details, see Calling APIs.
URI
GET /v1.0/{project_id}/{resource_type}/{cluster_id}/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 Value range: Project ID of the account. Default value: N/A |
|
cluster_id |
Yes |
String |
Definition: ID of the cluster to be queried. For details about how to obtain the cluster ID, see Obtaining the Cluster ID. Constraints: N/A Value range: Cluster ID. 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 ShowTagsTagsResp objects |
Definition: List of cluster tags. Value range: N/A |
Example Requests
Query the tags of a cluster.
GET https://{Endpoint}/v1.0/{project_id}/css-cluster/4f3deec3-efa8-4598-bf91-560aad1377a3/tags
Example Responses
Status code: 200
Request succeeded.
{
"tags" : [ {
"key" : "key1",
"value" : "value1"
}, {
"key" : "key2",
"value" : "value3"
} ]
}
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.