Querying All Instances

Note

This API is out-of-date and may not be maintained in the future. Please use the API described in Listing All Instances.

Function

This API is used to query the instances of a tenant by set conditions.

URI

GET /v1.0/{project_id}/instances?engine={engine}&name={name}&status={status}&id={id}&includeFailure={includeFailure}&exactMatchName={exactMatchName}

Table 1 describes the parameters.

Table 1 Parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Indicates the ID of a project.

engine

String

No

Indicates the message engine. Value: kafka

name

String

No

Indicates the instance name.

id

String

No

Indicates the instance ID.

status

String

No

Indicates the instance status. For details, see Instance Status.

includeFailure

String

No

Indicates 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.

exactMatchName

String

No

Indicates 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.

Request

Request parameters

None.

Example request

GET https://{dms_endpoint}/v1.0/{project_id}/instances?start=1&limit=10&name=&status=&id=&includeFailure=true&exactMatchName=false

Response

Response parameters

Table 2 describes the parameters.

Table 2 Response parameters

Parameter

Type

Description

instances

Array

Indicates instance details.

instance_num

Integer

Indicates the number of instances.

Table 3 instance parameter description

Parameter

Type

Description

name

String

Indicates the instance name.

engine

String

Indicates the message engine.

engine_version

String

Indicates the engine version.

specification

String

Indicates the specifications of an instance.

storage_space

Integer

Indicates the message storage space. Unit: GB

partition_num

String

Indicates the maximum number of topics in a Kafka instance.

used_storage_space

Integer

Indicates the used message storage space. Unit: GB

connect_address

String

Indicates the IP address of an instance.

port

Integer

Indicates the port number of an instance.

status

String

Indicates the status of an instance. For details, see Instance Status.

instance_id

String

Indicates the instance ID.

resource_spec_code

String

Indicates the resource specifications identifier.

  • dms.instance.kafka.cluster.c3.mini: Kafka instance, 100 MB/s reference bandwidth

  • dms.instance.kafka.cluster.c3.small.2: Kafka instance, 300 MB/s reference bandwidth

  • dms.instance.kafka.cluster.c3.middle.2: Kafka instance, 600 MB reference bandwidth

  • dms.instance.kafka.cluster.c3.high.2: Kafka instance, 1200 MB reference bandwidth

charging_mode

Integer

Billing mode.

vpc_id

String

Indicates the ID of a VPC.

vpc_name

String

Indicates the name of a VPC.

created_at

String

Indicates the time when an instance is created.

The time is in the format of timestamp, that is, the offset milliseconds from 1970-01-01 00:00:00 UTC to the specified time.

user_id

String

Indicates the user ID.

user_name

String

Indicates the username.

maintain_begin

String

Indicates the time at which a maintenance time window starts.

Format: HH:mm:ss

maintain_end

String

Time at which the maintenance time window ends.

Format: HH:mm:ss

enable_publicip

Boolean

Indicates whether to enable public access for an instance.

  • true: enable

  • false: disable

ssl_enable

Boolean

Indicates whether to enable security authentication.

  • true: enable

  • false: disable

extend_times

Integer

Indicates the number of disk expansion times. If it exceeds 20, the disk cannot be expanded.

enable_auto_topic

Boolean

Indicates whether automatic topic creation is enabled.

  • true: enabled

  • false: disabled

type

String

Indicates the instance type. Value: cluster.

product_id

String

Indicates the product ID.

security_group_id

String

Indicates the security group ID.

security_group_name

String

Indicates the security group name.

subnet_id

String

Indicates the subnet ID.

available_zones

Array

Indicates the AZ to which the instance node belongs. The AZ ID is returned.

total_storage_space

Integer

Indicates the message storage space. Unit: GB

public_connect_address

String

Indicates the instance IP address for public access. This parameter is displayed only when public access is enabled.

storage_resource_id

String

Indicates the storage resource ID.

storage_spec_code

String

Indicates the I/O specification.

service_type

String

Indicates the service type.

storage_type

String

Indicates the storage type.

retention_policy

String

Indicates the message retention policy.

kafka_public_status

String

Indicates whether Kafka public access is enabled.

public_bandwidth

Integer

Indicates the public network bandwidth.

enable_log_collection

Boolean

Indicates whether log collection is enabled.

cross_vpc_info

String

Indicates cross-VPC access information.

ipv6_enable

Boolean

Indicates whether IPv6 is enabled.

ipv6_connect_addresses

Array of strings

Indicates the IPv6 connection address.

rest_enable

Boolean

Indicates whether the Kafka REST function is enabled.

rest_connect_address

String

Indicates the Kafka REST address.

message_query_inst_enable

Boolean

Indicates whether message query is enabled.

vpc_client_plain

Boolean

Indicates whether intra-VPC plaintext access is enabled.

support_features

String

Indicates the list of features supported by the Kafka instance.

trace_enable

Boolean

Indicates whether message tracing is enabled.

pod_connect_address

String

Indicates the connection address on the tenant side.

disk_encrypted

Boolean

Indicates whether disk encryption is enabled.

disk_encrypted_key

String

Indicates the ID of the KMS key if disk encryption is enabled.

public_resource_id

String

Indicates the public network resource ID.

This parameter is returned only when public access is enabled for the instance.

kafka_private_connect_address

String

Indicates the private connection address of a Kafka instance.

ces_version

String

Indicates the Cloud Eye version.

tags

Array<Object>

Indicates the list of tags.

Table 4 tags

Parameter

Type

Description

key

String

Indicates the tag key.

value

String

Indicates the tag value.

Example response

{
    "instances": [
        {
            "name": "kafka-lxy-test",
            "engine": "kafka",
            "port": 9093,
            "status": "RUNNING",
            "type": "cluster",
            "specification": "100MB",
            "engine_version": "2.3.0",
            "connect_address": "192.168.1.239,192.168.1.126,192.168.1.176",
            "instance_id": "8354dde6-8229-4ff4-844d-ab7121be9745",
            "resource_spec_code": "dms.instance.kafka.cluster.c3.mini",
            "charging_mode": 1,
            "vpc_id": "aaa5c155-7a9a-4d92-a804-e19cadcbca63",
            "vpc_name": "vpc-3a7f",
            "created_at": "1572866120990",
            "product_id": "00300-30308-0--0",
            "security_group_id": "3283b880-2256-498c-aa70-154f08f65331",
            "security_group_name": "Default_All",
            "subnet_id": "598d6280-a437-4c2f-9870-a4fc80e7ba66",
            "available_zones": [
                "xxx"
            ],
            "user_id": "674f286936eb47f28f4fa54b130d4db9",
            "user_name": "hby-cwx522020",
            "access_user": "root",
            "maintain_begin": "22:00:00",
            "maintain_end": "02:00:00",
            "storage_space": 492,
            "total_storage_space": 600,
            "used_storage_space": 25,
            "partition_num": "300",
            "enable_publicip": false,
            "ssl_enable": true,
            "storage_resource_id": "3d737481-04d7-4874-a04b-2b3d884eab99",
            "storage_spec_code": "dms.physical.storage.ultra",
            "service_type": "advanced",
            "storage_type": "hec",
            "retention_policy": "time_base",
            "kafka_public_status": "closed",
            "public_boundwidth": 0
        "disk_encrypted": false
        }
    ],
    "instance_num": 1}

Status Code

Table 5 describes the status code of successful operations. For details about other status codes, see Status Code.

Table 5 Status code

Status Code

Description

200

All instances are queried successfully.