Updated on 2026-11-05 GMT+08:00

Obtaining the CBH Instance List

Function

This API is used to obtain the CBH instance list of the current account.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{project_id}/cbs/instance/list

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which uniquely identifies a project. To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

instance_id

No

Long

Definition

CBH instance ID. This parameter is required when you query details about a single instance. You can view the instance details on the CBH console. If this parameter is not specified, all CBH instances of the tenant are queried by default.

Constraints

N/A

Range

N/A

Default Value

N/A

limit

No

Integer

Definition

Maximum number of records that can be returned.

Constraints

N/A

Range

Integer type. The value ranges from 1 to 1,000.

Default Value

1000

offset

No

Integer

Definition

Start offset (index position) of the query.

Constraints

N/A

Range

Integer type. The value must be greater than or equal to 0.

Default Value

0

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. You can obtain the token by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. For details, see Obtaining a User Token.

Constraints

N/A

Range

String type. The value can contain 1 to 28,000 characters.

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total

Integer

Definition

The total number of CBH instances.

Range

Integer type. The value ranges from 0 to 1000.

instance

Array of InstanceDetail objects

Definition

List of CBH instance details. Each element is an InstanceDetail object, including the instance name, server ID, instance ID, status, and specifications.

Table 5 InstanceDetail

Parameter

Type

Description

name

String

Definition

CBH instance name.

Range

String type. The value can contain 1 to 65 characters.

server_id

String

Definition

ID of the server housing the CBH instance.

Range

String type. The value can contain 1 to 64 characters.

instance_id

String

Definition

CBH instance ID.

Range

String type. The value can contain 1 to 36 characters.

alter_permit

Boolean

Definition

Whether the CBH instance can be expanded.

Range

  • true: yes

  • false: no

enterprise_project_id

String

Definition

Enterprise project ID.

Range

String type. The value can contain 1 to 36 characters.

period_num

String

Definition

Number of subscription periods of the CBH instance, in years or months.

Range

String type. The value can contain 1 to 36 characters.

start_time

String

Definition

Start time of the CBH instance (discarded).

Range

Timestamp string. The value can contain 1 to 13 characters.

end_time

String

Definition

End time of the CBH instance (discarded).

Range

Timestamp string. The value can contain 1 to 13 characters.

created_time

String

Definition

Time when the CBH instance is created. The format is yyyy-MM-dd HH:mm:ss.S.

Range

String type. The value can contain 1 to 25 characters.

upgrade_time

Long

Definition

Millisecond timestamp corresponding to the scheduled upgrade time.

Range

N/A

update

String

Definition

Whether the CBH instance can be upgraded.

Range

  • OLD: The version in use is already the latest. No update is required.

  • NEW: The version in use can be upgraded to the next later version.

  • CROSS_OS: The version in use can be upgraded to any later version.

  • ROLLBACK: The version in use can be rolled back.

bastion_version

String

Definition

Current version of the CBH instance.

Range

String type. The value can contain 1 to 36 characters.

az_info

az_info object

Definition

AZ information.

Range

N/A

status_info

status_info object

Definition

Status information.

Range

N/A

resource_info

resource_info object

Definition

Resource information.

Range

N/A

network

network object

Definition

Network information.

Range

N/A

ha_info

ha_info object

Definition

Primary and standby node information.

Range

N/A

Table 6 az_info

Parameter

Type

Description

region

String

Definition

ID of the region where the CBH instance is located.

Range

String type. The value can contain 1 to 36 characters.

zone

String

Definition

ID of the AZ where the CBH instance is located. (If the instance is deployed in primary/standby mode, this parameter indicates the AZ ID of the primary instance.)

Range

String type. The value can contain 1 to 36 characters.

availability_zone_display

String

Definition

Name of the AZ where the CBH instance is located. (If the instance is deployed in primary/standby mode, this parameter indicates the AZ name of the primary instance.)

Range

String type. The value can contain 1 to 36 characters.

slave_zone

String

Definition

AZ where the standby host of the CBH instance is located.

Range

String type. The value can contain 1 to 36 characters.

slave_zone_display

String

Definition

Name of the AZ where the standby host of the CBH instance is located.

Range

String type. The value can contain 1 to 36 characters.

Table 7 status_info

Parameter

Type

Description

status

String

Definition

CBH instance status.

Range

  • SHUTOFF: disabled

  • ACTIVE: running

  • DELETING: deleting

  • BUILD: creating

  • DELETED: deleted

  • ERROR: faulty

  • HAWAIT: creating the standby instance

  • FROZEN: frozen

  • UPGRADING: upgrading

  • UNPAID: pending payment

  • RESIZE: resizing

  • DILATATION: expanding

  • HA: configuring HA

