Creates an instance.
Operation description
This API operation incurs fees. Before you call this operation, make sure that you fully understand the billing methods and pricing of Hologres.
For more information about the billing of Hologres, see Billing overview.
When you create a Hologres instance, you must specify the region and zone for the instance. A region can contain multiple zones. The following list describes the zones that are available in each region:
cn-hangzhou (Hangzhou): cn-hangzhou-h, cn-hangzhou-j, cn-hangzhou-k
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 (Tokyo): 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 (Virginia): us-east-1a
us-west-1 (Silicon Valley): 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.1Request parameters
Parameter | Type | Required | Description | Example |
| body | object | No | The request body. | |
regionId | string | Yes | The region ID. For more information, see Endpoints. | cn-hangzhou |
zoneId | string | Yes | The zone ID. | cn-hangzhou-h |
vpcId | string | Yes | The ID of the virtual private cloud (VPC). The VPC must be in the same region as the instance. | vpc-t4netc3y5xxxx |
vSwitchId | string | Yes | The ID of the vSwitch. The vSwitch must be in the same zone as the instance. | vsw-2vccsiymtxxxxxx |
resourceGroupId | string | No | The resource group. If you leave this parameter empty, the default resource group for your account is used. | "" |
instanceName | string | Yes | The instance name. The name must be 2 to 64 characters in length. A letter is counted as one character. | my_holo |
instanceType | string | Yes | The instance type. Valid values:
| Standard |
cpu | integer | No | The instance type. 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 (PostPaid) instances. | 500 |
coldStorageSize | integer | No | The cold storage capacity of the instance. Unit: GB. Note This parameter is ignored for pay-as-you-go (PostPaid) instances. | 500 |
gatewayCount | integer | No | The number of gateways. Valid values: [2, 50]. Note You must specify this parameter only for virtual warehouse instances. | 4 |
chargeType | string | Yes | Note This parameter is ignored for shared instances. Shared instances use defined specifications and the default billing method is pay-as-you-go.. Valid values:
| PostPaid |
autoPay | boolean | No | Specifies whether to enable automatic payment. Valid values:
Note If your account balance is insufficient, set the | true |
pricingCycle | string | No | Note
Valid values:
| Month |
duration | integer | No | The subscription duration, such as two months. Note Specify this parameter only for subscription instances. | 2 |
autoRenew | boolean | No | Specifies whether to enable auto-renewal. Valid values:
| false |
leaderInstanceId | string | No | The ID of the primary instance. This parameter is required for secondary instances. Note The primary and secondary instances must meet the following conditions:
| hgpostcn-cn-lbj3aworq112 |
initialDatabases | string | No | The initial database. | chatbot |
enableServerlessComputing | boolean | No | Specifies whether to enable Serverless Computing. Valid values:
| true |
storageType | string | No | The storage class. Valid values:
| redundant |
Response elements
Element | Type | Description | Example |
object | The response details. | ||
RequestId | string | The request ID. | 9CC37B9F-F4B4-5FF1-939B-AEE78DC70130 |
| Data | object | The returned results. | |
InstanceId | string | The instance ID. | hgpostcn-cn-xxxxxx |
OrderId | string | The order ID. | 217523224780172 |
Code | string | The error code. | InvalidVpcOrVSwitch.NotAvailable |
Message | string | The details of the error. | InvalidVpcOrVSwitch.NotAvailable |
Success | string | Indicates whether the instance was created.
| true |
HttpStatusCode | string | The HTTP status code. | 200 |
ErrorMessage | string | The error message. | null |
ErrorCode | string | The error code. | null |
If a parameter verification error occurs, a Data response is still returned. In this case, the value of the Success parameter is false, and the Code and Message parameters are included. Unless an exception is thrown, you can determine whether the call is successful based on the value of Data.Success.
When you use the latest software development kit (SDK) to call this API operation, a timeout error may be returned. This occurs because the default timeout period of the client in the SDK is different from that of the server. This error can be returned even if the operation was successfully called. To prevent this issue, you can set the ReadTimeout parameter to 20000 before you make the call.

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.