Querying DDM Instances

Function

This API is used to query DDM instances.

URI

GET /v1/{project_id}/instances?offset={offset}&limit={limit}

If a compiler (such as Xshell) is used to invoke this API by running commands or scripts, special character ampersands (&) should be escaped.

Example:

GET /v1/{project_id}/instances?offset={offset}\&limit={limit}

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Project ID of a tenant in a region

offset

Yes

Offset for pagination query. The start value cannot be less than 0.

limit

Yes

Number of records returned on each page. The value is greater than 0 and less than or equal to 128.

Request

Request parameters

None

Response

Response parameters

Table 2 Parameter description

Parameter

Type

Mandatory

Description

instances

Array

true

DDM instance information

instance_num

Integer

false

Number of DDM instances of a tenant

page_no

integer

true

Current page

page_size

integer

true

Number of data records on the current page

total_page

integer

true

Total number of pages

total_record

integer

true

Total number of data records

Table 3 Description of parameter instances

Parameter

Type

Mandatory

Description

id

String

true

DDM instance ID

status

String

true

DDM instance status

name

String

true

DDM instance name

created

String

true

Time when the DDM instance is created. The time must be in the format of yyyy-mm-dd Thh:mm:ssZ.

T is the separator between the calendar and the hourly notation of time. Z indicates the Coordinated Universal Time (UTC).

updated

String

true

Time when the DDM instance is last updated. The update time must be in the same format as the creation time.

available_zone

String

true

AZ name

vpc_id

String

true

VPC ID

subnet_id

String

true

Subnet ID

security_group_id

String

true

Security group ID

node_count

Integer

true

Number of nodes

access_ip

String

true

Address for accessing the DDM instance

access_port

String

true

Access port of the DDM instance

core_count

String

true

Number of CPUs

ram_capacity

String

true

Memory size in GB

error_msg

String

false

Response message. This parameter is not returned if no error occurs.

node_status

String

true

Node status

enterprise_project_id

String

true

Enterprise project ID

project_id

String

true

Project ID of a tenant in a region.

engine_version

String

true

Engine version (core version)

order_id

String

false

Order ID, which is returned if the DDM instance is billed on a yearly/monthly basis

Example

  • Example request

    None

  • Example response
    {
        "instances":
        [
            {
                "id":"d0b008c1ee95479d8799710d9f3a4097in09",
                "status":"RUNNING",
                "name":"ddm-test-001",
                "created":"2020-05-29T03:20:55+0000",
                "updated":"2020-06-03T13:14:08+0000",
                "available_zone":"az1xahz",
                "vpc_id":"1d9441c5-1a4b-431d-9edb-bf3564a83e74",
                "subnet_id":"c9e16b87-d2ab-4c9e-b9a6-485a3ce795cd",
                "security_group_id":"935929bd-dccd-4183-a21c-cf53ecf9cdcc",
                "node_count":3,
                "access_ip":"192.168.0.53,192.168.0.149,192.168.0.145",
                "access_port":"5066",
                "core_count":"2",
                "ram_capacity":"4",
                "node_status":"RUNNING,RUNNING,RUNNING",
                "project_id":"055d9f4ee780d4d42f96c01c1bc3c50c",
                "engine_version":"2.3.2"
            }
        ],
        "instance_num":1,
        "page_no":1,
        "page_size":1,
        "total_record":1,
        "total_page":1  
    }

For failure responses, see Abnormal Request Results.

Status Code

For details, see Status Codes.