Updated on 2023-05-16 GMT+08:00

Obtaining the CBH Instance List

Function

This API is used to query the list of CBH instances.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. You can obtain the project ID by referring to https://support.huaweicloud.com/intl/en-us/api-cbh/cbh_02_0020.html.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

total

Integer

Total number of CBH instances

quotaDetail

QuotaDetail object

CBH quota for the current account. null is returned for the public cloud.

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 bound to the CBH instance. By default, null is returned.

expTime

String

CBH instance expiration time.

startTime

String

Time the CBH instance starts, in the format of timestamp

endTime

String

Time the CBH instance stopped, in the format of timestamp

releaseTime

String

Time the CBH instance was released, in the format of timestamp

name

String

CBH instance name

instanceId

String

CBH instance ID, in the UUID format.

privateIp

String

Private IP address of the CBH instance

taskStatus

String

CBH instance task status.

status

String

CBH instance status

created

String

Time the CBH instance is created. The time must be UTC time.

region

String

Region where the CBH instance locates.

zone

String

AZ where the CBH instance locates.

availability_zone_display

String

AZ where the CBH instance locates.

vpcId

String

ID of the VPC where the CBH instance locates.

subnetId

String

ID of the subnet where the CBH instance locates.

securityGroupId

String

ID of the Security group where the CBH instance locates.

specification

String

CBH instance specifications.

update

String

Whether the CBH instance image can be upgraded.

  • NEW: The image can be upgraded.

  • OLD: The image cannot be upgraded.

createinstanceStatus

String

Statuses of the CBH instance creation task.

  • Waiting for payment: Waiting for payment

  • creating-network: Creating the network

  • creating-server: Creating the instance

  • tranfering-horizontal-network: Establishing the connection

  • adding-policy-route: Adding a routing policy

  • configing-dns: Configuring DNS

  • starting-cbs-service: Running

  • setting-init-conf: Initiating

  • buying-EIP: Purchasing an EIP

failReason

String

CBH instance creation failure causes.

instanceKey

String

CBH instance key.

orderId

String

Order ID.

periodNum

String

The number of subscription cycles.

resourceId

String

CBH instance ID, in the UUID format.

bastion_type

String

CBH instance type. -OEM

alterPermit

String

Whether the CBH instance can be upgraded.

  • 1: Enable capacity expansion.

  • 0: Disable capacity expansion.

publicId

String

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

bastionVersion

String

Current version of the CBH instance image.

newBastionVersion

String

CBH instance image that can be upgraded.

instanceStatus

String

CBH instance status

  • building: Creating

  • deleting: Deleting

  • deleted: Deleted

  • unpaid: Unpaid

  • upgrading: Upgrading

  • resizing: Resizing

  • abnormal: Abnormal

  • error: Faulty

  • ok: Normal

instanceDescription

String

CBH instance status description.

slaveZone

String

AZ of the standby CBH instance. By default, null is returned.

enterpriseProjectId

String

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

instanceType

String

CBH instance type.

  • null: The default value is null for the single-node deployment.

  • master: The primary CBH instance in HA scenarios.

  • slave: The standby CBH instance in HA scenarios.

haId

String

HA ID of the CBH instance.

  • By default, null is returned for the single-node deployment.

  • HA ID.

slaveZoneDisplay

String

AZ where the standby CBH instance is deployed. null is returned for the CBH instance in single-node deployment or the standby CBH instance in HA scenarios.

webPort

String

Port used for accessing the CBH instance with a web browser.

vip

String

Floating IP address of the CBH instance

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error Code

error_description

String

Incorrect request parameter.

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

CBH instances not found.

Example Requests

None

Example Responses

Status code: 200

The query is successful.

{
  "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 query is successful.

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.