task_status

String

Definition

Task status of the CBH instance.

Range

  • powering-on: starting

  • powering-off: stopping

  • rebooting: restarting

  • delete_wait: deleting

  • frozen: frozen

  • NO_TASK: running

  • unfrozen: unfrozen

  • alter: change

  • updating: upgrading

  • configuring-ha: configuring HA

  • data-migrating: migrating data

  • rollback: rolling back the version

  • traffic-switchover: switching traffic

create_instance_status

String

Definition

Status of the CBH instance during instance creation.

Range

  • Waiting for payment: pending payment

  • creating-network: creating network

  • creating-server: creating a server.

  • tranfering-horizontal-network: establishing network connections

  • adding-policy-route: adding a routing policy

  • configing-dns: configuring DNS

  • starting-cbs-service: The service is running.

  • setting-init-conf: initializing

  • buying-EIP: purchasing an EIP

instance_status

String

Definition

CBH instance status.

Range

  • building: creating

  • deleting: deleting

  • deleted: deleted

  • unpaid: unpaid

  • upgrading: upgrading

  • resizing: resizing

  • abnormal: abnormal

  • error: error

  • ok: normal

instance_description

String

Definition

Description of the CBH instance.

Range

String type. The value can contain 1 to 256 characters.

fail_reason

String

Definition

Cause of the CBH instance creation failure.

Range

String type. The value can contain 1 to 36 characters.

Table 8 resource_info

Parameter

Type

Description

specification

String

Definition

CBH instance specifications.

Range

String type. The value can contain 1 to 36 characters.

order_id

String

Definition

Order ID.

Range

String type. The value can contain 1 to 64 characters.

resource_id

String

Definition

Resource ID of the CBH instance, in UUID format.

Range

String type. The value can contain 1 to 36 characters.

data_disk_size

Number

Definition

CBH instance data disk size, in TB.

Range

Number. The value ranges from 0 to 300.

disk_resource_id

Array of strings

Definition

ID of the CBH instance data disk. A string array with a maximum of 21 elements.

Table 9 network

Parameter

Type

Description

vip

String

Definition

Floating IP address of the CBH instance. (The corresponding value is returned for the primary/standby instance.)

Range

String type. The value can contain 1 to 36 characters.

web_port

String

Definition

Port for accessing the web page of the CBH instance.

Range

String type. The value can contain 1 to 36 digits.

public_ip

String

Definition

EIP bound to the CBH instance.

Range

String type. The value can contain 1 to 15 characters.

public_id

String

Definition

ID of the EIP bound to the CBH instance, in UUID format.

Range

String type. The value can contain 1 to 36 characters.

private_ip

String

Definition

Private IP address of the CBH instance.

Range

String type. The value can contain 1 to 15 characters.

vpc_id

String

Definition

ID of the VPC for the CBH instance.

Range

String type. The value can contain 1 to 36 characters.

subnet_id

String

Definition

ID of the subnet for the CBH instance.

Range

String type. The value can contain 1 to 36 characters.

security_group_id

String

Definition

ID of the security group for the CBH instance.

Range

String type. The value can contain 1 to 36 characters.

Table 10 ha_info

Parameter

Type

Description

ha_id

String

Definition

Primary and standby instance IDs.

Range

String type. The value can contain 1 to 36 characters.

instance_type

String

Definition

Instance type.

Range

  • master: primary

  • slave: standby

Status code: 400

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_description

String

Incorrect request parameters.

Status code: 401

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_description

String

Token verification failed.

Status code: 403

Table 13 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_description

String

Permissions required.

Status code: 404

Table 14 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_description

String

Not CBH instances found.

Example Requests

None

Example Responses

Status code: 200

{
  "total" : 1,
  "instance" : [ {
    "name" : "CBH-e2b4",
    "server_id" : "760aeee4-9916-436a-8854-837aae94b2b",
    "instance_id" : "5473",
    "alter_permit" : false,
    "enterprise_project_id" : "0",
    "period_num" : "1,2",
    "start_time" : "1692245215000",
    "end_time" : "1694966399000",
    "upgrade_time" : 1694966399000,
    "created_time" : "2023-08-17 12:05:02.0",
    "update" : "OLD",
    "bastion_version" : "3.3.49.0",
    "az_info" : {
      "region" : "cn-north-7",
      "zone" : "cn-north-7a",
      "availability_zone_display" : "AZ 1",
      "slave_zone" : "cn-north-7b",
      "slave_zone_display" : "AZ 2"
    },
    "status_info" : {
      "status" : "ACTIVE",
      "task_status" : "NO_TASK",
      "create_instance_status" : "configing-dns",
      "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.125.3.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.