Obtaining Cluster Configurations
Function
This API is used to query cluster configuration.
URI
POST /v5/{project_id}/container/kubernetes/clusters/configs/batch-query
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| enterprise_project_id | No | String | Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
| region | Yes | String | Region ID |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| cluster_info_list | Yes | Array of cluster_info_list objects | Cluster ID list |
| cluster_id_list | No | Array of strings | Cluster ID list |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total_num | Integer | Total number of configurations |
| data_list | Array of ClusterConfigResponseInfo objects | data list |
| Parameter | Type | Description |
|---|---|---|
| cluster_id | String | Cluster ID |
| protect_node_num | Integer | Number of protected nodes in a cluster |
| protect_interrupt_node_num | Integer | Number of nodes with protection interruption in a cluster |
| unprotect_node_num | Integer | Number of nodes with protection interruption in a cluster |
| node_total_num | Integer | Total number of nodes in a cluster |
| cluster_name | String | Cluster name |
| charging_mode | String | Billing mode: on_demand free |
| prefer_packet_cycle | Integer | Only purchase quota in pay-per-use mode is supported. The value is 0. |
| protect_type | String | CCE cluster protection type |
| protect_status | String | Protection status: The options are as follows: protecting: protected part_protect: partially protected creating: enabling error_protect: protection exception unprotect: unprotected wait_protect: protection pending |
| cluster_type | String | Cluster type |
| fail_reason | String | fail reason |
Example Requests
Query the configuration of the cluster whose name is cluster_name_test and ID is 6a321faa6e6c4a18b5bf19dd9543test.
POST https://{endpoint}/v5{project_id}/container/kubernetes/clusters/configs/batch-query?enterprise_project_id=0
{
"cluster_info_list" : {
"cluster_id" : "6a321faa6e6c4a18b5bf19dd9543test",
"cluster_name" : "cluster_name_test"
}
} Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot