Updated on 2023-12-13 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

Project ID. 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.

domainName

String

Domain name of the instance.

port

Integer

Port number of the cache node.

status

String

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

libos

Boolean

  • true: This instance is a libos instance.
  • false: This instance is not a libos instance.

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.

resource_spec_code

String

Resource specifications.

For example:

  • dcs.single_node: indicates a DCS instance in single-node mode.
  • dcs.master_standby: indicates a DCS instance in master/standby mode.
  • dcs.cluster: indicates a DCS instance in cluster mode.

engine_version

String

Cache engine version.

internal_version

String

Internal DCS version.

charging_mode

Integer

Billing mode. 0: pay-per-use.

capacity_minor

String

Cache capacity of a small-scale, single-node DCS instance.

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.

product_type

String

Edition of DCS for Redis. Options:

  • generic: standard edition
  • libos: high-performance edition

cpu_type

String

CPU architecture. The value can be x86_64 or aarch_64.

storage_type

String

Memory type. Options: DRAM and SCM.

cache_mode

String

DCS instance type. Options:

  • single: single-node
  • ha: master/standby
  • cluster: Redis Cluster
  • proxy: Proxy Cluster

launched_at

String

Time when the instance started running.

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.

cloud_service_type_code

String

Cloud service type code.

cloud_resource_type_code

String

Cloud resource type code.

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

Object

Backup policy.

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

Table 3 instance_backup_policy

Parameter

Type

Description

backup_policy_id

String

Backup policy ID.

created_at

String

Creation time.

updated_at

String

Update time.

policy

Object

For details, see Table 3 and Table 4.

tenant_id

String

Tenant ID.

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" : "XXXXXX",
    "max_memory" : 460,
    "used_memory" : 56,
    "user_id": "6d0977e4c9b74ae7b5a083a8d0d8fafa",
    "user_name": "user",
    "order_id": "XXXXXXXXX",
    "maintain_begin" : "22:00:00",
    "maintain_end" : "02:00:00"
}

Status Code

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

Table 4 Status code

Status Code

Description

200

Specified instance queried successfully.