nav-img
Advanced

Obtaining the CBH Instance List

Function

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

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see [Obtaining a Project ID].

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

total

Integer

The total number of CBH instances.

quotaDetail

The CBH quota of the current user. The default value null is returned.

instance

Array of InstanceDetail objects

CBH instance list.

Table 3 QuotaDetail

Parameter

Type

Description

zh_cn

String

Quota description.

en_us

String

Quota description.

remaining

Integer

Remaining quota.

Table 4 InstanceDetail

Parameter

Type

Description

publicip

String

EIP of the CBH instance. The default value null is returned.

expTime

String

Expiration time of the CBH instance.

startTime

String

Start time of the CBH instance, in timestamp format.

endTime

String

End time of the CBH instance, in timestamp format.

releaseTime

String

Release time of the CBH instance, in timestamp format.

name

String

CBH instance name.

instanceId

String

CBH instance ID, in UUID format.

privateIp

String

Private IP address of the CBH instance.

taskStatus

String

Task status of the CBH instance.

  • powering-on: Started.

  • powering-off: Stopped.

  • rebooting: The system is being restarted.

  • delete_wait: Delete

  • frozen: The instance is frozen.

  • NO_TASK: Running

  • unfrozen: Unfrozen

  • alter: Change

  • updating: Being updated.

  • configuring-ha: Configuring HA.

status

String

CBH instance status.

  • SHUTOFF: The instance is shut down.

  • ACTIVE: The instance is running.

  • DELETING: The instance is being deleted.

  • BUILD: The instance is being created.

  • DELETED: The instance was deleted.

  • ERROR: Faulty

  • HAWAIT: The standby instance is being created.

  • FROZEN: The instance has been frozen.

  • UPGRADING: The instance is being upgraded.

  • UNPAID: Pending payment.

  • RESIZE: The instance specifications are being changed.

  • DILATATION: The instance capacity is being expanded.

  • HA: HA is being configured.

created

String

Time when the CBH instance was created, in UTC format.

region

String

Site where the CBH instance was located.

zone

String

Region where the CBH instance is located.

availability_zone_display

String

Name of the region where the CBH instance is located.

vpcId

String

ID of the VPC where the CBH instance is located.

subnetId

String

ID of the subnet where the CBH instance is located.

securityGroupId

String

ID of the security group to which the CBH instance belongs.

specification

String

CBH instance specifications.

update

String

Whether the CBH instance can be upgraded.

  • NEW: The upgrade can be performed.

  • OLD: The upgrade cannot be performed.

createinstanceStatus

String

Status of a CBH instance during instance creation.

  • Waiting for payment: Waiting for payment

  • creating-network: Creating a network.

  • creating-server: Creating the service.

  • 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: Buying an EIP.

failReason

String

Cause of the CBH instance creation failure.

instanceKey

String

CBH instance tag key.

orderId

String

Order ID.

periodNum

String

Number of subscription periods of a CBH instance.

resourceId

String

Resource ID of the CBH instance, in UUID format.

bastion_type

String

CBH instance type.

  • OEM

alterPermit

String

Whether the CBH instance can be expanded.

  • 1: Enable scale-out.

  • 0: Disable scale-out.

publicId

String

D of the EIP bound to the CBH instance. The value is in UUID format.

bastionVersion

String

Current version of the CBH instance.

newBastionVersion

String

The version the CBH instance can be upgraded to.

instanceStatus

String

CBH instance status.

  • building: The instance is being created.

  • deleting: The instance is being deleted.

  • deleted: The instance was deleted.

  • unpaid: The order is unpaid.

  • upgrading: The instance is being upgraded.

  • resizing: The instance capacity is being expanded.

  • abnormal: The instance is abnormal.

  • error: The instance is faulty.

  • ok: The instance is normal.

instanceDescription

String

CBH instance status description.

slaveZone

String

AZ where the standby instance locates. By default, null is returned.

enterpriseProjectId

String

ID of the enterprise project to which the CBH instance belongs.

instanceType

String

CBH instance type.

  • null: For a single-node system, null is returned by default.

  • master: The type of the active instance is returned in HA mode.

  • slave: The type of the standby instance is returned in HA mode.

haId

String

ID of the primary/standby CBH instance.

  • For a single-node CBH instance, null is returned by default.

  • ID of active CBH instance returns in HA mode.

slaveZoneDisplay

String

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

For a single-node CBH instance and a standby CBH instance, null is returned. For an HA CBH instance, the name of the AZ where the standby instance resides is returned.

webPort

String

Port for accessing the web page of the CBH instance.

vip

String

Floating IP address of the CBH instance. The default value null is returned.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_description

String

Bad request.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_description

String

Failed to verify the token.

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_description

String

Permissions required.

Status code: 404

Table 8 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

The CBH instance list is queried successfully.

{
"total" : 1,
"quotaDetail" : "null",
"instance" : [ {
"publicip" : "null",
"expTime" : "14",
"startTime" : "1669911490000",
"endTime" : "1672675199000",
"releaseTime" : "1675267199000",
"name" : "CBH-8a80",
"instanceId" : "f7854c8d-9bbc-4970-8b7d-6ed8280f6bfe",
"privateIp" : "192.168.0.67",
"status" : "SHUTOFF",
"taskStatus" : "NO_TASK",
"created" : "2022-12-02 00:04:42.0",
"region" : "cn-north-4",
"zone" : "cn-north-4c",
"availability_zone_display" : "AZ 3",
"vpcId" : "279e8217-4a8a-4d83-8fd9-b8f14d47170b",
"subnetId" : "a86217e6-a96d-4803-ae5c-b57da6811249",
"securityGroupId" : "c5564ac2-bdcf-4e45-b892-92c2ae79ecd9",
"specification" : "cbh.basic.50",
"update" : "OLD",
"createinstanceStatus" : "starting-cbs-service",
"failReason" : "No FailReason Now",
"instanceKey" : "6771",
"orderId" : "CS22120200031TOLA",
"periodNum" : "1,2",
"resourceId" : "01903dfb-11fc-4ae4-8bff-bca51d11ad92",
"bastion_type" : "OEM",
"publicId" : "",
"alterPermit" : "1",
"bastionVersion" : "3.3.41.0",
"newBastionVersion" : "3.3.40.1",
"instanceStatus" : "error",
"instanceDescription" : "LoadBalance service error!,2022-12-19 17:14:30,{\"d_usage\":\"0.80\",\"m_usage\":\"30.04\",\"c_usage\":\"0.62\",\"session_count\":\"0\"",
"webPort" : "443",
"enterpriseProjectId" : "0",
"vip" : null,
"slaveZone" : null,
"slaveZoneDisplay" : null,
"haId" : null,
"instanceType" : null
} ]
}

Status Codes

Status Code

Description

200

The CBH instance list is queried successfully.

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes