Creating a CBH Instance
Function
Creating a CBH Instance
URI
POST /v2/{project_id}/cbs/instance
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
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token It can be obtained 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 the Token of an IAM User." |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
specification |
Yes |
String |
ID of the specification of the CBH instance to be created, for example:
For details, see "Querying CBH Instance Specifications." |
instance_name |
Yes |
String |
CBH instance name. The requirements are as follows: The parameter value consists of 1 to 64 characters, including letters, digits, underscores (_), and hyphens (-). Example: CBH-6b8e |
password |
Yes |
String |
Password for logging in to the CBH instance. The password can contain 8 to 32 characters, excluding amdin, nidma, and their uppercase letters. A password must contain at least three types of the following: uppercase letters, lowercase letters, digits, and special characters. |
region |
Yes |
String |
ID of the site where the CBH instance was created. For details, see "Querying CBH Instance Specifications." |
availability_zone |
Yes |
String |
Name of the AZ where the CBH instance is located. (In active/standby mode, the AZ where the active instance locates is required.) For details, see "Obtaining AZs Where CBH Is Available." |
slave_availability_zone |
No |
String |
Name of the AZ where the standby CBH instance is located. (This parameter is not required when only a single-node instance is created.) For details, see "Obtaining AZs Where CBH Is Available." |
charging_mode |
Yes |
Integer |
Billing mode.
|
period_type |
No |
Integer |
Subscription type. (Mandatory for the yearly/monthly billing mode)
|
period_num |
No |
Integer |
Number of subscription periods. (Mandatory for the yearly/monthly billing mode)
|
is_auto_renew |
No |
Integer |
Whether auto-renewal is enabled.
The default value is 0. |
is_auto_pay |
No |
Integer |
Whether an order is automatically paid from your Huawei Cloud account.
The default value is 0. |
network |
Yes |
NetworkInfoCreate object |
The network information required for changing the VPC the CBH instance belongs to. |
ipv6_enable |
No |
Boolean |
Whether the CBH instance supports IPv6 addresses. The default value is false. |
enterprise_project_id |
No |
String |
Enterprise project ID. The default value is 0. |
attach_disk_size |
No |
Integer |
Additional disk size. Unit: TB NOTE The total size of the additional disk and the built-in disk cannot exceed 300 TB. |
tags |
No |
Array of ResourceTag objects |
Tag details. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
vpc_id |
Yes |
String |
ID of the VPC to which the ECS belongs. The value is in UUID format. You can obtain the VPC ID from the management console or by following the instructions provided in "Querying VPCs" in Virtual Private Cloud API Reference. Example: 03211ecf-xxxx-4306-xxxx-6e939bfxxxxx |
subnet_id |
Yes |
String |
Subnet ID, which consists of letters, digits, and underscores (_). |
public_ip |
Yes |
PublicIp object |
EIP bound to the CBH instance. The value can be null. |
security_groups |
Yes |
Array of SecurityGroup objects |
Security group information. |
private_ip |
No |
PrivateIp object |
EIP bound to the CBH instance. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
String |
ID of the EIP. |
public_eip |
No |
String |
Elastic IP address. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
Yes |
String |
ID of the security group that the CBH instance belongs to. The value consists of letters, digits, and underscores (_). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
order_id |
String |
Order ID. |
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
{ "specification" : "cbh.basic.50", "instance_name" : "CBH-155f", "password" : "1xxx6xxxx", "region" : "cn-north-4", "availability_zone" : "cn-north-4a", "slave_availability_zone" : "cn-north-4a", "charging_mode" : 0, "period_type" : 2, "period_num" : 1, "is_auto_renew" : 0, "is_auto_pay" : 0, "ipv6_enable" : false, "enterprise_project_id" : "0", "attach_disk_size" : 1, "tags" : [ { "key" : "key", "value" : "value" } ], "network" : { "vpc_id" : "279e8217-xxxx-4d83-xxxx-b8f14d47170b", "subnet_id" : "a86217e6-xxxx-4803-xxxx-b57da681xxxx", "private_ip" : { "ip" : "123.xxx.41.xx", "slave_ip" : "123.xxx.41.xx", "floating_ip" : "123.xxx.41.xx" }, "public_ip" : { "id" : "cfcab481-xxxx-4e23-xxxx-d6cdd0efxxxx", "public_eip" : "123.xxx.41.xx" }, "security_groups" : [ { "id" : "1e10bc4f-xxxx-4452-xxxx-8ddb4348xxx" } ] } }
Example Responses
Status code: 200
Cbh Create Instance Success
{ "order_id" : "CS22xxx82xx5AssGxxx" }
Status Codes
Status Code |
Description |
---|---|
200 |
Cbh Create 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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot