Creating an Instance
Function
This API is used to create an instance.
Call Method
For details, see How to Call an API.
URI
POST /v1.0/{project_id}/instances
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
name |
String |
Instance name. An instance name starts with a letter, consists of 4 to 64 characters, and can contain only letters, digits, underscores (_), and hyphens (-). |
description |
String |
Description of an instance. The description supports up to 1024 characters.
NOTE:
The backslash (\) and quotation mark (") are special characters for JSON messages. When using these characters in a parameter value, add the escape character (\) before the characters, for example, \\ and \". |
engine |
String |
Message engine. Value: reliability |
engine_version |
String |
Version of the message engine. Value: 4.8.0 |
storage_space |
Integer |
Storage space. |
vpc_id |
String |
VPC ID. To obtain it, log in to the VPC console and view the VPC ID on the VPC details page. |
subnet_id |
String |
Subnet information. To obtain it, log in to VPC console and click the target subnet on the Subnets page. You can view the network ID on the displayed page. |
security_group_id |
String |
Security group which the instance belongs to. To obtain it, log in to the VPC console and view the security group ID on the security group details page. |
available_zones |
Array of strings |
ID of the AZ where instance brokers reside and which has available resources. Obtain the AZ ID by referring to Listing AZ Information. The parameter value cannot be empty or null. Check whether resources exist in the AZs. A RocketMQ instance can be deployed in 1 AZ or at least 3 AZs. When specifying AZs for brokers, use commas (,) to separate multiple AZs. |
product_id |
String |
RocketMQ instance flavors.
|
ssl_enable |
Boolean |
Indicates whether to enable SSL-encrypted access. |
storage_spec_code |
String |
Storage I/O specification. |
enterprise_project_id |
String |
Indicates the enterprise project ID. This parameter is mandatory for an enterprise project account. |
enable_acl |
Boolean |
Whether access control is enabled. |
ipv6_enable |
Boolean |
Whether IPv6 is supported. |
enable_publicip |
Boolean |
Indicates whether to enable public access. By default, public access is disabled. |
publicip_id |
String |
ID of the elastic IP address (EIP) bound to an instance. Use commas (,) to separate multiple EIP IDs. This parameter is mandatory if public access is enabled (that is, enable_publicip is set to true). |
broker_num |
Integer |
Number of brokers. |
bss_param |
BssParam object |
Parameter related to the yearly/monthly billing mode. If this parameter is left blank, the billing mode is pay-per-use by default. If this parameter is not left blank, the billing mode is yearly/monthly. |
Parameter |
Type |
Description |
---|---|---|
is_auto_renew |
Boolean |
Indicates whether auto-renewal is enabled. Value range: By default, auto renewal is disabled. |
charging_mode |
String |
Billing mode. This parameter specifies a payment mode. Value range: The default value is postPaid. |
is_auto_pay |
Boolean |
Specifies whether the order is automatically or manually paid. Value range: The default value is false. |
period_type |
String |
Subscription period Value range: This parameter is valid and mandatory when chargingMode is set to prePaid. |
period_num |
Integer |
Number of subscription periods. Value range: This parameter is valid and mandatory when chargingMode is set to prePaid. |
Example Requests
POST https://{endpoint}/v1.0/dms/{project_id}/instances
Example Response
Status code: 200
Successfully created.
{ "instance_id" : "8959ab1c-7n1a-yyb1-a05t-93dfc361b32d" }
Status Code
Status Code |
Description |
---|---|
200 |
Successful |
Error Codes
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