CreateInstance
Creates an instance.
Operation description
-
For more information about Hologres billing, see Billing overview.
-
When you create a Hologres instance, you must specify the region and zone where the instance resides. A region may contain multiple zones, as follows:
cn-hangzhou (Hangzhou): cn-hangzhou-h, cn-hangzhou-j, cn-hangzhou-k
cn-shanghai (Shanghai): cn-shanghai-e, cn-shanghai-f, cn-shanghai-l
cn-beijing (Beijing): cn-beijing-i, cn-beijing-g, cn-beijing-l
cn-zhangjiakou (Zhangjiakou): cn-zhangjiakou-b
cn-shenzhen (Shenzhen): cn-shenzhen-d, cn-shenzhen-f, cn-shenzhen-e
cn-wulanchabu (Ulanqab): cn-wulanchabu-a
cn-hongkong (Hong Kong): cn-hongkong-b, cn-hongkong-d
cn-shanghai-finance-1 (Shanghai Finance Cloud): cn-shanghai-finance-1z, cn-shanghai-finance-1f
cn-hangzhou-finance (Hangzhou Finance Cloud): cn-hangzhou-finance-k
cn-shenzhen-finance-1 (Shenzhen Finance Cloud): cn-shenzhen-finance-1d
ap-northeast-1 (Japan): ap-northeast-1a
ap-southeast-1 (Singapore): ap-southeast-1c, ap-southeast-1a
ap-southeast-3 (Kuala Lumpur): ap-southeast-3b
ap-southeast-5 (Jakarta): ap-southeast-5b
eu-central-1 (Frankfurt): eu-central-1a
us-east-1 (Silicon Valley): us-east-1a
us-west-1 (Virginia): us-west-1b
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hologram:CreateInstance |
create |
*All Resource
|
None | None |
Request syntax
POST /api/v1/instances/create HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| regionId |
string |
Yes |
The region ID. You can go to service registration endpoints to view the supported regions. |
cn-hangzhou |
| zoneId |
string |
Yes |
The zone ID. Refer to the usage notes. |
cn-hangzhou-h |
| vpcId |
string |
Yes |
The ID of the virtual private cloud (VPC). The region ID of the VPC must be the same as that of the instance. |
vpc-t4netc3y5xxxx |
| vSwitchId |
string |
Yes |
The ID of the vSwitch. The zone ID of the vSwitch must be the same as that of the instance. |
vsw-2vccsiymtxxxxxx |
| resourceGroupId |
string |
No |
The ID of the resource group. If this parameter is left empty, the default resource group of the account is used. |
"" |
| instanceName |
string |
Yes |
The name of the instance. The name must be 2 to 64 characters in length. Each Chinese character or letter counts as one character. |
my_holo |
| instanceType |
string |
Yes |
The instance type. Valid values:
Valid values:
|
Standard |
| cpu |
integer |
No |
The instance specifications. Valid values:
Note
|
64 |
| storageSize |
integer |
No |
The standard storage capacity of the instance. Unit: GB. Note
This parameter is ignored for pay-as-you-go instances. |
500 |
| coldStorageSize |
integer |
No |
The low-frequency storage capacity of the instance. Unit: GB. Note
This parameter is ignored for pay-as-you-go instances. |
500 |
| gatewayCount |
integer |
No |
The number of gateways. Valid values: 2 to 50. Note
This parameter is required only for Warehouse instances. |
4 |
| chargeType |
string |
Yes |
The billing method. Valid values:
Note
This parameter is ignored for Shared instances. Shared is a defined specifications type, and its billing method defaults to PostPaid. Valid values:
|
PostPaid |
| autoPay |
boolean |
No |
Specifies whether to enable automatic payment. Default value: true. Valid values:
Note
Default value: true. If your payment method has insufficient balance, you can set the AutoPay parameter to false. In this case, an unpaid order is generated, and you can log on to the Expenses and Costs console to complete the payment. |
true |
| pricingCycle |
string |
No |
The billing cycle. Valid values:
Note
Valid values:
|
Month |
| duration |
integer |
No |
The subscription duration. For example, set this parameter to 2 for a two-month subscription. Note
This parameter is not required if the billing method is PostPaid. |
2 |
| autoRenew |
boolean |
No |
Specifies whether to enable monthly auto-renewal. Default value: false. Valid values:
|
false |
| leaderInstanceId |
string |
No |
The ID of the primary instance. This parameter is required for Follower instances. Note
The primary and secondary instances must meet the following conditions:
|
hgpostcn-cn-lbj3aworq112 |
| initialDatabases |
string |
No |
The initial databases. |
chatbot |
| enableServerlessComputing |
boolean |
No |
Specifies whether to enable Serverless Computing. Valid values:
|
true |
| storageType |
string |
No |
The storage type. Valid values:
|
redundant |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
9CC37B9F-F4B4-5FF1-939B-AEE78DC70130 |
| Data |
object |
The returned result. |
|
| InstanceId |
string |
The instance ID. |
hgpostcn-cn-xxxxxx |
| OrderId |
string |
The order ID. |
217523224780172 |
| Code |
string |
The error code. |
InvalidVpcOrVSwitch.NotAvailable |
| Message |
string |
The detailed error message. |
InvalidVpcOrVSwitch.NotAvailable |
| Success |
string |
Indicates whether the instance was created. Valid values:
|
true |
| HttpStatusCode |
string |
The HTTP status code. |
200 |
| ErrorMessage |
string |
The error message. |
null |
| ErrorCode |
string |
The error code. |
null |
If a parameter validation error occurs, the normal Data structure is still returned, but Success is set to false, and Code and Message are included. Unless an exception is thrown, the success of the operation is determined by Data.Success.
When you use the latest SDK to call this operation, a request timeout error may be returned because the default timeout period of the client in the SDK is inconsistent with that of the server. However, the operation is actually called successfully. To avoid this issue, you can set the ReadTimeout parameter to 20000 before you call the operation.

Examples
Success response
JSON format
{
"RequestId": "9CC37B9F-F4B4-5FF1-939B-AEE78DC70130",
"Data": {
"InstanceId": "hgpostcn-cn-xxxxxx",
"OrderId": "217523224780172",
"Code": "InvalidVpcOrVSwitch.NotAvailable",
"Message": "InvalidVpcOrVSwitch.NotAvailable\n",
"Success": "true"
},
"HttpStatusCode": "200",
"ErrorMessage": "null",
"ErrorCode": "null"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.