El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.
Querying Cluster Details
Function
This API is used to query and display the details of a cluster.
Calling Method
For details, see Calling APIs.
URI
GET /v1.0/{project_id}/clusters/{cluster_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Parameter description: Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name. Constraints: N/A Options: For details about how to obtain the project ID and name, see Obtaining the Project ID and Name. Default value: N/A |
cluster_id |
Yes |
String |
Parameter description: Specifies the ID of the cluster to be queried. For details, see Obtaining the Cluster ID. Constraints: N/A Options: For details about how to obtain the cluster ID, see Obtaining the Cluster ID. Default value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
datastore |
ClusterDetailDatastore object |
Parameter description: Search engine. |
instances |
Array of ClusterDetailInstances objects |
Parameter description: List of node objects. |
publicKibanaResp |
publicKibanaRespBody object |
Parameter description: Kibana public network access information. |
elbWhiteList |
elbWhiteListResp object |
Parameter description: Public network access control information. |
updated |
String |
Parameter description: Last modification time of a cluster. The format is ISO8601: CCYY-MM-DDThh:mm:ss. |
name |
String |
Parameter description: Cluster name. |
publicIp |
String |
Parameter description: Public IP address and port number. |
created |
String |
Parameter description: Cluster creation time. The format is ISO8601: CCYY-MM-DDThh:mm:ss. |
id |
String |
Parameter description: Cluster ID. |
status |
String |
Parameter description: Cluster status. Options: 100: An operation, such as creation, is in progress.
|
endpoint |
String |
Parameter description: IPv4 address and port number accessed from the cluster's private network. [If the cluster type is KooSearch, this field indicates the internal address and port number for accessing the knowledge management service.] (tag:white) |
vpcId |
String |
Parameter description: VPC ID. |
subnetId |
String |
Parameter description: Current subnet of a cluster. This subnet is used to add nodes, including scaling, adding dedicated master/client nodes, and enabling the VPC Endpoint service. IP addresses will be allocated to newly added nodes from the current subnet. |
securityGroupId |
String |
Parameter description: Security group ID. |
vpcepIp |
String |
Parameter description: VPC endpoint IP address. |
vpcepIpv6Address |
String |
Parameter description: IPv6 address of the VPC endpoint. |
bandwidthSize |
Integer |
Parameter description: Public network bandwidth. Unit (Mbit/s). |
httpsEnable |
Boolean |
Parameter description: Communication encryption status. Options:
|
diskEncrypted |
Boolean |
Parameter description: Whether disks are encrypted. Options:
|
authorityEnable |
Boolean |
Parameter description: Whether to enable authentication. Available values include true and false. Authentication is disabled by default. Options:
|
backupAvailable |
Boolean |
Parameter description: Whether the snapshot function is enabled. Options:
|
actionProgress |
Object |
Parameter description: Cluster behavior progress, which shows the progress of cluster creation and scaling in percentage. |
actions |
Array of strings |
Parameter description: Current behavior of a cluster. REBOOTING indicates that the cluster is being restarted. GROWING indicates that the cluster is being scaled. RESTORING indicates that the cluster is being restored. SNAPSHOTTING indicates that the snapshot is being created. |
enterpriseProjectId |
String |
Parameter description: ID of the enterprise project that a cluster belongs. If the user of the cluster has not enabled the enterprise project, the setting of this parameter is not returned. |
tags |
Array of ClusterDetailTags objects |
Parameter description: Cluster tags. |
failedReason |
ClusterDetailFailedReasons object |
Parameter description: Failure cause. If the cluster is in the available status, this parameter is not returned. |
period |
Boolean |
Parameter description: Whether a cluster is billed on the yearly/monthly mode. Options:
|
bandwidthResourceId |
String |
Parameter description: ID of the resource accessible from the public network. |
ipv6Endpoint |
String |
Parameter description: IPv6 address and port number accessed from the cluster's private network. |
supportVpcep |
Boolean |
Parameter description: Whether the VPCEP service can be enabled for the current cluster. |
cmkId |
String |
Parameter description: Encryption key ID used by the current cluster. |
orderId |
String |
Parameter description: Order ID of a yearly/monthly cluster. |
currentSubnetIds |
String |
Parameter description: Subnets used by all nodes in the cluster. If there are multiple subnets (two at most), separate them with a comma (,). |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Parameter description: Engine type. Options: elasticsearch, logstash, or opensearch. |
version |
String |
Parameter description: Version of the CSS cluster engine. For details, see the supported versions in Before You Start. |
subVersion |
String |
Parameter description: Cluster image version. |
isEosCluster |
Boolean |
Parameter description: Whether the cluster image version has reached EOS. Options: true indicates that the image version has reached EOS; false indicates that the image version has not reached EOS. |
supportSecuritymode |
Boolean |
Parameter description: Whether the security mode is supported. Options: The value can be true (supported) or false (not supported). |
Parameter |
Type |
Description |
---|---|---|
status |
String |
Parameter description: Node status. Options:
|
resourceId |
String |
Parameter description: Instance resource ID. |
type |
String |
Parameter description: Type of the current node. |
id |
String |
Parameter description: Instance ID. |
name |
String |
Parameter description: Instance name. |
specCode |
String |
Parameter description: Node flavor name. |
azCode |
String |
Parameter description: AZ of a node. |
ip |
String |
Parameter description: Instance IP address. |
volume |
ShowClusterVolumeRsp object |
Parameter description: Instance disk information. |
subnetId |
String |
Parameter description: Subnet ID of the current node. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Parameter description: Instance disk type |
size |
Integer |
Parameter description: Instance disk size |
resourceIds |
Array of strings |
Parameter description: Instance disk resource ID |
Parameter |
Type |
Description |
---|---|---|
eipSize |
Integer |
Bandwidth range. Unit: Mbit/s |
elbWhiteListResp |
kibanaElbWhiteListResp object |
Parameter description: Kibana public network access control information. |
publicKibanaIp |
String |
Parameter description: Specifies the IP address for accessing Kibana. |
bandwidthResourceId |
String |
Parameter description: Resource ID corresponding to the Kibana public network |
Parameter |
Type |
Description |
---|---|---|
enableWhiteList |
Boolean |
Whether to enable Kibana access control. Options:
|
whiteList |
String |
Parameter description: Whitelist for Kibana public network access. |
Parameter |
Type |
Description |
---|---|---|
enableWhiteList |
Boolean |
Parameter description: Whether to enable public network access control. Options:
|
whiteList |
String |
Parameter description: Whitelist for public network access. |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Parameter description: Tag key. |
value |
String |
Parameter description: Tag value. |
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Parameter description: Error code. Options:
|
errorMsg |
String |
Parameter description: Specifies the error message. |
Example Requests
Whether the details of a cluster are obtained
GET https://{Endpoint}/v1.0/6204a5bd270343b5885144cf9c8c158d/clusters/5c2bab0d-ec5f-491f-9418-b8da38a26760
Example Responses
Status code: 200
Request succeeded.
{
"datastore": {
"type": "elasticsearch",
"version": "7.10.2",
"subVersion": "7.10.2_24.3.0_0827",
"isEosCluster": false,
"supportSecuritymode": false
},
"instances": [
{
"status": "200",
"type": "ess",
"id": "{INSTANCE_ID}",
"name": "css-8bc5-ess-esn-1-1",
"specCode": "ess.spec-4u8g",
"azCode": "{AZ_CODE}",
"volume": {
"type": "ULTRAHIGH",
"size": 40,
"resourceIds": [
"{RESOURCE_ID}"
]
},
"ip": "192.168.0.122",
"resourceId": "{RESOURCE_ID}",
"subnetId": "{SUBNET_ID}"
}
],
"publicKibanaResp": {
"eipSize": 10,
"publicKibanaIp": "100.95.152.28",
"elbWhiteListResp": null,
"bandwidthResourceId": "18bec13f-5cc1-4631-867f-33505d15be12"
},
"elbWhiteList": {
"whiteList": "",
"enableWhiteList": false
},
"updated": "2023-10-09T02:07:13",
"name": "css-8bc5",
"publicIp": "100.85.222.202",
"created": "2023-10-09T02:07:13",
"id": "{CLUSTER_ID}",
"status": "200",
"endpoint": "192.168.0.122:9200",
"vpcId": "{VPC_ID}",
"subnetId": "{SUBNET_ID}",
"securityGroupId": "{SECURITY_GROUP_ID}",
"bandwidthResourceId": "{BANDWIDTH_RESOURCE_ID}",
"bandwidthSize": 3,
"httpsEnable": true,
"authorityEnable": true,
"diskEncrypted": false,
"backupAvailable": false,
"actionProgress": {},
"actions": [],
"enterpriseProjectId": "0",
"tags": [],
"period": true,
"supportVpcep": true,
"currentSubnetIds": {SUBNET_ID}
}
SDK Sample Code
The SDK sample code is as follows.
Java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
package com.huaweicloud.sdk.test;
import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.css.v1.region.CssRegion;
import com.huaweicloud.sdk.css.v1.*;
import com.huaweicloud.sdk.css.v1.model.*;
public class ShowClusterDetailSolution {
public static void main(String[] args) {
// The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
// In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
String ak = System.getenv("CLOUD_SDK_AK");
String sk = System.getenv("CLOUD_SDK_SK");
String projectId = "{project_id}";
ICredential auth = new BasicCredentials()
.withProjectId(projectId)
.withAk(ak)
.withSk(sk);
CssClient client = CssClient.newBuilder()
.withCredential(auth)
.withRegion(CssRegion.valueOf("<YOUR REGION>"))
.build();
ShowClusterDetailRequest request = new ShowClusterDetailRequest();
request.withClusterId("{cluster_id}");
try {
ShowClusterDetailResponse response = client.showClusterDetail(request);
System.out.println(response.toString());
} catch (ConnectionException e) {
e.printStackTrace();
} catch (RequestTimeoutException e) {
e.printStackTrace();
} catch (ServiceResponseException e) {
e.printStackTrace();
System.out.println(e.getHttpStatusCode());
System.out.println(e.getRequestId());
System.out.println(e.getErrorCode());
System.out.println(e.getErrorMsg());
}
}
}
|
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# coding: utf-8
import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkcss.v1.region.css_region import CssRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkcss.v1 import *
if __name__ == "__main__":
# The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
# In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
ak = os.environ["CLOUD_SDK_AK"]
sk = os.environ["CLOUD_SDK_SK"]
projectId = "{project_id}"
credentials = BasicCredentials(ak, sk, projectId)
client = CssClient.new_builder() \
.with_credentials(credentials) \
.with_region(CssRegion.value_of("<YOUR REGION>")) \
.build()
try:
request = ShowClusterDetailRequest()
request.cluster_id = "{cluster_id}"
response = client.show_cluster_detail(request)
print(response)
except exceptions.ClientRequestException as e:
print(e.status_code)
print(e.request_id)
print(e.error_code)
print(e.error_msg)
|
Go
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
package main
import (
"fmt"
"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
css "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/css/v1"
"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/css/v1/model"
region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/css/v1/region"
)
func main() {
// The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
// In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
ak := os.Getenv("CLOUD_SDK_AK")
sk := os.Getenv("CLOUD_SDK_SK")
projectId := "{project_id}"
auth := basic.NewCredentialsBuilder().
WithAk(ak).
WithSk(sk).
WithProjectId(projectId).
Build()
client := css.NewCssClient(
css.CssClientBuilder().
WithRegion(region.ValueOf("<YOUR REGION>")).
WithCredential(auth).
Build())
request := &model.ShowClusterDetailRequest{}
request.ClusterId = "{cluster_id}"
response, err := client.ShowClusterDetail(request)
if err == nil {
fmt.Printf("%+v\n", response)
} else {
fmt.Println(err)
}
}
|
More
For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
400 |
Invalid request. Modify the request before retry. |
404 |
The requested resource could not be found. Modify the request before retry. |
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