Updated on 2022-08-06 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.

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. Options: x86_64 and 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.

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 4 and Table 5.

tags

Array of Objects

Instance tag key and value.

Example response

{
	"name": "dcs-125d",
	"engine": "Redis",
	"capacity": 64,
	"ip": "192.168.1.48",
	"domainName": "XXXXXX",
	"port": 6379,
	"status": "RUNNING",
	"libos": false,
	"description": null,
	"task": null,
	"max_memory": 65536,
	"used_memory": 33,
	"instance_id": "979e9a6b-e2f5-4b5d-8e98-fea495ea27a1",
	"resource_spec_code": "dcs.cluster",
	"engine_version": "3.0",
	"internal_version": null,
	"charging_mode": 0,
	"capacity_minor": null,
	"vpc_id": "d1e8008d-8182-4c86-a142-1ae9349bdc64",
	"vpc_name": "vpc-807d",
	"task_status": null,
	"created_at": "2018-12-11T07:24:18.149Z",
	"error_code": null,
	"user_id": "9bfac09d9bcd4eb7bb1465a7bcff815b",
	"user_name": "user",
	"maintain_begin": "02:00:00",
	"maintain_end": "06:00:00",
	"no_password_access": "true",
	"access_user": null,
	"enable_publicip": false,
	"publicip_id": null,
	"publicip_address": null,
	"enable_ssl": false,
	"service_upgrade": false,
	"service_task_id": null,
	"is_free": null,
	"enterprise_project_id": "0",
	"available_zones": ["f84448fd537f46078dd8bd776747f573"],
	"subnet_id": "9b32218f-6389-485a-912e-076fe9df6fa7",
	"security_group_id": "ecefdad9-c8be-42aa-9d5d-9ab46a221240",
	"backend_addrs": ["192.168.1.136:6379",
	"192.168.1.224:6379"],
	"product_id": "00301-17063-0--0",
	"security_group_name": "sg--test-hanwang",
	"subnet_name": "subnet-7e46",
	"order_id": null,
	"subnet_cidr": "192.168.1.0/24",
	"instance_backup_policy": null,
        "tags": [
        {
            "key": "dcs001",
            "value": "001"
        },
        {
            "key": "dcs002",
            "value": "002"
        }
        ],
	"enterprise_project_name": null
}

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.