Listing All Instances
Function
This API is used to query the instances of an account by the specified conditions.
Debugging
You can use API Explorer to debug this API.
URI
GET /v2/{project_id}/instances
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| engine | No | String | Message engine. Value: kafka. |
| name | No | String | Instance name. |
| instance_id | No | String | Instance ID. |
| status | No | String | Instance status. |
| include_failure | No | String | Whether to return the number of instances that fail to be created. If the value is true, the number of instances that failed to be created is returned. If the value is not true, the number is not returned. |
| exact_match_name | No | String | Whether to search for the instance that precisely matches a specified instance name. The default value is false*, indicating that a fuzzy search is performed based on a specified instance name. If the value is true, the instance that precisely matches a specified instance name is queried. |
| enterprise_project_id | No | String | Enterprise project ID. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| instances | Array of ShowInstanceResp objects | Instance list. |
| instance_num | Integer | Number of instances. |
| Parameter | Type | Description |
|---|---|---|
| name | String | Instance name. |
| engine | String | Message engine. |
| engine_version | String | Version. |
| specification | String | Instance specifications. |
| storage_space | Integer | Message storage space in GB. |
| partition_num | String | Number of partitions in a Kafka instance. |
| used_storage_space | Integer | Used message storage space in GB. |
| connect_address | String | IP address of an instance. |
| port | Integer | Port of an instance. |
| status | String | Instance status. |
| instance_id | String | Instance ID. |
| resource_spec_code | String | Resource specification code.
|
| charging_mode | Integer | Billing mode. The value 1 means pay-per-use, and 0 means yearly/monthly. |
| vpc_id | String | VPC ID. |
| vpc_name | String | VPC name. |
| created_at | String | Time when the instance was created. The time is a Unix timestamp in millisecond. |
| user_id | String | User ID. |
| user_name | String | Username. |
| order_id | String | Order ID. This parameter has a value only when the billing mode is yearly/monthly. |
| maintain_begin | String | Time at which the maintenance time window starts. The format is HH:mm:ss. |
| maintain_end | String | Time at which the maintenance time window ends. The format is HH:mm:ss. |
| enable_publicip | Boolean | Whether public access is enabled for an instance.
|
| management_connect_address | String | Connection address of the Kafka Manager of a Kafka instance. |
| ssl_enable | Boolean | Whether security authentication is enabled.
|
| enterprise_project_id | String | Enterprise project ID. |
| is_logical_volume | Boolean | Whether the instance is a new instance. This parameter is used to distinguish old instances from new instances during instance capacity expansion.
|
| extend_times | Integer | Number of disk expansion times. If the value exceeds 20, disk expansion is no longer allowed. |
| enable_auto_topic | Boolean | Whether to enable automatic topic creation.
|
| type | String | Instance type. The value can be cluster. |
| product_id | String | Product ID. |
| security_group_id | String | Security group ID. |
| security_group_name | String | Security group name. |
| subnet_id | String | Subnet ID. |
| available_zones | Array of strings | AZ to which the instance brokers belong. The AZ ID is returned. |
| total_storage_space | Integer | Message storage space in GB. |
| public_connect_address | String | Instance public access address. This parameter is available only when public access is enabled for the instance. |
| storage_resource_id | String | Storage resource ID. |
| storage_spec_code | String | I/O specifications. |
| service_type | String | Service type. |
| storage_type | String | Storage class. |
| retention_policy | String | Message retention policy. |
| kafka_public_status | String | Whether public access is enabled for Kafka. |
| public_bandwidth | Integer | Public network bandwidth. |
| kafka_manager_user | String | Username for logging in to Kafka Manager. |
| enable_log_collection | Boolean | Whether log collection is enabled. |
| cross_vpc_info | String | Cross-VPC access information. |
| ipv6_enable | Boolean | Whether IPv6 is enabled. |
| ipv6_connect_addresses | Array of strings | IPv6 connection address. |
| connector_enable | Boolean | Whether dumping is enabled. |
| connector_id | String | Dumping task ID. |
| rest_enable | Boolean | Whether Kafka REST is enabled. |
| rest_connect_address | String | Kafka REST connection address. |
| message_query_inst_enable | Boolean | Whether message query is enabled. |
| vpc_client_plain | Boolean | Whether intra-VPC plaintext access is enabled. |
| support_features | String | List of features supported by the Kafka instance. |
| trace_enable | Boolean | Whether message tracing is enabled. |
| pod_connect_address | String | Connection address on the tenant side. |
| disk_encrypted | Boolean | Whether disk encryption is enabled. |
| kafka_private_connect_address | String | Private connection address of a Kafka instance. |
| ces_version | String | Cloud Eye version. |
| tags | Array of TagEntity objects | Tag list. |
| Parameter | Type | Description |
|---|---|---|
| key | String | Tag key, which can contain a maximum of 36 Unicode characters. The key cannot be left blank or an empty string. It cannot contain nonprintable ASCII (0–31) characters and the following special characters: =*<>,|/ |
| value | String | Tag value, which can contain a maximum of 43 Unicode characters. The value cannot be left blank but can be an empty string. It cannot contain nonprintable ASCII (0–31) characters and the following special characters: =*<>,|/ |
Example Requests
GET https://{endpoint}/v2/{project_id}/instances Example Responses
Status code: 200
All instances are listed successfully.
{
"instances" : [ {
"name" : "kafka-2085975099",
"engine" : "kafka",
"port" : 9092,
"status" : "RUNNING",
"type" : "cluster",
"specification" : "100MB",
"engine_version" : "1.1.0",
"connect_address" : "192.168.0.100,192.168.0.61,192.168.0.72",
"instance_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"resource_spec_code" : "dms.instance.kafka.cluster.c3.mini",
"charging_mode" : 1,
"vpc_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"vpc_name" : "dms-test",
"created_at" : "1585618587087",
"product_id" : "00300-30308-0--0",
"security_group_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"security_group_name" : "Sys-default",
"subnet_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"available_zones" : [ "38b0f7a602344246bcb0da47b5d548e7" ],
"user_id" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"user_name" : "paas_dms",
"kafka_manager_user" : "root",
"maintain_begin" : "02:00:00",
"maintain_end" : "06:00:00",
"enable_log_collection" : false,
"storage_space" : 492,
"total_storage_space" : 600,
"used_storage_space" : 25,
"partition_num" : "300",
"enable_publicip" : false,
"ssl_enable" : false,
"management_connect_address" : "https://192.168.0.100:9999",
"cross_vpc_info" : "{\"192.168.0.61\":{\"advertised_ip\":\"192.168.0.61\",\"port\":9011,\"port_id\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"},\"192.168.0.72\":{\"advertised_ip\":\"192.168.0.72\",\"port\":9011,\"port_id\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"},\"192.168.0.100\":{\"advertised_ip\":\"192.168.0.100\",\"port\":9011,\"port_id\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"}}",
"storage_resource_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"storage_spec_code" : "dms.physical.storage.ultra",
"service_type" : "advanced",
"storage_type" : "hec",
"enterprise_project_id" : "0",
"is_logical_volume" : true,
"extend_times" : 0,
"retention_policy" : "produce_reject",
"ipv6_enable" : false,
"ipv6_connect_addresses" : [ ],
"connector_enable" : false,
"connector_id" : "",
"rest_enable" : false,
"rest_connect_address" : "",
"kafka_public_status" : "closed",
"public_boundwidth" : 0,
"message_query_inst_enable" : true,
"vpc_client_plain" : false,
"support_features" : "kafka.new.pod.port,feature.physerver.kafka.topic.modify,feature.physerver.kafka.topic.accesspolicy,message_trace_enable,features.pod.token.access,feature.physerver.kafka.pulbic.dynamic,roma_app_enable,features.log.collection,auto_topic_switch,feature.physerver.kafka.user.manager",
"trace_enable" : false,
"agent_enable" : false,
"pod_connect_address" : "100.86.75.15:9080,100.86.142.77:9080,100.86.250.167:9080",
"disk_encrypted" : false,
"kafka_private_connect_address" : "192.168.0.61:9092,192.168.0.100:9092,192.168.0.72:9092",
"enable_auto_topic" : false,
"ces_version" : "linux"
} ],
"instance_num" : 1
} Status Codes
| Status Code | Description |
|---|---|
| 200 | All instances are listed successfully. |
Error Codes
See Error Codes.
Last Article: Creating a Pay-per-Use Instance
Next Article: Querying an Instance
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.