Updated on 2024-01-29 GMT+08:00

Querying an Instance

This API is an out-of-date version and may not be maintained in the future. Please use the API described in Querying an Instance.

Function

This API is used to query the details about an 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

Indicates the ID of a project.

instance_id

String

Yes

Indicates the instance ID.

Request

Request parameters

None.

Example request

None.

Response

Response parameters

Table 2 describes the response parameters.

Table 2 Parameter description

Parameter

Type

Description

name

String

Indicates the instance name.

engine

String

Indicates the message engine.

engine_version

String

Indicates the version of the message engine.

specification

String

Indicates the instance specification.

  • For a single-node RabbitMQ instance, VM specifications are returned.
  • For a cluster RabbitMQ instance, VM specifications and the number of nodes are returned.

storage_space

Integer

Indicates the message storage space. Unit: GB

used_storage_space

Integer

Indicates the used message storage space. Unit: GB

connect_address

String

Indicates the IP address of an instance.

port

Integer

Indicates the port number of an instance.

status

String

Indicates the status of an instance. For details, see Instance Status.

description

String

Indicates the description of the instance.

instance_id

String

Indicates the instance ID.

resource_spec_code

String

Indicates the resource specifications identifier.

  • dms.instance.rabbitmq.single.c3.2u4g: single-node RabbitMQ instance, 2 vCPUs 4 GB (VM specifications)
  • dms.instance.rabbitmq.single.c3.4u8g: single-node RabbitMQ instance, 4 vCPUs 8 GB (VM specifications)
  • dms.instance.rabbitmq.single.c3.8u16g: single-node RabbitMQ instance, 8 vCPUs 16 GB (VM specifications)
  • dms.instance.rabbitmq.single.c3.16u32g: single-node RabbitMQ instance, 16 vCPUs 32 GB (VM specifications)
  • dms.instance.rabbitmq.cluster.c3.4u8g.3: cluster RabbitMQ instance, 4 vCPUs 8 GB (VM specifications), 3 nodes
  • dms.instance.rabbitmq.cluster.c3.4u8g.5: cluster RabbitMQ instance, 4 vCPUs 8 GB (VM specifications), 5 nodes
  • dms.instance.rabbitmq.cluster.c3.4u8g.7: cluster RabbitMQ instance, 4 vCPUs 8 GB (VM specifications), 7 nodes
  • dms.instance.rabbitmq.cluster.c3.8u16g.3: cluster RabbitMQ instance, 8 vCPUs 16 GB (VM specifications), 3 nodes
  • dms.instance.rabbitmq.cluster.c3.8u16g.5: cluster RabbitMQ instance, 8 vCPUs 16 GB (VM specifications), 5 nodes
  • dms.instance.rabbitmq.cluster.c3.8u16g.7: cluster RabbitMQ instance, 8 vCPUs 16 GB (VM specifications), 7 nodes
  • dms.instance.rabbitmq.cluster.c3.16u32g.3: cluster RabbitMQ instance, 16 vCPUs 32 GB (VM specifications), 3 nodes
  • dms.instance.rabbitmq.cluster.c3.16u32g.5: cluster RabbitMQ instance, 16 vCPUs 32 GB (VM specifications), 5 nodes
  • dms.instance.rabbitmq.cluster.c3.16u32g.7: cluster RabbitMQ instance, 16 vCPUs 32 GB (VM specifications), 7 nodes

type

String

Indicates the instance type.

Options:

  • single: single-node instance
  • cluster: cluster instance

charging_mode

Integer

Indicates the billing mode. 1: pay-per-use mode; 0: yearly/monthly billing.

vpc_id

String

Indicates the ID of a VPC.

vpc_name

String

Indicates the name of a VPC.

created_at

String

Indicates the time when an instance is created. The time is in the format of timestamp, that is, the offset milliseconds from 1970-01-01 00:00:00 UTC to the specified time.

error_code

String

Indicates an error code returned when an instance fails to be created or its status is abnormal. For details about error codes, see Table 3.

product_id

String

Indicates the product ID.

security_group_id

String

Indicates the security group ID.

security_group_name

String

Indicates the security group name.

subnet_id

String

Indicates the subnet ID.

subnet_name

