• Relational Database Service

rds
  1. Help Center
  2. Relational Database Service
  3. API Reference
  4. API v1
  5. DB Instance Management
  6. Obtaining Detailed Information of a Specified DB Instance

Obtaining Detailed Information of a Specified DB Instance

Function

This API is used to obtain detailed information of a specified DB instance.

URI

  • URI format

    PATH: /rds/{versionId}/{project_id}/instances/{instanceId}

    Method: GET

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    versionId

    Yes

    Specifies the API version. It is case-sensitive and the value is v1.

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    instanceId

    Yes

    Specifies the ID of the queried DB instance.

Request

N/A

Normal Response

  • Parameter description
    Table 2 Parameter description

    Name

    Type

    Description

    id

    String

    Indicates the DB instance ID.

    status

    String

    Indicates the DB instance status.

    Value:
    • If the value is BUILD, the instance is being created.
    • If the value is ACTIVE, the instance is normal.
    • If the value is FAILED, the instance is abnormal.
    • If the value is MODIFYING, the instance is being scaled up.
    • If the value is REBOOTING, the instance is being rebooted.
    • If the value is RESTORING, the instance is being restored.

    name

    String

    Indicates the created DB instance name.

    created

    String

    Indicates the creation time in the "yyyy-mm-dd Thh:mm:ssZ" format.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.

    NOTE:

    The value is empty when the DB instance is being created. After the DB instance is created, the value is not empty.

    hostname

    String

    Indicates the DB instance connection address. It is a blank string until an ECS is created.

    type

    String

    Indicates the DB instance type, which can be master, slave, or readreplica.

    region

    String

    Indicates the region where the DB instance is deployed.

    updated

    String

    Indicates the updated time, which is the same as created in the format.

    NOTE:

    The value is empty when the DB instance is being created. After the DB instance is created, the value is not empty.

    availabilityZone

    String

    Indicates the AZ.

    vpc

    String

    Indicates the VPC ID.

    nics

    Dictionary data structure. For details, see Table 3.

    Indicates the nics information.

    securityGroup

    Dictionary data structure. For details, see Table 4.

    Indicates the security group information.

    flavor

    Dictionary data structure. For details, see Table 5.

    Indicates the specification information.

    volume

    Dictionary data structure. For details, see Table 6.

    Indicates the volume information.

    dataStoreInfo

    Dictionary data structure. For details, see Table 7.

    Indicates the database information.

    dbPort

    Int

    Indicates the database port number.

    backupStrategy

    Dictionary data structure. For details, see Table 8.

    Indicates the advanced backup policy.

    slaveId

    String

    Indicates the standby DB instance ID.

    ha

    Dictionary data structure. For details, see Table 9.

    Indicates the primary/standby DB instance information. It is returned only when you obtain the primary/standby DB instance information.

    replicaOf

    String

    Returned only when you obtain the read replica information.

    Table 3 nics field data structure description

    Name

    Type

    Description

    subnetId

    String

    Indicates the subnet ID.

    Table 4 securityGroup field data structure description

    Name

    Type

    Description

    id

    String

    Indicates the DB engine type.

    Table 5 flavor field data structure description

    Name

    Type

    Description

    id

    String

    Indicates the specification ID.

    Table 6 volume field data structure description

    Name

    Type

    Description

    type

    String

    Indicates the volume type.

    Its value can be any of the following and is case-sensitive:

    • COMMON: indicates the SATA type.
    •  
    • ULTRAHIGH: indicates the SSD type.

    size

    Int

    Indicates the volume size.

    Its value range is from 40 GB to 4000 GB.

    used

    Double

    Indicates the disk usage.

    Its value range is from 0 GB to 4000 GB.

    Table 7 dataStoreInfo field data structure description

    Name

    Type

    Description

    type

    String

    Indicates the DB engine type.

    version

    String

    Indicates the database version.

    Table 8 backupStrategy field data structure description

    Name

    Type

    Description

    startTime

    String

    Indicates the backup start time that has been set. The backup task will be triggered within one hour after the backup start time.

    The time is in the UTC format.

    keepDays

    Int

    Indicates the number of days to retain the generated backup files.

    The value range is from 0 to 732. If this parameter is 0, the automated backup policy is not set.

    Table 9 ha field data structure description

    Name

    Type

    Description

    replicationMode

    String

    Indicates the replication mode for the standby DB instance.

    The value cannot be empty.

    • For MySQL, the value is async or semisync.
    • For PostgreSQL, the value is async or sync.
    • For Microsoft SQL Server, the value is sync.
    NOTE:
    • async indicates the asynchronous replication mode.
    • semisync indicates the semi-synchronous replication mode.
    • sync indicates the synchronous replication mode.
  • Response example

    Single DB instance:

    {
        "instance": {
            "id": "252f11f1-2912-4c06-be55-1999bde659c5",
            "status": "BUILD",
            "name": "trove-instance-rep3",
            "created": "2016-06-18T21:21:50+0200",
            "hostname": "192.168.0.132",
            "type": "master",
            "region": "eu-de",
            "updated": "2016-06-18T21:21:50+0200",
            "availabilityZone": "eu-de-01",
            "vpc": "490a4a08-ef4b-44c5-94be-3051ef9e4fce",
            "nics": {
                "subnetId": "0e2eda62-1d42-4d64-a9d1-4e9aa9cd994f"
            },
            "securityGroup": {
                "id": "2a1f7fc8-3307-42a7-aa6f-42c8b9b8f8c5"
            },
            "flavor": {
                "id": "bf07a6d4-844a-4023-a776-fc5c5fb71fb4"
            },
            "volume": {
                "type": "COMMON",
                "size": 100,
                "used": "14.99"
            },
            "dataStoreInfo": {
                "type": "MySQL",
                "version": "5.7"
            },
            "dbPort": 8635,
            "backupStrategy": {
                "startTime": "01:00:00",
                "keepDays": 3
            }
        }
    }

    Primary/standby DB instances:

    {
        "instance": {
            "id": "252f11f1-2912-4c06-be55-1999bde659c5",
            "status": "BUILD",
            "name": "trove-instance-rep3",
            "created": "2016-06-18T21:21:50+0200",
            "hostname": "192.168.0.132",
            "type": "master",
            "region": "eu-de",
            "updated": "2016-06-18T21:21:50+0200",
            "availabilityZone": "eu-de-01",
            "vpc": "490a4a08-ef4b-44c5-94be-3051ef9e4fce",
            "nics": {
                "subnetId": "0e2eda62-1d42-4d64-a9d1-4e9aa9cd994f"
            },
            "securityGroup": {
                "id": "2a1f7fc8-3307-42a7-aa6f-42c8b9b8f8c5"
            },
            "flavor": {
                "id": "bf07a6d4-844a-4023-a776-fc5c5fb71fb4"
            },
            "volume": {
                "type": "COMMON",
                "size": 100,
                "used": "8.45"
            },
            "dataStoreInfo": {
                "type": "MySQL",
                "version": "5.7"
            },
            "dbPort": 8635,
            "backupStrategy": {
                "startTime": "01:00:00",
                "keepDays": 3
            },
            "slaveId": "9405d8b8-a87d-4531-bd3a-e504c8434281",
            "ha": {
                "replicationMode": "async"
            }
        }
    }

    Read replica:

    {
        "instance": {
            "id": "252f11f1-2912-4c06-be55-1999bde659c5",
            "status": "BUILD",
            "name": "trove-instance-rep3",
            "created": "2016-06-18T21:21:50+0200",
            "hostname": "192.168.0.132",
            "type": "readreplica",
            "region": "eu-de",
            "updated": "2016-06-18T21:21:50+0200",
            "availabilityZone": "eu-de-01",
            "vpc": "490a4a08-ef4b-44c5-94be-3051ef9e4fce",
            "nics": {
                "subnetId": "0e2eda62-1d42-4d64-a9d1-4e9aa9cd994f"
            },
            "securityGroup": {
                "id": "2a1f7fc8-3307-42a7-aa6f-42c8b9b8f8c5"
            },
            "flavor": {
                "id": "bf07a6d4-844a-4023-a776-fc5c5fb71fb4"
            },
            "volume": {
                "type": "COMMON",
                "size": 100,
                "used": "13.99"
            },
            "dataStoreInfo": {
                "type": "MySQL",
                "version": "5.7"
            },
            "dbPort": 8635,
            "replicaOf": "252f11f1-2912-4c06-be55-1999bde659c5"
        }
    }

Abnormal Response

For details, see Abnormal Request Results.