Updated on 2024-08-02 GMT+08:00

Querying DDM Instances

Scenarios

This section describes how to query all DDM instances of a tenant by configuring the pagination parameter in the required API for Querying DDM Instances.

Procedure

  1. Configure parameters limit and offset to query DDM instances.

    • API Information

      URI format: GET /v1/{project_id}/instances

      For details, see Querying DDM Instances.
      • Example request

        GET: https://{endpoint}/v1/743b4c0428d945316666666666666666/instances?offset=0&limit=1

        Obtain the endpoint from Regions and Endpoints.

        The limit value can be adjusted based on DDM instance data.

      • Example response
        {
        "instance_num":10,
        "instances":
        [
        {
        "id":"cab932b426ed4215a8d76b9d71322661in09",
        "status":"RUNNING",
        "name":"ddm-20-single-2u4g-1-202010231552401522260",
        "created":"2020-10-23T07:52:46+0000",
        "updated":"2020-10-23T07:59:56+0000",
        "available_zone":"az1xahz",
        "vpc_id":"9cf0f8f5-9748-4ebb-9905-bbe429182bd6",
        "subnet_id":"b35a4be7-65a5-4176-bec9-7a437493c498",
        "security_group_id":"9d10da6d-38cc-4cf0-8f96-c34940a3fd15",
        "node_count":1,
        "access_ip":"192.168.60.13",
        "access_port":"5066",
        "core_count":"2",
        "ram_capacity":"4",
        "node_status":"RUNNING",
        "enterprise_project_id":"0",
        "project_id":"070c071d8e80d58c2f42c0121b10cf9f",
        "engine_version":"2.5.10.10222119"
        }
        ],
        "page_no":1,
        "page_size":1,
        "total_record":10,
        "total_page":10
        }

  2. Collect query results.

    1. Repeat step 1 until the returned query result is empty or the returned body does not contain the instances field. This indicates that all DDM instances have been queried.
    2. The collected DDM instances are the desired query results.