Creating an Instance
This API is an out-of-date version and may not be maintained in the future. Please use the API described in Creating a Pay-per-Use Instance.
Function
This API is used to create a pay-per-use instance.
Request
Request parameters
Table 2 describes the request parameters.
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
name |
String |
Yes |
Indicates the instance name. An instance name starts with a letter, consists of 4 to 64 characters, and supports only letters, digits, and hyphens (-). |
|
description |
String |
No |
Indicates the description of an instance. It is a character string containing not more than 1024 characters.
NOTE:
The backslash (\) and quotation mark (") are special characters for JSON packets. When using these characters in a parameter value, add the escape character (\) before these characters, for example, \\ and \". |
|
engine |
String |
Yes |
Indicates the message engine. Value: rabbitmq |
|
engine_version |
String |
No |
Indicates the version of the message engine. |
|
storage_space |
Integer |
Yes |
Indicates the message storage space. Unit: GB
|
|
access_user |
String |
Yes |
Indicates a username. A username consists of 4 to 64 characters and supports only letters, digits, and hyphens (-). |
|
password |
String |
Yes |
Indicates an instance password. An instance password must meet the following complexity requirements:
|
|
vpc_id |
String |
Yes |
Indicates the ID of a VPC. |
|
security_group_id |
String |
Yes |
Indicates the ID of a security group. |
|
subnet_id |
String |
Yes |
Indicates the ID of a subnet. |
|
available_zones |
Array |
Yes |
Indicates the ID of an AZ. The parameter value cannot be an empty array or an empty array. For details, see Querying AZ Information. |
|
product_id |
String |
Yes |
Indicates the product ID. For details, see Querying Product Specifications. |
|
maintain_begin |
String |
No |
Indicates the time at which a maintenance time window starts. Format: HH:mm.
|
|
maintain_end |
String |
No |
Indicates the time at which a maintenance time window ends. Format: HH:mm.
|
|
enable_publicip |
Boolean |
No |
Indicates whether to enable public access for a RabbitMQ instance.
|
|
publicip_id |
String |
No |
Indicates the ID of the elastic IP address (EIP) bound to a RabbitMQ instance. This parameter is mandatory if public access is enabled (that is, enable_publicip is set to true). |
|
ssl_enable |
Boolean |
No |
Indicates whether to enable SSL-encrypted access.
|
|
storage_spec_code |
String |
Yes |
Indicates storage I/O specification. For details on how to select a disk type, see Disk Types and Disk Performance. Options:
|
|
enterprise_project_id |
String |
No |
Indicates the enterprise project ID. |
Example request for creating a RabbitMQ instance
{
"name": "rabbitmq-demo",
"description": "",
"engine": "RabbitMQ",
"engine_version": "3.7.17",
"storage_space": 100,
"access_user": "******",
"password": "******",
"vpc_id": "1e93f86e-13af-46c8-97d6-d40fa62b76c2",
"security_group_id": "0aaa0033-bf7f-4c41-a6c2-18cd04cad2c8",
"subnet_id": "b5fa806c-35e7-4299-b659-b39398dd4718",
"available_zones": ["d573142f24894ef3bd3664de068b44b0"],
"product_id": "00300-30109-0--0",
"maintain_begin": "22:00",
"maintain_end": "02:00",
"ssl_enable": false,
"enable_publicip": false,
"publicip_id": "",
"enterprise_project_id": "0",
"storage_spec_code": "dms.physical.storage.ultra"
}
Response
Response parameters
Table 3 describes the response parameter.
|
Parameter |
Type |
Description |
|---|---|---|
|
instance_id |
String |
Indicates the instance ID. |
Example response
{
"instance_id": "8959ab1c-7n1a-yyb1-a05t-93dfc361b32d"
}
Status Code
Table 4 describes the status code of successful operations. For details about other status codes, see Status Code.
Last Article: APIs for Managing Instances
Next Article: Querying an Instance
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.