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.
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.
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 |
|
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:
|
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. |
no_password_access | String | An indicator of whether a DCS instance can be accessed in password-free mode.
|
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:
|
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.
|
service_upgrade | Boolean | An indicator of whether an upgrade task has been created for a DCS instance.
|
service_task_id | String | Upgrade task ID.
|
enterprise_project_id | String | Enterprise project ID. |
product_type | String | Edition of DCS for Redis. Options:
|
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:
|
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. |
tags | Array of Objects | Instance tag key and value. |
spec_code | String | Product specification code. |
domain_name | String | Domain name of the instance. |
readonlyDomainName | String | Read-only domain name. |
readonly_domain_name | String | Read-only domain name. |
freeze_scene | String | Scenario where the instance is frozen. |
update_at | String | Update time. |
task_status | String | Task status. |
is_free | Boolean | Whether the instance is free of charge. |
az_codes | Array of strings | AZs with available resources. |
crr_role | String | Role in cross-region DR. |
inquery_spec_code | String | Product specification code. |
support_slow_log_flag | String | Whether slow query logs are supported. |
ipv6 | String | IPv6 address. |
enable_ipv6 | Boolean | Whether IPv6 is enabled. |
description | String | Instance description. |
db_number | int | Number of databases in the instance. |
support_acl | Boolean | Whether ACL is supported. |
task | String | Task response. |
enterprise_project_name | String | Enterprise project name. |
sharding_count | int | Number of shards. |
Parameter | Type | Description |
---|---|---|
backup_policy_id | String | Backup policy ID. |
created_at | String | Creation time. |
updated_at | String | Update time. |
policy | Object | |
tenant_id | String | Tenant ID. |
Example response
{
"free":null,
"max_memory":1024,
"used_memory":1,
"instance_id":"f1da146b-f567-411a-a4c2-276fb831ca28",
"name":"Test-DCS-Single-9e210c64",
"resource_spec_code":"redis.single.xu1.large.1",
"spec_code":"redis.single.xu1.large.1",
"engine":"Redis","engine_version":"4.0",
"internal_version":null,
"charging_mode":0,
"capacity":1,
"capacity_minor":null,
"vpc_id":"e5d38406-43ca-447f-9564-90953f10313f",
"vpc_name":"vpc-testing",
"ip":"192.168.1.144",
"domainName":"redis-f1da146b-f567-411a-a4c2-276fb831ca28.dcs.com",
"domain_name":"redis-f1da146b-f567-411a-a4c2-276fb831ca28.dcs.com",
"readonlyDomainName":null,
"readonly_domain_name":null,
"port":6379,
"status":"RUNNING",
"freeze_scene":null,
"created_at":"2021-04-18T18:55:43.509Z",
"update_at":"2021-04-18T18:56:06.519Z",
"error_code":null,
"user_id":"e96cb82994ef49648c2bfad79455b0ef",
"user_name":"lboka",
"maintain_begin":"02:00:00",
"maintain_end":"06:00:00",
"no_password_access":"false",
"access_user":null,
"enable_publicip":false,
"publicip_id":null,
"publicip_address":null,
"enable_ssl":false,
"service_upgrade":false,
"service_task_id":"",
"enterprise_project_id":null,
"security_group_id":null,
"tags":[],
"subnet_id":"a2c02283-2e2d-45f5-a9a0-7a8fb8d0d0a7",
"product_type":"generic",
"cpu_type":"x86_64",
"storage_type":"DRAM",
"task_status":null,
"launched_at":"2021-04-18T18:56:06.532Z",
"is_free":null,
"libos":false,
"cache_mode":"single",
"available_zones":["eu-de-02"],
"az_codes":["eu-de-02"],
"backend_addrs":null,
"crr_role":null,
"cloud_service_type_code":"otc.service.type.dcs",
"cloud_resource_type_code":"otc.resource.type.dcs3",
"inquery_spec_code":"redis.single.xu1.large.1",
"support_slow_log_flag":null,
"ipv6":null,
"enable_ipv6":false,
"description":"robot test-cases",
"db_number":0,
"features":{
"support_acl":true
},
"product_id":"redis.single.xu1.large.1-h",
"security_group_name":null,
"subnet_name":"subnet-testing",
"order_id":null,
"subnet_cidr":"192.168.1.0/24",
"task":null,
"instance_backup_policy":null,
"enterprise_project_name":null,
"sharding_count":0
}
Status Code¶
Table 4 describes the status code of successful operations. For details about other status codes, see Table 1.
Status Code | Description |
---|---|
200 | Specified instance queried successfully. |