Creating a StarRocks Instance
Function
This API is used to create a StarRocks instance. Before calling this API:
- Learn how to authorize and authenticate it.
- Obtain the required region and endpoint.
URI
POST /v3/{project_id}/instances/{instance_id}/starrocks
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. |
instance_id |
Yes |
String |
GaussDB(for MySQL) instance ID, which is compliant with the UUID format. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. To obtain this value, call the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the token value. |
Content-Type |
Yes |
String |
Content type. Value: application/json |
X-Language |
No |
String |
Request language type. The default value is en-us. Values:
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Instance name. Instances of the same type can have the same name under the same tenant. The name must start with a letter and consist of 4 to 64 characters. Only letters (case-sensitive), digits, hyphens (-), and underscores (_) are allowed. |
engine |
Yes |
engine object |
Engine information. |
ha |
Yes |
ha object |
Deployment information. |
fe_flavor_id |
Yes |
String |
Specification ID of the frontend node. You can use the value of id in the response to querying HTAP specifications. |
be_flavor_id |
Yes |
String |
Specification ID of the backend node. You can use the value of id in the response to querying HTAP specifications. |
db_root_pwd |
Yes |
String |
Database password. The password must meet the following requirements:
|
fe_count |
Yes |
Integer |
Number of frontend nodes.
|
be_count |
Yes |
Integer |
Number of backend nodes.
|
az_mode |
Yes |
String |
AZ type. Currently, only single AZ is supported. Enumerated value: single |
fe_volume |
Yes |
fe_volume object |
Storage information of the frontend node. |
be_volume |
Yes |
be_volume object |
Storage information of the backend node. |
az_code |
Yes |
String |
AZ code. |
time_zone |
No |
String |
Time zone. The default time zone is UTC+08:00. |
tags_info |
Yes |
tags_info object |
Tag information. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Engine type. Only StarRocks is supported. |
version |
Yes |
String |
Major version number of the engine. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
mode |
Yes |
String |
Deployment mode. Enumerated values:
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
io_type |
Yes |
String |
Storage type. The value can be obtained from the response to querying HTAP engine resources. |
capacity_in_gb |
Yes |
Integer |
Storage space in GB. Increment: 10 GB
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
io_type |
Yes |
String |
Storage type. The value can be obtained from the response to querying HTAP engine resources. |
capacity_in_gb |
Yes |
Integer |
Storage space in GB. Increment: 10 GB
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
sys_tags |
Yes |
Array of sys_tags objects |
System tags. |
Response Parameters
Status code: 201
Parameter |
Type |
Description |
---|---|---|
instance |
instance object |
Instance information. |
job_id |
String |
Workflow ID. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
StarRocks instance ID, which is compliant with the UUID format. |
az_code |
String |
AZ code. |
az_mode |
String |
AZ type. Values:
|
name |
String |
Instance name. |
engine |
engine object |
Engine information. |
vpc_id |
String |
VPC ID. |
security_group_id |
String |
Security group ID. |
sub_net_id |
String |
Subnet ID. |
db_user |
String |
Database user. The default value is root. |
port |
Integer |
Database port number. The default value is 3306. |
ha_mode |
String |
Deployment mode. |
pay_info |
pay_info object |
Billing information. |
enable_ssl |
Boolean |
Whether to enable SSL. |
status |
String |
Instance status. |
region |
String |
Region where the instance is deployed. |
tags_info |
tags_info object |
Instance tags. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Engine type. |
version |
String |
Major version number of the engine. |
Parameter |
Type |
Description |
---|---|---|
pay_model |
String |
Billing mode.
StarRocks instances support only pay-per-use billing. The default value is 0. |
order_id |
String |
Yearly/monthly order ID. |
period |
String |
Yearly/monthly subscription period. |
period_type |
String |
Subscription period type. |
is_auto_renew |
String |
Whether to automatically renew the yearly/monthly subscription. |
Parameter |
Type |
Description |
---|---|---|
tags |
Array of tags objects |
User tags. This parameter is left blank by default. |
sys_tags |
Array of sys_tags objects |
System tags. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
Creating a DB instance
POST https://{endpoint}/v3/23a50154cf494ec9ad6883979a12db0a/instances/40dc4c5729f14aad893e2dcd5baf6a15in07/starrocks { "name" : "htap-ff64", "engine" : { "type" : "star-rocks", "version" : "3.1" }, "ha" : { "mode" : "Single" }, "fe_flavor_id" : "afef3bfd-ac7c-32e1-ba44-c388acbb196a", "be_flavor_id" : "de565db8-0a96-37ea-9388-61167624712c", "db_root_pwd" : "Test@123!", "fe_count" : 1, "be_count" : 1, "az_mode" : "single", "fe_volume" : { "io_type" : "SSD", "capacity_in_gb" : 50 }, "be_volume" : { "io_type" : "SSD", "capacity_in_gb" : 50 }, "az_code" : "az", "time_zone" : "UTC+08:00", "tags_info" : { "sys_tags" : [ { "key" : "_sys_enterprise_project_id", "value" : "0" } ] } }
Example Response
Status code: 201
Success.
{ "instance" : { "id" : "590031445ef845bb912d7fc8243db80cin17", "az_code" : "az1", "az_mode" : "single", "name" : "htap-ff64", "engine" : { "type" : "star-rocks", "version" : "3.1" }, "vpc_id" : "d5a1a29b-1476-490f-9682-c1a59593e7b0", "security_group_id" : "967a0ac2-3cae-4e57-a49a-d0f6ff07dcc1", "sub_net_id" : "2ce0bc80-bfc5-4d5e-9b78-a7f91572e03b", "db_user" : "root", "port" : 3306, "ha_mode" : "Single", "pay_info" : { "pay_model" : "0", "order_id" : null, "period" : null, "period_type" : null, "is_auto_renew" : null }, "enable_ssl" : false, "status" : "creating", "region" : "az", "tags_info" : { "tags" : [ ], "sys_tags" : [ { "key" : "_sys_enterprise_project_id", "value" : "0" } ] } }, "job_id" : "cf0b7506-1505-450f-9d95-ce9d93b6b5c3" }
Status Code
For details, see Status Codes.
Error Code
For details, 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