Querying a DCS instance
Function
This API is used to query the details about a specified DCS instance.
URI
GET /v2/{project_id}/instances/{instance_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_id |
Yes |
String |
Instance ID. |
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
vpc_name |
String |
VPC name. |
charging_mode |
Integer |
Billing mode. The value can be 0: pay-per-use. |
vpc_id |
String |
VPC ID. |
user_name |
String |
Username. |
created_at |
String |
Time when the instance is created. Format: 2017-03-31T12:24:46.297Z |
description |
String |
Instance description |
security_group_id |
String |
Security group ID. |
security_group_name |
String |
Security group name. |
max_memory |
Integer |
Total memory size in MB. |
used_memory |
Integer |
Used memory size in MB. |
capacity |
Integer |
DCS instance cache capacity in GB. |
capacity_minor |
String |
Capacity (GB) of a small DCS instance (smaller than 1 GB). |
maintain_begin |
String |
UTC time when the maintenance time window starts. The format is HH:mm:ss. |
maintain_end |
String |
UTC time when the maintenance time window ends. The format is HH:mm:ss. |
engine |
String |
DCS instance engine. |
no_password_access |
String |
Indicates whether the instance can be accessed without a password.
|
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. |
instance_backup_policy |
InstanceBackupPolicy object |
Backup policy. This parameter is supported when the instance type is master/standby or cluster. |
az_codes |
Array of strings |
AZ where the instance is in. The AZ code is returned. |
available_zones |
Array of strings |
ID of the AZ where the instance is in. The AZ ID is returned. |
access_user |
String |
Username used for accessing a DCS instance after password authentication. |
instance_id |
String |
Instance ID. |
port |
Integer |
Port of the DCS instance. |
user_id |
String |
User ID. |
name |
String |
Instance name. |
spec_code |
String |
Specification code. |
subnet_id |
String |
Subnet ID. |
subnet_name |
String |
Subnet name. |
subnet_cidr |
String |
Subnet CIDR block. |
engine_version |
String |
Cache version. |
order_id |
String |
Order ID. |
status |
String |
Instance status. For details, see DCS Instance Statuses. |
domain_name |
String |
Domain name of the instance. |
readonly_domain_name |
String |
Read-only domain name of the instance. This parameter is available only for master/standby instances. |
enable_publicip |
Boolean |
Indicates whether to enable public network access for the DCS Redis instance.
|
publicip_id |
String |
ID of the EIP bound to the DCS Redis instance. The value of this parameter is null if public network access is disabled. |
publicip_address |
String |
EIP bound to the DCS Redis instance. The value of this parameter is null if public network access is disabled. |
enable_ssl |
Boolean |
Whether to enable SSL for public access to a DCS Redis instance.
|
service_upgrade |
Boolean |
Whether the instance has an upgrade task.
|
service_task_id |
String |
Upgrade task ID.
|
enterprise_project_id |
String |
Enterprise project ID. |
backend_addrs |
String |
Backend address of a cluster instance. |
features |
Features object |
Features supported by the instance. |
domain_name_info |
DomainNameInfo object |
Information about instance domain name update and public domain name resolution. |
transparent_client_ip_enable |
Boolean |
Whether client IP pass-through is enabled. |
sub_status |
String |
Instance sub-status. |
tags |
Array of ResourceTag objects |
Instance tag key and value. |
cpu_type |
String |
CPU type of the instance. Generally, the value is x86_64 or aarch64. |
enterprise_project_name |
String |
Enterprise project name. |
update_at |
String |
Update time, for example, 2022-07-06T09:32:16.502Z. |
product_type |
String |
Edition: community edition or professional edition. Enumeration values:
|
storage_type |
String |
Storage type (DRAM). Enumeration values:
|
launched_at |
String |
Start time, for example, 2022-07-06T09:32:16.502Z. |
cache_mode |
String |
Instance type. Options:
|
support_slow_log_flag |
String |
Whether slow query logs are supported. |
db_number |
Integer |
Number of databases. |
replica_count |
Integer |
Number of replicas. |
sharding_count |
Integer |
Number of shards in a cluster instance. |
bandwidth_info |
BandwidthInfo object |
Bandwidth information. |
cloud_service_type_code |
String |
Code of the cloud service type. |
cloud_resource_type_code |
String |
Code of the cloud resource type. |
inquery_spec_code |
String |
Specification code in the operations system. |
Parameter |
Type |
Description |
---|---|---|
backup_policy_id |
String |
Backup policy ID. |
created_at |
String |
Creation time. Example: 2022-04-11T09:45:24.790Z |
updated_at |
String |
Update time. Example: 2022-04-12T02:22:03.269Z |
policy |
BackupPolicy object |
Backup policy. |
tenant_id |
String |
Tenant ID. |
Parameter |
Type |
Description |
---|---|---|
backup_type |
String |
Backup type.
|
save_days |
Integer |
This parameter is mandatory when backup_type is set to manual. Retention period, in days. The value ranges from 1 to 7. The automatic backup policy is retained when automatic backup is switched to manual backup. |
periodical_backup_plan |
BackupPlan object |
Backup schedule. This parameter is mandatory when backup_type is set to manual. The automatic backup policy is retained when automatic backup is switched to manual backup. |
Parameter |
Type |
Description |
---|---|---|
timezone_offset |
String |
Time zone in which backup is performed. This parameter is no longer used. |
backup_at |
Array of integers |
Day in a week on which backup starts. The value ranges from 1 to 7, where 1 indicates Monday, and 7 indicates Sunday. The automatic backup policy is retained when automatic backup is switched to manual backup. |
period_type |
String |
Interval at which backup is performed, which supports only weekly currently. The automatic backup policy is retained when automatic backup is switched to manual backup. |
begin_at |
String |
UTC time when the backup starts. For example, 00:00-01:00 indicates that the backup starts at 00:00 (UTC time). The value must be on the hour. The backup interval is 1 hour. The automatic backup policy is retained when automatic backup is switched to manual backup. |
Parameter |
Type |
Description |
---|---|---|
support_acl |
Boolean |
Whether ACL is supported.
|
support_transparent_client_ip |
Boolean |
Whether client IP pass-through is enabled.
|
support_ssl |
Boolean |
Whether SSL is supported.
|
support_audit_log |
Boolean |
Whether audit logs are supported
|
Parameter |
Type |
Description |
---|---|---|
support_public_resolve |
Boolean |
Whether to enable public domain name resolution.
|
is_latest_rules |
Boolean |
Whether the current domain name is the latest.
|
zone_name |
String |
Region suffix of the domain name. |
history_domain_names |
Array of DomainNameEntity objects |
Historical domain name information. |
Parameter |
Type |
Description |
---|---|---|
domain_name |
String |
Historical domain names of the instance. |
is_readonly |
Boolean |
Whether the domain name is read-only.
|
Parameter |
Type |
Description |
---|---|---|
key |
String |
Tag key.
|
value |
String |
Tag value.
|
Parameter |
Type |
Description |
---|---|---|
begin_time |
Long |
Start time of temporary increase. |
end_time |
Long |
End time of temporary increase. |
current_time |
Long |
Current time. |
bandwidth |
Integer |
Current bandwidth, in Mbit/s. |
next_expand_time |
Long |
Next increase time. |
expand_count |
Integer |
Number of increases. |
expand_effect_time |
Long |
Interval between temporary increases. |
expand_interval_time |
Long |
Time to the next increase. |
max_expand_count |
Integer |
Maximum number of increases. |
task_running |
Boolean |
Whether the task is running. |
Example Requests
GET https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}
Example Responses
Status code: 200
The specified instance is queried successfully.
{ "publicip_id" : null, "vpc_name" : "dcs-beta", "charging_mode" : 0, "enterprise_project_name" : "default", "vpc_id" : "5e37b3be-950a-48e1-b498-65b63d336481", "user_name" : "clouduser", "created_at" : "2022-08-29T08:53:47.319Z", "description" : null, "cache_mode" : "ha", "security_group_id" : "securityGroupId", "enable_ssl" : false, "max_memory" : 128, "publicip_address" : null, "capacity" : 0, "maintain_begin" : "18:00:00", "engine" : "Redis", "maintain_end" : "19:00:00", "capacity_minor" : ".125", "service_upgrade" : false, "subnet_name" : "dcs-beta", "no_password_access" : "true", "service_task_id" : null, "ip" : "192.168.0.251", "subnet_cidr" : "192.168.0.0/24", "used_memory" : 2, "security_group_name" : "securityGroupId", "instance_backup_policy" : null, "az_codes" : [ "xx-xxxxx-xx" ], "available_zones" : [ "d539378ec1314c85b76fefa3f7071458" ], "access_user" : null, "enterprise_project_id" : "0", "instance_id" : "a4c545cd-10b2-4efc-b0ab-a9b554ca0621", "enable_publicip" : false, "port" : 6379, "user_id" : "d53977d1adfb49c5b025ba7d33a13fd7", "domain_name" : "redis-a4c545cd-10b2-4efc-b0ab-a9b554ca0621.dcs.example.com", "name" : "dcs-billing", "spec_code" : "redis.ha.xu1.tiny.r2.128", "subnet_id" : "a4112635-3ec0-471c-95c3-5cf49b9533af", "engine_version" : "5.0", "order_id" : null, "status" : "RUNNING", "features" : { "support_acl" : true, "support_transparent_client_ip" : true, "support_ssl" : false, "support_audit_log" : false }, "domain_name_info" : { "support_public_resolve" : true, "is_latest_rules" : true, "zone_name" : "dcs.example.com", "history_domain_names" : null }, "transparent_client_ip_enable" : true, "sub_status" : "normal", "cpu_type" : "x86_64", "cloud_service_type_code" : "hws.service.type.dcs", "cloud_resource_type_code" : "hws.resource.type.dcs3", "inquery_spec_code" : "redis.ha.xu1.tiny.r2.128" }
Status Codes
Status Code |
Description |
---|---|
200 |
The specified instance is queried successfully. |
400 |
Invalid request. |
500 |
Internal service error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot