CreateInstance

Updated at:

Creates an instance.

Operation description

Warning This API operation incurs fees. Make sure that you fully understand the billing methods and pricing of Hologres before you call this operation.
  • 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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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:

  • Standard: General-purpose.

  • Follower: Read-only secondary instance.

  • Warehouse: Compute group.

  • Shared: Shared.

  • Severless: Serverless.

Valid values:

  • Warehouse :

    Warehouse

  • Follower :

    Follower

  • Standard :

    Standard

  • Serverless :

    Serverless

  • Shared :

    Shared

Standard

cpu

integer

No

The instance specifications. Valid values:

  • 32 cores, 128 GB (Number of compute nodes: 2)

  • 64 cores, 256 GB (Number of compute nodes: 4)

  • 96 cores, 384 GB (Number of compute nodes: 6)

  • 128 cores, 512 GB (Number of compute nodes: 8)

  • Other specifications

Note
  • Specify the number of cores.

  • To purchase an instance with more than 1,024 cores, submit a ticket.

  • You do not need to specify the specifications for a Shared instance.

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:

  • PrePaid: Subscription.

  • PostPaid: Pay-as-you-go.

Note

This parameter is ignored for Shared instances. Shared is a defined specifications type, and its billing method defaults to PostPaid.

Valid values:

  • PostPaid :

    PostPaid

  • PrePaid :

    PrePaid

PostPaid

autoPay

boolean

No

Specifies whether to enable automatic payment. Default value: true. Valid values:

  • true: Automatic payment is enabled.

  • false: Only an order is generated, and no payment is made.

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:

  • Month: Monthly billing.

  • Hour: Hourly billing.

Note
  • PrePaid supports only Month.

  • PostPaid supports only Hour.

  • For Shared instances, this parameter is automatically set to Hour and does not need to be specified.

Valid values:

  • Month :

    Month

  • Hour :

    Hour

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:

  • true: Enabled.

  • false: Disabled.

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:

  • The primary instance is in the Running state.

  • The primary and secondary instances are in the same region.

  • The primary and secondary instances are in the same zone.

  • The primary instance is associated with fewer than 10 secondary instances.

  • The primary and secondary instances belong to the same Alibaba Cloud account.

hgpostcn-cn-lbj3aworq112

initialDatabases

string

No

The initial databases.

chatbot

enableServerlessComputing

boolean

No

Specifies whether to enable Serverless Computing.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

true

storageType

string

No

The storage type.

Valid values:

  • local :

    Locally redundant.

  • redundant :

    Zone-redundant (multi-zone).

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: The instance was created.

  • false: The instance failed to be created.

true

HttpStatusCode

string

The HTTP status code.

200

ErrorMessage

string

The error message.

null

ErrorCode

string

The error code.

null

Note
  • 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.