Creating a Cloud Phone BMS
Function
This API is only used to create a server with an image. To create a server containing cloud phones and phone images, call the API for creating a cloud phone server.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
POST /v2.1/{project_id}/cloud-phone/servers
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Specifies the project ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling an Identity and Access Management (IAM) API. The value of X-Subject-Token in the response header is the user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
server_name |
Yes |
String |
Specifies the name of the cloud phone BMS. The name can contain a maximum of 60 characters, including only letters, digits, underscores (_), and hyphens (-). If you purchase multiple cloud phone BMSs at a time, the system automatically adds a sequence number suffix to the end of each server name. For example, if you set server_name to server-1, the name of the first cloud phone BMS will be server-1-0001, and the name of the second one will be server-1-0002. |
|
server_model_name |
Yes |
String |
Specifies the name of the cloud phone BMS flavor. |
|
count |
Yes |
Integer |
Specifies the number of cloud phone BMSs to be purchased. A maximum of 10 BMSs can be purchased. |
|
order_param |
Yes |
order_param object |
Specifies the order structure. |
|
nics |
Yes |
Array of NicForSingleServer objects |
Specifies the structure of your customized network interface. The structure contains network interface information of the cloud phone BMS to be created. |
|
public_ip |
Yes |
public_ip object |
Specifies the structure of the EIP you specified. This parameter specifies how to configure an EIP for a cloud phone BMS. If the EIP is automatically assigned, you need to specify the information about the new EIP. If you use an existing EIP, you need to specify the EIP ID. |
|
availability_zone |
No |
String |
Name of the AZ where the cloud phone BMS is to be created. For example, the name for AZ 1 in the CN East-Shanghai1 region is cn-east-3a. |
|
data_volume |
No |
data_volume object |
Specifies the data disk structure. |
|
keypair_name |
Yes |
String |
Specifies the name of an existing key pair for logging in to the cloud phone BMS. |
|
enterprise_project_id |
No |
String |
Specifies the ID of the enterprise project. If this parameter is not specified or is set to 0, resources will be bound to the default enterprise project. |
|
image_id |
No |
String |
Specifies the image ID of the cloud phone BMS, which can contain a maximum of 36 bytes. If this parameter is not specified, the default cloud phone BMS image is used. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
charging_mode |
Yes |
Integer |
Specifies the billing mode. 0 indicates the yearly/monthly billing mode. |
|
period_type |
Yes |
Integer |
Specifies the subscription period type.
|
|
period_num |
Yes |
Integer |
Specifies the number of subscription periods. If the subscription period type is month, the value ranges from 1 to 9. If the subscription period type is year, the value ranges from 1 to 10. |
|
is_auto_pay |
No |
Integer |
Specifies whether automatic payment is enabled. By default, automatic payment is disabled.
|
|
is_auto_renew |
No |
Integer |
Specifies whether auto-renewal is enabled. By default, auto-renewal is disabled.
|
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
subnet_id |
Yes |
String |
Specifies the ID of the subnet where the cloud phone BMS is deployed. The value must be the ID of the subnet created in the VPC specified by vpc_id and in the format of the UUID. |
|
ipv6_enable |
No |
Boolean |
Specifies whether IPv6 is supported. By default, IPv6 is not supported.
|
|
ipv6_band_width_id |
No |
String |
Specifies the ID of the shared bandwidth bound to an IPv6 address. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
ids |
No |
Array of strings |
Specifies an existing EIP for creating a cloud phone BMS. Only one existing EIP ID can be specified. After an EIP is specified, the count and type fields in the public_ip structure do not take effect. |
|
type |
No |
String |
Specifies the EIP type. The value can be 5_telcom (China Telecom), 5_union (China Unicom), 5_bgp (Dynamic BGP), or 5_sbgp (Static BGP). |
|
count |
No |
Integer |
Specifies the number of EIPs. The default value is 0. The value can be 0 or 1. |
|
band_width |
Yes |
band_width object |
Specifies the bandwidth used by the cloud phone BMS. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
band_width_id |
No |
String |
Specifies the ID of the bandwidth used by the cloud phone server. This parameter is mandatory when shared bandwidth is selected. |
|
band_width_size |
No |
Integer |
Specifies the size of the bandwidth used by the cloud phone server. This parameter is mandatory when dedicated bandwidth is selected. |
|
band_width_charge_mode |
Yes |
Integer |
Specifies how the bandwidth used by the cloud phone server is billed.
|
|
band_width_share_type |
Yes |
Integer |
Specifies the bandwidth type of the cloud phone server.
|
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
volume_type |
Yes |
String |
Specifies the data disk type. Only the following types are supported: SSD and GPSSD |
|
size |
Yes |
Integer |
Specifies the data disk size, in GiB. The value ranges from 1 GiB to 32,768 GiB. |
|
count |
No |
Integer |
Specifies the number of data disks. The default value is 1. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
request_id |
String |
Specifies the unique request ID. |
|
order_id |
String |
Specifies the order ID, which can contain a maximum of 64 bytes. |
|
product_id |
String |
Specifies the product ID, which can contain a maximum of 64 bytes. |
|
server_ids |
Array of strings |
Specifies the server ID list. |
|
error_msg |
String |
Specifies the error message returned for the task. |
|
error_code |
String |
Specifies the task error code. |
Example Requests
Specifies the request body for creating a cloud phone BMS.
POST https://{CPH Endpoint}/v2.1/{project_id}/cloud-phone/servers
{
"server_name" : "cph-test-wy",
"server_model_name" : "physical.rx2.32xlarge.4",
"count" : 1,
"order_param" : {
"charging_mode" : 0,
"period_type" : 2,
"period_num" : 1,
"is_auto_renew" : 0,
"is_auto_pay" : 1
},
"nics" : [ {
"subnet_id" : "3c5e2638-b71f-4499-8d1e-355e89f21ae0",
"vpc_id" : "6eb5019f-df01-4ded-9486-d54e7b282ced",
"ipv6_enable" : true,
"ipv6_band_width_id" : "fbe74c2f-e2ba-427a-b8aa-1c7c4f510ac1"
} ],
"public_ip" : {
"type" : "5_bgp",
"count" : 1,
"band_width" : {
"band_width_share_type" : 0,
"band_width_size" : 300,
"band_width_charge_mode" : 1
}
},
"keypair_name" : "KeyPair-1d1d-wy",
"enterprise_project_id" : "0"
}
Example Responses
Status code: 200
OK
{
"request_id" : "1564567b8bab40f34711234cb80d8574",
"order_id" : "CS1710111105S8IPB",
"product_id" : "00301-25217-0--0",
"server_ids" : [ "1234567b8bab40ffb711234cb80d0234", "1678567b8bab40f93711234cb80d0764" ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
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