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.

engine_version

String

Cache engine version.

internal_version

String

Internal DCS version.

charging_mode

Integer

Billing mode. Options: 0: pay-per-use; 1: yearly/monthly.

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.

no_password_access

String

An indicator of whether a DCS instance can be accessed in password-free mode.

  • true: indicates that a DCS instance can be accessed without a password.
  • false: indicates that a DCS instance can be accessed only after password authentication.

access_user

String

Username used for accessing a DCS instance with password authentication.

enable_publicip

Boolean

An indicator of whether public access is enabled for a DCS Redis instance. Options:

  • true: enabled.
  • false: disabled.

publicip_id

String

ID of the elastic IP address bound to a DCS Redis instance.

The parameter value is null if public access is disabled.

publicip_address

String

Elastic IP address bound to a DCS Redis instance.

The parameter value is null if public access is disabled.

enable_ssl

Boolean

An indicator of whether to enable SSL for public access to a DCS Redis instance.

  • true: enabled.
  • false: disabled.

service_upgrade

Boolean

An indicator of whether an upgrade task has been created for a DCS instance.

  • true: yes.
  • false: no.

service_task_id

String

Upgrade task ID.

  • If the value of service_upgrade is set to true, the value of this parameter is the ID of the upgrade task.
  • If the value of service_upgrade is set to false, the value of this parameter is empty.

enterprise_project_id

String

Enterprise project ID.

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 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": "r00209145",
	"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.