Create an Instance
Precondition
Creating an instance requires the real name authentication. Anyone who does not pass the real name authentication can go to the [Personal Authentication](#UserGuide/Identity Verification/Individual Identity Verification.md) or [Enterprise Authentication](#UserGuide/Identity Verification/Enterprise Identity Verification.md) under the security authentication in the Baidu AI Cloud official website console for the authentication.
BCC instance
-
Considerations for billing:
- To create a postpaid instance, the account cash balance and the general voucher must be greater than 100 CNY. To create a prepaid instance, the account cash balance must be greater than or equal to the instance cost.
- When you create the public IP with specified bandwidth, the billing mode is bill-by-bandwidth.
-
Considerations for instance:
- Specify the virtual machine type to create through the instanceType field. For the virtual machine types supported by API currently, see [InstanceType](#BCC/API Reference/Appendix.md#InstanceType). The parameters
instanceType
,cpuCount
andmemoryCapacityInGB
can determine the required model and configuration. - You can not purchase both GPU card and FPGA card for the same instance. When you purchase an instance with GPU card or FPGA card, you must specify the number of GPU cards or FPGA cards for the virtual machine to purchase through cardCount.
- When you purchase the virtual machine with GPU card or FPGA card, the number of CPU cores (cpuCount), memory capacity (memoryCapacityInGB), system disk type and size (ephemeralDisks) to purchase in the request should be empty or meet the requirements of [GPU BCC Optional Specification Configuration](#BCC/API Reference/Appendix.md#GPU BCC Optional Specification Configuration) or [FPGA BCC](#BCC/API Reference/Appendix.md#FPGA BCC Optional Specification Configuration) [Optional Specification Configuration of ](#BCC/APIReference/Appendix.md#FPGA BCC Optional Specification Configuration)depending on the number and type of GPU cards or FPGA cards.
- Specify the virtual machine type to create through the instanceType field. For the virtual machine types supported by API currently, see [InstanceType](#BCC/API Reference/Appendix.md#InstanceType). The parameters
-
Considerations for storage:
- When you create an instance, you can specify the system disk size. The system disk size range is [40, 500] GB. The 40 GB of free hp1 type CDS disk is used as the system disk by default. For the specified system disk type, see [StorageType](#BCC/API Reference/Appendix.md#StorageType).
- Baidu AI Cloud provides 40 GB of free system disk. If it exceeds 40 GB of free quota, the excess part is charged as per corresponding CDS disk.
- The system disk added during the creation of instance can not be changed after the creation, and it does not support to create or add the system disk separately.
- The system disk does not support the mount, uninstall or delete.
- When you create the CDS system disk and data disk, it supports to select the disk size at the step width 1 GB.
- An instance can mount up to 5 CDS disks by default.
- The system disk size of BCC instance can not exceed up to 500 GB.
- You can purchase one temporary data disk for each instance at most. Only the hp1 type of temporary data disk exists by default.
- To create a memory optimized instance, you must purchase the temporary data disk, and specify the storage capacity of the temporary data disk through ephemeralDisks. The temporary data disk is of nvme type by default, which does not need to specify.
-
Considerations for network:
- BCC instances support user-defined security groups and subnets, both of which need to be specified under the same VPC If you do not specify a security group and subnet, you will automatically enter the system's default security group and subnet when you create a dedicated instance.
-
Other Precautions
- Batch creation is supported, and if one instance fails to be created in the creation, all instances are rolled back and all creations fail. If a CDS is included when it is created, the CDS will also be rolled back.
- If the interface is asynchronously created, the instance status can be queried via the [Designated Instance Details Interface](#BCC/API Instance Related Interface/Query the details of Designated Instances.md).
- You can specify DCC to create an instance by this interface, and the dedicated instance is not billed. Dedicated instances can only create temporary disks and specify disk types by ephemeralDisks.
DCC Instance
This API is also used to create the instance on DCC. The following operations may be related to your business during the creation of DCC instance:
- The dedicated instance cannot be renewed.
- This API is used to create one or more dedicated instances.
- Batch creation is supported, and if one instance fails to be created in the creation, all instances are rolled back and all creations fail. If a CDS is included when it is created, the CDS will also be rolled back.
- The dedicated instance support creating and adding local disks.
- The local disk does not support the mount, uninstall or delete.
- DCC allows users to customize the parameters such as the CPU and memory of the dedicated instance. The resources of the dedicated instance created will use DCC resources.
- The dedicated instance can only creates temporary disks and specify disk types by ephemeralDisks.
- The dedicated instance support user-defined security groups and subnets, both of which need to be specified under the same VPC If you failed to specify any security group and subnets, when a dedicated instance is created, the default security group and subnet are added automatically by the system.
Request Structure
POST /v{version}/instance?clientToken={clientToken} HTTP/1.1
Host: bcc.bj.baidubce.com
Authorization: authorization string
{
"instanceType": instanceType,
"cpuCount": cpuCoreCount,
"memoryCapacityInGB": memoryCapacityInGB,
“rootDiskSizeInGb":rootDiskSizeInGb,
"rootDiskStorageType":"rootDiskStorageType",
"ephemeralDisks": [
{
"storageType": storageType,
"sizeInGB": size
},
{
"storageType": storageType,
"sizeInGB": size
}
],
"createCdsList": [
{
"storageType": storageType,
"cdsSizeInGB": cdsSizeInGB
}
],
"name": "name",
"hostname": "hostname",
"autoSeqSuffix": autoSeqSuffix,
"isOpenHostnameDomain": isOpenHostnameDomain,
"imageId": "imageId",
"localDiskSizeInGB": localDiskSizeInGB,
"networkCapacityInMbps": networkCapacityInMbps,
"autoRenewTimeUnit": "autoRenewTimeUnit",
"autoRenewTime": autoRenewTime,
"cdsAutoRenew": cdsAutoRenew,
"dedicatedHostId": dedicatedHostId,
"purchaseCount": purchaseCount,
"billing":{
"paymentTiming": paymentTiming,
"reservation": {
"reservationLength": reservationLength
}
},
"zoneName": zoneName,
"subnetId": subnetId,
"securityGroupId": securityGroupId,
"relationTag": relationTag,
"isOpenIpv6": isOpenIpv6,
"tags": [
{
"tagKey": tagKey,
"tagValue": tagValue
}
],
"keypairId": keypairId
}
Request header field
No other special header fields are available, except for common header fields.
Request Parameter
Parameter name | ** Type** | Required? | Parameter Position | Description |
---|---|---|---|---|
version | String | Yes | URL Parameter | API version number |
clientToken | String | Yes | Query Parameters | [Idempotent](#BCC/API Reference/General Instructions.md) Token is an ASCII character string with a length not exceeding 64 bits. |
imageId | String | Yes | RequestBody parameter | Image ID of virtual machine instance to create, call the query image list interface to obtain the required image ID. |
billing | [Billing](#BCC/API Reference/Appendix.md#Billing) | Yes | RequestBody Parameters | Order and billing related parameters |
instanceType | String | No | RequestBody Parameters | Type of virtual machine instance to create. For the specific optional type, see the following [InstanceType](#BCC/API Reference/Appendix.md#InstanceType), If the type is null, the default type of virtual machine is used. |
cpuCount | int | Yes | RequestBody Parameters | CPU cores of virtual machine instance to create |
memoryCapacityInGB | int | Yes | RequestBody Parameters | Memory capacity of virtual machine instance to create (GB). For the optional configuration, see [Regional Model and Optional Configuration](#BCC/API Reference/Appendix.md#Regional Models and Optional Configurations). |
rootDiskSizeInGb | int | No | RequestBody Parameters | System disk size (GB) of the virtual machine instance to be created. Its default value is 40 GB, and its range is [40, 500] GB. If the disk size is over 40 GB, it is charged as a cloud disk. The specified system disk size needs to meet the minimum disk space limit of mirror used. |
rootDiskStorageType | String | No | RequestBody Parameters | System disk media for vitual machine instance to create. The cloud disk is of hp1 type by default. For the specified type of system disk, see [StorageType](#BCC/API Reference/Appendix.md#StorageType). |
localDiskSizeInGB, | int | No | RequestBody Parameters | [Discarded] The size of the temporary data disk of the virtual machine instance to be created (excluding the free system disk). its unit is GB and the size is 0 ~ 500G. its field adopt the ephemeralDisks. |
ephemeralDisks | List<[EphemeralDisk](#BCC/API Reference/Appendix.md#EphemeralDisk)> | No | RequestBody Parameters | The DCC instance can create multiple local disks. The disk type and size need to be specified. Other BCC types can only use one local disk at most. The default disk type is used, and the disk size needs to be specified. The FPGA instance and the GPU instance use a local disk by default, and the local disk size is specified according to the configuration. For more information, see [Optional specification configuration of GPU BCC](#BCC/API Reference/Appendix.md#GPU BCC Optional Specification Configuration) and[ Optional specification configuration of FPGA type BCC](#BCC/API Reference/Appendix.md#FPGA BCC Optional Specification Configuration). |
createCdsList | List<[CreateCdsModel](#BCC/API Reference/Appendix.md#CreateCdsModel)> | No | RequestBody Parameters | List of CDS disks to create. For the specific data format, see the following [CreateCdsModel](#BCC/API Reference/Appendix.md#CreateCdsModel) |
networkCapacityInMbps | int | No | RequestBody Parameters | Internet bandwidth (Mbps). It must be an integer within 0-200, It means that no public IP is assigned if the value is 0Mbps, and the default value is 0Mbps. |
dedicatedHostId | string | No | RequestBody Parameters | DCC id of dedicated server, which is specified when the placement location of virtual machine is specified. |
purchaseCount | int | No | RequestBody Parameters | Number of virtual machine instances created (purchased) in batch It must be an integer greater than 0, optional parameter, the default value is 1. If the set value is more than 2, it means to create two or more virtual machine instances with the same configuration. |
name | String | No | RequestBody Parameters | Name of virtual machine (optional). The name is not specified by default. If the name is specified: Name is used as the prefix of name in batch. The suffix is attached at the back. Suffix generation mode: name\{ - sequence number}. If no name is specified, generate the "," mode automatically: {instance8bit random stringSequence number}. The random string is generated from the digit 0~9a~z;and the sequence number is increased by the order of count. If the count is 100, the sequence number is increased from 000~100,If the count is 10, the sequence number is increased from 00~10. Supports uppercase and lowercase letters, numbers, Chinese, -, _ and /. Special characters with length 1-65, it must begin with the letter |
hostname | String | No | RequestBody Parameters | server name of virtual machine (optional). The hostname is not specified by default. If the hostname is specified: hostname is used as the prefix of name in batch. The suffix is attached at the back. Suffix generation mode: name\{ sequence number}. If no name is specified, generate the "," mode automatically: {instance8bit random stringSequence number}. The random string is generated from the digit 0~9a~z;and the sequence number is increased by the order of count. If the count is 100, the sequence number is increased from 000~100,If the count is 10, the sequence number is increased from 00~10. Only support uppercase and lowercase letters, numbers, - and /. Special characters with length 2-64, it must begin with the letter |
autoSeqSuffix | boolean | No | RequestBody Parameters | whether or not automatically generate name and a hostname with an ordered suffix(optional parameters) is Yes:true , No: false. |
isOpenHostnameDomain | boolean | No | RequestBody Parameters | whether or not automatically generate a hostname domain (optional parameters) is Yes:true , No: false. |
adminPass | String | No | RequestBody Parameters | Admin password of instance to specify, which must contain 8-16 bit characters, English, numbers and symbols, and the symbol is only limited to !@#$%^*() , the password needs to be encrypted for transmission. For more information, see [link](#BCC/API Reference/General Instructions.md#Password Encrypted Transmission Specifications) |
zoneName | String | No | RequestBody Parameters | Specify the zone information, which is null by default and is automatically selected by the system. You can query the AZ list by calling [Query AZ List](#BCC/API Reference/Other Interfaces/Query List of Availability Zones.md) interface. The ZoneName naming convention is "country-region-AZ sequence” in lowercase letters, for example, Beijing AZ A is "cn-bj-a". The dedicated instance uses the zone where the dedicated server is located, without specifying this field. |
subnetId | String | No | RequestBody Parameters | Specify the subnet. If it is null, the default subnet is used. |
relationTag | boolean | No | RequestBody Parameters | Does the tag specified by the instance to create need to associate with the existing tag key? The default value is false. Note: When the value is true, ensure that this tag key already exists. |
isOpenIpv6 | boolean | No | RequestBody Parameters | Check to see if the instance to create has ipv6 enabled or not. Ipv6 can be enabled only when both mirror and subnet support ipv6, true indicates enable and false indicates off. Non-transmission indicates the conditions of whether or not an automatic adaptive mirror and subnet support ipv6. |
tags | List<[TagModel](#BCC/API Reference/Appendix.md)> | No | RequestBody Parameters | It is the list of tags to create. For the specific data format, see [TagModel.](#BCC/API Reference/Appendix.md) |
securityGroupId | String | No | RequestBody Parameters | Specify the security group. If it is null, the default security group is used. |
gpuCard | String | No | RequestBody Parameters | GPU card information carried by the instance to create. For the specific optional information, see[GpuType](#BCC/API Reference/Appendix.md#GpuType), This field needs not to be specified for the non-GPU instance |
fpgaCard | String | No | RequestBody Parameters | FPGA card information carried by the instance to create. For the specific optional information, see[FpgaType](#BCC/API Reference/Appendix.md#FpgaType), this field needs not to be specified for the non-FPGA instance |
cardCount | String | No | RequestBody Parameters | GPU cards or FPGA cards carried by the instance to create. It is valid only when the gpuCard or fpgaCard field is not null and the requirements in [Optional specification configuration of GPU instance ](#BCC/API Reference/Appendix.md#GPU BCC Optional specification configuration)or [FPOptional specification configuration of FPGA instance](#BCC/API Reference/Appendix.md#FPGA BCC Optional specification configuration) |
autoRenewTimeUnit | String | No | RequestBody Parameters | Monthly or annual payment, "month" for monthly payment, and "year" for annual payment. |
autoRenewTime | int | No | RequestBody Parameters | Time of auto renew, 1-9 for monthly renew, and 1-3 for annual renew. |
cdsAutoRenew | boolean | No | RequestBody Parameters | Auto renew of CDS? Yes: true No: false |
keypairId | String | No | RequestBody Parameters | a Key Pair ID to bind to for instance to be Create |
aspId | String | No | RequestBody Parameters | Automatic snapshot policy ID |
internetChargeType | String | No | RequestBody Parameters | For more information on optional parameters of the Internet bandwidth billing methods, see [internetChargeType](#BCC/API Reference/Appendix.md#InternetChargeType). If internetChargeType is not specified, the default payment method is the same with that of BCC. The default prepaid method means that you make payments yearly or monthly, while the default postpaid method means that you pay as you go. |
deployId | String | No | RequestBody Parameters | Specifies the id of the deployment set where the instance is located |
deployIdList | List |
No | RequestBody Parameters | Specifies the id list of the deployment set where the instance is located |
Return a header field
There are no other special header fields except the common header field.
Return Parameter
Parameter Name | Type | Description |
---|---|---|
instanceIds | List |
It is a set of IDs of the virtual machine instances. ID is in line with the BCE specification, and contains only uppercase and lowercase English letters, numbers, hyphens (), and underscores (_). |
Error Code
Error Code | Error Description | HTTP status code | Explanation |
---|---|---|---|
Instance.InvalidateRootDiskStorageType | Invalidate root disk storage type. | 400 | Invalid system disk media |
Instance.InstanceBeBanned | The instance is banned, contact technical support for assistance. | 403 | The BCC service has been blocked. |
Instance.GlobalInstanceQuotaLimitExceeded | Quota exceeds limit for regional postpaid instances pool, contact technical support for further assistance. | 413 | The number of post-paid virtual machines exceeds the pre-sale quota limit in the current region |
Instance.InstanceQuotaLimitExceeded | Quota exceeds limit. | 413 | The number of instances exceeds the limit |
Instance.EipQuotaLimitExceeded | The number of eip will exceed the limit. | 413 | The number of eip exceeds the limit during the merged purchase. |
Instance.InvalidateConfiguration | Invalidate cpu memory configuration. | 400 | Invalid virtual machine configuration |
Instance.InsufficientRootDiskSize | Not enough root disk size. | 400 | The image is too large and the system disk size is not enough/ |
Instance.PermissionDeny | Instance permission deny. | 401 | You are not permitted |
RealNameQualify | No real name authentication | 409 | Operation is not allowed, without a name authentication |
Instance.RegionDenyException | You're not allowed to access this region. | 403 | Region access denied exception. |
BadRequest | cds config error. | 400 | Cds configuration error |
Instance.InstanceCountCdsCountNotMatchException | Cds count must be multiple number of Instance count | 400 | The number of virtual machine created does not match the number of cds. |
Instance.InvalidateZoneException | Invalidate zone name. | 400 | Invalid availability zone |
Instance.NotSupportInstanceTypeException | not support the instance type. | 403 | The model is not supported |
BadRequest | Not support serviceType. | 400 | Service type is not supported |
BadRequest | invalid deploy id. | 400 | Invalid deployment set ID |
BadRequest | invalid cds count. | 400 | The number of cds should be an integer multiple of bcc |
BadRequest | Can not create Bcc both with gpuCard and fpgaCard. | 400 | Cannot create gpu type and fpga type BCC at the same time |
Instance.InvalidateGpuCardException | GpuCard is invalid. | 400 | The GPU card selected by the user does not exist |
Instance.InvalidateFpgaCardException | FpgaCard is invalid. | 400 | The Fpga card selected by the user does not exist |
Instance.MKTImageInstanceNotSupportCreateSnapshotException | Instance with mkt image not support create system snapshot. | 403 | The cloud market image does not support the creation of system Snapshot. |
Instance.CdsSnapshotNotMatchException | No cds for snapshot. | 400 | Description to be determined, no CDS for snapshot |
Instance.CdsSnapshotSmallException | Cds for snapshot is smaller than snapshot. | 400 | Description to be determined, CDS is smaller than snapshot |
Instance.InvalidAutoRenewTimeException | Instance autoRenew time is invalid. | 400 | Invalid auto-renewal time |
Instance.InvalidAutoRenewTimeUnitException | Instance autoRenew time unit is invalid. | 400 | Invalid auto-renewal unit |
BadRequest | instanceType invalidate. | 400 | Invalid Instances type |
Instance.InstanceCountCdsCountNotMatchException | Cds count must be multiple number of Instance count | 400 | The number of virtual machine created does not match the number of cds. |
Instance.NoStock | Sales of this resource are temporarily suspended in the specified region. | 403 | Resources sold-out |
BadRequest | Invalidate root disk size. | 400 | Invalid system disk size |
Instance.EphemeralDiskInvalidException | instance ephemeral disk config invalid. | 400 | Invalid instance temporary disk configuration |
BadRequest | Gpu card count not valid. | 400 | Invalid number of gpu cards |
Instance.NameInvalid | Instance name is invalid. | 400 | Invalid instance name |
Instance.PasswordInvalid | Password format is invalid. | 400 | Illegal password format |
Keypair.UnsupportOsType | Unsupported os type, only linux supported. | 403 | Unsupported operating system |
NoSuchObject | asp not exist. | 404 | The specified asp does not exist. |
BadRequest | bccCreateWithScript invalid. | 400 | The whitelist specified script address creation BCC parameter is invalid |
Volume.DiskSizeInvalid | Disk size in invalid. | 400 | The CDS disk size is invalid. |
Volume.StorageTypeInvalid | Storage type is invalid. | 400 | Disk storage type is incorrect |
Image.ImageTypeInvaild | image type invalid. | 400 | Invalid image type |
BadRequest | invalid bcc flavor config. | 400 | Invalid BCC package |
Instance.ReleaseTimeInvalid | Fail to update the instance scheduled release time settings. | 400 | Update timing release, invalid parameter |
Instance.UserDataPermissionDeny | No permission for user data. | 403 | No user data permission |
Image.ImageArchTypeExceptions | Image Arch Type illegal. | 400 | The mirror architecture does not match the instance model: arm models can only use arm architecture mirroring, and x86 models cannot use arm architecture mirroring |
Volume.DiskQuotaExceededLimit | Number of volumes exceeds limit. | 413 | The number of CDS disks exceeds the limit. |
Instance.TagQuotaLimitExceeded | Quota exceeds limit. | 413 | Quota exceeds limit. |
Cds.KmsNotExistException | Kms not exist. | 400 | Kms not exist. |
Cds.KmsInvalidException | Invalid Kms. | 400 | Invalid Kms. |
Zone denyAccess | zone limit exception. | 403 | Availability zone limit exception. |
BadRequest | subnetId and securityGroupId should be added | 400 | subnetId and securityGroupId should be added |
BadRequest | BCC with NAT subnet can not bind eip | 400 | BCC with NAT subnet can not bind eip |
BadRequest | The subnet is not belong to the logical zone. | 400 | The subnet is not belong to the logical zone. |
Vpc.IpInSubnetNotEnoughExceptions | The ip left in the subnet is not enouth for this create. | 400 | The ip left in the subnet is not enouth for this create. |
Volume.DiskSizeQuotaExceededLimit | Volume size exceeds total capacity quota. | 413 | The cds disk capacity exceeds the total capacity quota. |
Cds.KmsNotMatchException | Kms not match with snapshot encryptKey. | 400 | Kms not match with snapshot encryptKey. |
Instance.PostPayEipPurchaseDenied | Need to pass senior real-name authentication. please download baiducloud App to do face authentication. | 403 | Need to pass senior real-name authentication. please download baiducloud App to do face authentication. |
BadRequest | invalidate bandwidth parameter. | 400 | invalidate bandwidth parameter. |
Instance.EipOperationDenied | Account has no permission to bind EIP. | 403 | EIP binding to Purchase is not available |
PrepayInvalid | Prepay not support for this instanceType. | 400 | Prepay not support |
Dcc.ResourceNotExist | Dcc Resource not exist. | 400 | Dcc Resource not exist |
BadRequest | validateSubnetSecurityGroupInSameVpc error. | 400 | Failed to verify that the subnet and security group belong to the same vpc |
BadRequest | securityGroup and subnet must be in same vpc | 400 | securityGroup and subnet must be in same vpc |
Dcc.FlavorIllegal | unknown dcc flavor. | 400 | unknown dcc flavor. |
Instance.EphemeralDiskInvalidException | instance ephemeral disk config invalid. | 400 | instance ephemeral disk config invalid. |
BadRequest | invalid create request, instanceForCreate is not specified. | 400 | it is an invalid request for creating an instance, you must specify insanceForCreate |
Request Example for Creating BCC Instance
POST /v2/instance?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
Host: bcc.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
{
"instanceType": "N1",
"cpuCount": 2,
"memoryCapacityInGB": 2,
"rootDiskSizeInGb":45,
"rootDiskStorageType":"cloud_hp1",
"createCdsList": [
{
"storageType": "std1",
"cdsSizeInGB": 5
}
],
"name": "example",
"imageId": "m-mRjO3cjs",
localDiskSizeInGB,
"networkCapacityInMbps": 1,
"autoRenewTimeUnit": "month",
"autoRenewTime": 1,
"cdsAutoRenew": true,
"internetChargeType": "BANDWIDTH_POSTPAID_BY_HOUR",
"purchaseCount": 1,
"billing":{
"paymentTiming":"Prepaid",
"reservation": {
"reservationLength": 1
}
},
"relationTag": true,
“tags": [
{
"tagKey":"tag1",
"tagValue":"var1"
}
],
"keypairId":"k-R0J0BEA9"
"deployIdList":["dset-42N1llvY"]
}
Return Example
HTTP/1.1 200 OK
x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
Date: Wed, 03 Dec 2014 06:42:19 GMT
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"instanceIds": [
"i-T1I3OtUO"
]
}
Request Example (Creation of GPU Instance)
POST /v2/instance?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
Host: bcc.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
{
"instanceType": "G1",
"gpuCard": "P4",
"cardCount": 2,
"cpuCount": 24,
"memoryCapacityInGB": 80,
"createCdsList": [
{
"storageType": "std1",
"cdsSizeInGB": 5
}
],
"name": "example",
"imageId": "m-Rx1dCMFF",
"networkCapacityInMbps": 0,
"purchaseCount": 1,
"billing": {
“paymentTiming": "Prepaid",
"reservation": {
"reservationLength": 1
}
}
}
Return Example
HTTP/1.1 200 OK
x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
Date: Wed, 03 Dec 2014 06:42:19 GMT
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"instanceIds": [
"i-T1I3OtUO"
]
}
Request Example for Creating DCC Instance
POST /v2/instance?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
Host: bcc.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
{
"cpuCount": 1,
"memoryCapacityInGB": 2,
"ephemeralDisks": [
{
"storageType": "sata",
"sizeInGB": 1024
},
{
"storageType": "sata",
"sizeInGB": 1024
}
],
"name": "example",
"imageId": "m-mRjO3cjs",
"networkCapacityInMbps": 0,
"dedicatedHostId": "d-YufwpQAe",
"purchaseCount": 1
}
Return Example
HTTP/1.1 200 OK
x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
Date: Tue, 06 Sep 2016 10:08:44 GMT
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"instanceIds": [
"i-T1I3OtUO"
]
}