String

Indicates the subnet name.

subnet_cidr

String

Indicates the subnet segment.

available_zones

Array

Indicates the ID of the AZ to which the instance node belongs. The AZ ID is returned.

user_id

String

Indicates the user ID.

user_name

String

Indicates the username.

access_user

String

Indicates the username of an instance.

order_id

String

Indicates an order ID. This parameter has a value only when the billing mode is yearly/monthly.

maintain_begin

String

Indicates the time at which a maintenance time window starts.

Format: HH:mm

maintain_end

String

Indicates the time at which a maintenance time window ends.

Format: HH:mm

enable_publicip

Boolean

Indicates whether to enable public access for a RabbitMQ instance.

  • true: enable
  • false: disable

publicip_address

String

Indicates the EIP bound to a RabbitMQ instance.

The value of this parameter is null if public access is disabled.

publicip_id

String

Indicates the ID of the EIP bound to a RabbitMQ instance.

The value of this parameter is null if public access is disabled.

management_connect_address

String

Indicates the management address of a RabbitMQ instance.

ssl_enable

Boolean

Indicates whether to enable security authentication.

  • true: enable
  • false: disable

enterprise_project_id

String

Indicates the enterprise project ID.

is_logical_volume

Boolean

Distinguishes old instances from new instances during instance capacity expansion.

  • true: New instance, which allows dynamic disk capacity expansion without restarting the instance.
  • false: Old instance.

extend_times

String

Indicates the number of disk expansion times. If it exceeds 20, the disk cannot be expanded.

Table 3 Error code description

Error Code

Description

public.00.0001

Internal service error.

public.00.0002

Internal service error.

public.00.0003

Internal service error.

public.00.0004

Failed to create the VPC.

public.00.0005

Failed to create the security group.

public.00.0006

Failed to create the subnet.

public.00.0007

The subnet status is abnormal.

public.00.0008

Failed to create the ECS.

public.00.0009

Failed to create the ECS.

public.00.0010

Failed to create the ECS.

public.00.0011

Failed to bind an NIC to the ECS.

public.00.0013

Failed to start the ECS.

public.00.0014

Failed to start the ECS.

public.00.0015

Failed to stop the ECS.

public.00.0018

Failed to create the ECS because the ECS resource quota is insufficient.

public.00.0024

Failed to deploy the instance.

public.00.0025

Some nodes of the instance are faulty.

public.00.0042

Failed to connect to the instance.

Example response

{ 
    "name" : "dms-a11e", 
    "engine" : "rabbitmq", 
    "engine_version" : "3.x.x",
    "specification" : "2vCPUs 4GB", 
    "storage_space" : 100,
    "used_storage_space" : 50,
    "connect_address" : "192.168.3.100", 
    "port" : 5672, 
    "status" : "RUNNING", 
    "description" : "Create a instance", 
    "instance_id" : "68d5745e-6af2-40e4-945d-fe449be00148", 
    "resource_spec_code" : "dms.instance.rabbitmq.single.c3.2u4g", 
    "type" : "single", 
    "charging_mode" : 1, 
    "vpc_id" : "27d99e17-42f2-4751-818f-5c8c6c03ff15", 
    "vpc_name" : "vpc_4944a40e-ac57-4f08-9d38-9786e2759458_192", 
    "created_at" : "1526367063931", 
    "error_code" : null, 
    "product_id" : "00300-30109-0--0", 
    "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", 
    "subnet_cidr" : "192.168.0.0/24", 
    "available_zones" : ["1d7b939b382c4c3bb3481a8ca10da785"],
    "user_id": "6d0977e4c9b74ae7b5a083a8d0d8fafa", 
    "user_name": "aabb02", 
    "access_user": "user",
    "order_id": "XXXXXXXXX", 
    "maintain_begin" : "22:00", 
    "maintain_end" : "02:00", 
    "enable_publicip" : "true",
    "publicip_id": "b7940732-11ef-459b-acab-cab0d26c74a3", 
    "publicip_address": "192.168.10.5",
    "ssl_enable": false,
    "management_connect_address": "http://192.168.0.177:9999"
 }

Status Code

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

Table 4 Status code

Status Code

Description

200

Specified instance queried successfully.