Querying All Instances
This API is an out-of-date version and may not be maintained in the future. Please use the API described in Listing All Instances.
Function
This API is used to query the instances of a tenant by set conditions.
URI
GET /v1.0/{project_id}/instances?engine={engine}&name={name}&status={status}&id={id}&includeFailure={includeFailure}&exactMatchName={exactMatchName}&enterprise_project_id={enterprise_project_id}
Table 1 describes the parameters.
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Indicates the ID of a project. |
engine |
String |
No |
Indicates a message engine type The value is rabbitmq. If this parameter is not specified, all instances will be queried. |
name |
String |
No |
Indicates the instance name. |
id |
String |
No |
Indicates the instance ID. |
status |
String |
No |
Indicates the instance status. For details, see Instance Status. |
includeFailure |
String |
No |
Indicates whether to return the number of instances that fail to be created. If the value is true, the number of instances that failed to be created is returned. If the value is not true, the number is not returned. |
exactMatchName |
String |
No |
Indicates whether to search for the instance that precisely matches a specified instance name. The default value is false, indicating that a fuzzy search is performed based on a specified instance name. If the value is true, the instance that precisely matches a specified instance name is queried. |
enterprise_project_id |
String |
No |
Indicates the enterprise project ID. |
Example
GET /v1.0/bd6b78e2ff9e4e47bc260803ddcc7a21/instances?start=1&limit=10&name=&status=&id=&includeFailure=true&exactMatchName=false
Request
Request parameters
None.
Example request
None.
Response
Response parameters
Table 2 describes the response parameters.
Parameter |
Type |
Description |
---|---|---|
instances |
Array |
Indicates instance details. |
instance_num |
Integer |
Indicates the number of instances. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Indicates the instance name. |
engine |
String |
Indicates the message engine. |
engine_version |
String |
Indicates the engine version. |
specification |
String |
Indicates the specifications of an instance.
|
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.
|
charging_mode |
Integer |
Indicates a billing mode. 1: pay-per-use mode. |
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. |
user_id |
String |
Indicates the user ID. |
user_name |
String |
Indicates the username. |
order_id |
String |
Indicates an order ID. This parameter has a value only when the billing mode is yearly/monthly mode. |
maintain_begin |
String |
Indicates the time at which a maintenance time window starts. Format: HH:mm |
maintain_end |
String |
Time at which the maintenance time window ends. Format: HH:mm |
enable_publicip |
Boolean |
Indicates whether to enable public access for a RabbitMQ instance.
|
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.
|
enterprise_project_id |
String |
Indicates the enterprise project ID. |
is_logical_volume |
Boolean |
Distinguishes old instances from new instances during instance capacity expansion.
|
extend_times |
String |
Indicates the number of disk expansion times. If it exceeds 20, the disk cannot be expanded. |
Example response
{ "instances": [ { "name": "rabbitmq-lxy001", "engine": "rabbitmq", "port": 5672, "status": "RUNNING", "type": "single", "specification": "2vCPUs 4GB", "engine_version": "3.x.x", "connect_address": "192.168.255.237", "instance_id": "595926bf-a648-47d8-91bc-461956794c2b", "resource_spec_code": "dms.instance.rabbitmq.single.c3.2u4g", "charging_mode": 1, "vpc_id": "1a28dcc5-c90d-421c-82bb-783f30f5b40a", "vpc_name": "vpc-y00292973", "created_at": "1562583302800", "product_id": "00300-30109-0--0", "security_group_id": "0cc8fdb7-872a-49da-a062-88ccc39463b5", "security_group_name": "sg-65eb-nw-test", "subnet_id": "ebba7994-260d-42ab-bce1-39a08b365dc8", "available_zones": [ "d573142f24894ef3bd3664de068b44b0" ], "user_id": "50a4156d334a4a82b8745dc730dc1e00", "user_name": "test", "access_user": "test-Info", "maintain_begin": "02:00:00", "maintain_end": "06:00:00", "storage_space": 88, "total_storage_space": 100, "used_storage_space": 4, "enable_publicip": false, "ssl_enable": false, "management_connect_address": "http://192.168.255.237:15672", "storage_resource_id": "34825335-61cb-4ee0-949e-24b08170edb2", "storage_spec_code": "dms.physical.storage.ultra", "service_type": "advanced", "storage_type": "hec", "enterprise_project_id": "0", "is_logical_volume": false, "extend_times": 0, "ipv6_enable": false, "ipv6_connect_addresses": [], "connector_enable": false, "connector_id": "", "rest_enable": false, "rest_connect_address": "", "public_boundwidth": 0, "message_query_inst_enable": true, "vpc_client_plain": false, "support_features": "feature.physerver.kafka.topic.accesspolicy,message_trace_enable,feature.physerver.kafka.pulbic.dynamic,feature.physerver.kafka.user.manager", "trace_enable": false } ], "instance_num": 1 }
Status Code
Table 4 describes the status code of successful operations. For details about other status codes, see Status Code.
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