Obtaining the CBH Instance List
Function
This API is used to obtain the CBH instance list of the current account.
URI
GET /v2/{project_id}/cbs/instance/list
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see "Obtaining a Project ID." |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_id |
No |
Long |
CBH instance ID. This parameter is mandatory only when you want to query details of a single instance. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. You can obtain it by calling the IAM API. The value of X-Subject-Token in the response header is the user token. For details, see "Obtaining the Token of an IAM User." |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
The total number of CBH instances. |
instance |
Array of InstanceDetail objects |
CBH instance list. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
CBH instance name. |
server_id |
String |
ID of the server where the CBH instance is deployed. |
instance_id |
String |
CBH instance ID. |
alter_permit |
Boolean |
Whether the CBH instance can be expanded. |
enterprise_project_id |
String |
Project ID. |
period_num |
String |
Number of subscription periods of a CBH instance. |
start_time |
String |
Start time of the CBH instance, in timestamp format. |
end_time |
String |
End time of the CBH instance, in timestamp format. |
created_time |
String |
Time when the CBH instance was created, in UTC format. |
upgrade_time |
Long |
Upgrade schedule of the CBH instance, in the format of timestamp. |
update |
String |
Whether the CBH instance can be upgraded. |
bastion_version |
String |
Current version of the CBH instance. |
az_info |
az_info object |
AZ information. |
status_info |
status_info object |
Status information. |
resource_info |
resource_info object |
Resource information. |
network |
network object |
Network information. |
ha_info |
ha_info object |
Active and standby node information. |
Parameter |
Type |
Description |
---|---|---|
region |
String |
ID of the AZ where the CBH instance locates. |
zone |
String |
ID of the AZ where the CBH instance locates. (In primary/standby mode, the ID of the AZ where the primary instance locates is required.) |
availability_zone_display |
String |
AZ where the CBH instance locates. (In primary/standby mode, the ID of the AZ where the primary instance locates is required. Name) |
slave_zone |
String |
AZ where the standby CBH instance locates. |
slave_zone_display |
String |
AZ where the standby CBH instance locates. |
Parameter |
Type |
Description |
---|---|---|
status |
String |
CBH instance status |
task_status |
String |
CBH instance status. |
create_instance_status |
String |
Statuses of the task for creating a CBH instance. |
instance_status |
String |
CBH instance status. |
instance_description |
String |
CBH instance description. |
fail_reason |
String |
Instance creation failure causes. |
Parameter |
Type |
Description |
---|---|---|
specification |
String |
CBH instance specifications. |
order_id |
String |
Order ID. |
resource_id |
String |
CBH instance ID, in the UUID format. |
data_disk_size |
Long |
Size of the data disk for the CBH instance, in TB. |
disk_resource_id |
Array of strings |
ID of the data disk for the CBH instance. |
Parameter |
Type |
Description |
---|---|---|
vip |
String |
Floating IP address of the CBH instance (This field is returned when the instance is deployed in primary/standby mode.) |
web_port |
String |
Port used for accessing the CBH instance with a web browser. |
public_ip |
String |
EIP bound to the CBH instance. |
public_id |
String |
ID of the EIP bound to the CBH instance, in the UUID format. |
private_ip |
String |
Private IP address of the CBH instance |
vpc_id |
String |
ID of the VPC where the CBH instance locates. |
subnet_id |
String |
ID of the subnet where the CBH instance locates. |
security_group_id |
String |
ID of the Security group where the CBH instance locates. |
Parameter |
Type |
Description |
---|---|---|
ha_id |
String |
IDs of the primary and standby instances. |
instance_type |
String |
Instance type. The value can be: |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_description |
String |
Incorrect request parameters. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_description |
String |
Failed to verify the token. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_description |
String |
Permissions required. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_description |
String |
Not CBH instances found. |
Example Requests
None
Example Responses
Status code: 200
Cbh List Instance Success
{ "total" : 1, "instance" : [ { "name" : "CBH-e2b4", "server_id" : "760aeee4-9916-436a-8854-837a9ae94b2b", "instance_id" : "5473", "alter_permit" : false, "enterprise_project_id" : "0", "period_num" : "1,2", "start_time" : 1692245215000, "end_time" : 1694966399000, "created_time" : "2023-08-17 12:05:02.0", "update" : false, "bastion_version" : "3.3.49.0", "az_info" : { "region" : "xx-xxxx-7", "zone" : "xx-xxxx-7a", "availability_zone_display" : "AZ 1", "slave_zone" : "xx-xxxx-7b", "slave_zone_display" : "AZ 2" }, "status_info" : { "status" : "ACTIVE", "task_status" : "NO_TASK", "create_instance_status" : "NO_TASK", "fail_reason" : "No FailReason Now", "instance_status" : "ok", "instance_description" : ",2023-08-21 15:19:07,{\"d_usage\":\"0.30\",\"m_usage\":\"43.66\",\"c_usage\":\"1.00\",\"session_count\":\"0\"" }, "resource_info" : { "specification" : "cbh.basic.5", "order_id" : "CS2308171141G8C14", "resource_id" : "c7a07a7f-e5ee-49cf-8355-aee46c5a4fcf", "data_disk_size" : 200, "disk_resource_id" : [ ] }, "network" : { "vip" : "192.168.0.228", "web_port" : "443", "public_ip" : "100.xx.xx.1", "public_id" : "56220ed7-0f75-4d42-85c4-013d5414c81c", "private_ip" : "192.168.0.190", "vpc_id" : "03211ecf-697e-4306-a7a0-6e939bf948de", "subnet_id" : "dd08a6a9-ced7-484b-ace6-1b821854a772", "security_group_id" : "02dcf62d-b84d-4a14-aad3-c310f2ceea55" }, "ha_info" : { "ha_id" : "332", "instance_type" : "master" } } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Cbh List Instance Success |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
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.