Updated on 2022-02-21 GMT+08:00

Querying a DCS Instance

Function

This API is used to query the details about a specified DCS instance.

URI

GET /v1.0/{project_id}/instances/{instance_id}

Table 1 describes the parameters.
Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

For details on how to obtain the value of this parameter, see Obtaining a Project ID.

instance_id

String

Yes

ID of the instance to be queried

Request

Request parameters

None

Example request

Request URL:

GET https://{dcs_endpoint}/v1.0/{project_id}/instances/{instance_id}

Response

Response parameters

Table 2 describes the response parameters.

Table 2 Parameter description

Parameter

Type

Description

name

String

DCS instance name.

engine

String

DCS instance engine.

capacity

Integer

DCS instance cache capacity. Unit: GB.

ip

String

IP address for connecting to the DCS instance For a cluster instance, multiple IP addresses are returned and separated by commas (,). For example, 192.168.0.1,192.168.0.2.

port

Integer

Port number of the cache node.

status

String

Cache instance status. For details about status, see DCS Instance Statuses.

description

String

Brief description of the DCS instance.

max_memory

Integer

Total memory size.

Unit: MB.

used_memory

Integer

Size of the used memory.

Unit: MB.

instance_id

String

DCS instance ID.

engine_version

String

Cache engine version.

internal_version

String

Internal DCS version.

charging_mode

Integer

Billing mode. 0: pay-per-use.

vpc_id

String

VPC ID.

vpc_name

String

VPC name.

created_at

String

Time at which the DCS instance is created.

For example, 2017-03-31T12:24:46.297Z.

error_code

String

Error code returned when the DCS instance fails to be created or is abnormal.

For details about error codes, see Error Codes.

user_id

String

User ID.

user_name

String

Username.

maintain_begin

String

Time at which the maintenance time window starts.

Format: HH:mm:ss.

maintain_end

String

Time at which the maintenance time window ends.

Format: HH:mm:ss.

available_zones

Array

AZ where a cache node resides. The value of this parameter in the response contains an AZ ID.

subnet_id

String

Subnet ID.

security_group_id

String

Security group ID.

backend_addrs

String

Backend address of a cluster instance.

product_id

String

Product ID.

security_group_name

String

Security group name.

subnet_name

String

Subnet name.

subnet_cidr

String

Subnet segment.

order_id

String

Order ID.

instance_backup_policy

JSON

Backup policy.

This parameter is available for master/standby and cluster DCS instances. For details, see Table 3 and Table 4.

Example response

{
    "name": "dcs-a11e",
    "engine": "Redis",
    "capacity": 2,
    "ip": "192.168.3.100",
    "port": 6379,
    "status": "RUNNING",
    "description": "Create a instance",
    "instance_id": "68d5745e-6af2-40e4-945d-fe449be00148",
    "resource_spec_code": "dcs.single_node",
    "engine_version": "3.0",
    "internal_version": null,
    "charging_mode": 0,
    "vpc_id": "27d99e17-42f2-4751-818f-5c8c6c03ff15",
    "vpc_name": "vpc_4944a40e-ac57-4f08-9d38-9786e2759458_192",
    "created_at": "2017-03-31T12:24:46.297Z",
    "error_code": null,
    "product_id": "XXXXXX",
    "security_group_id": "60ea2db8-1a51-4ab6-9e11-65b418c24583",
    "security_group_name": "sg_6379_4944a40e-ac57-4f08-9d38-9786e2759458",
    "subnet_id": "ec2f34b9-20eb-4872-85bd-bea9fc943128",
    "subnet_name": "subnet_az_7f336767-10ec-48a5-9ae8-9cacde119318",
    "available_zones": [
        "1d7b939b382c4c3bb3481a8ca10da785"
    ],
    "max_memory": 460,
    "used_memory": 56,
    "user_id": "6d0977e4c9b74ae7b5a083a8d0d8fafa",
    "user_name": "liutao02",
    "order_id": "XXXXXX",
    "maintain_begin": "22:00:00",
    "maintain_end": "02:00:00"
}

Status Code

Table 3 describes the status code of successful operations. For details about other status codes, see Table 1.

Table 3 Status code

Status Code

Description

200

Specified instance queried successfully.