Creating an Instance
This API is out-of-date and may not be maintained in the future. Please use the API described in Creating an Instance.
Function
This API is used to create a Kafka instance.
Request
Request parameters
Table 2 describes the 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 can contain only letters, digits, underscores (_), 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. Set the value to kafka. |
engine_version |
String |
Yes |
Indicates the version of the message engine. Value: 1.1.0, 2.3.0, or 2.7. |
specification |
String |
Yes |
Indicates the baseline bandwidth of a Kafka instance, that is, the maximum amount of data transferred per unit time. Unit: MB Options:
|
storage_space |
Integer |
Yes |
Indicates the message storage space. Unit: GB. Value range:
|
partition_num |
Integer |
Yes |
Indicates the maximum number of partitions in a Kafka instance. Options:
|
access_user |
String |
No |
This parameter is mandatory when ssl_enable is set to true. This parameter is invalid when ssl_enable is set to false. Indicates a username. A username consists of 4 to 64 characters and can contain letters, digits, and hyphens (-). |
password |
String |
No |
This parameter is mandatory when ssl_enable is set to true. This parameter is invalid when ssl_enable is set to false. Indicates an instance password. The password must meet the following complexity requirements:
|
vpc_id |
String |
Yes |
Indicates the VPC ID. Obtain the value by using either of the following methods:
|
security_group_id |
String |
Yes |
Indicates the security group which the instance belongs to. Obtain the value by using either of the following methods:
|
subnet_id |
String |
Yes |
Indicates the subnet ID. Obtain the value by using either of the following methods:
|
available_zones |
Array |
Yes |
Indicates the ID of the AZ where brokers reside and which has available resources. The parameter value cannot be an empty array or an empty array. For details on how to obtain the value, see Querying AZ Information. Check whether the AZ has available resources. When creating a Kafka instance, you can select either 1 AZ or at least 3 AZ. When specifying AZs for brokers, use commas (,) to separate multiple AZs. Example parameter settings:
|
product_id |
String |
Yes |
Indicates the product ID. For details on how to obtain the ID, see Querying Product Specifications. |
kafka_manager_user |
String |
Yes |
Indicates the username for logging in to Kafka Manager. The username consists of 4 to 64 characters and can contain letters, digits, hyphens (-), and underscores (_). |
kafka_manager_password |
String |
Yes |
Indicates the password for logging in to Kafka Manager. The password must meet the following complexity requirements:
|
maintain_begin |
String |
No |
Indicates the time at which a maintenance time window starts. Format: HH:mm:ss
|
maintain_end |
String |
No |
Indicates the time at which a maintenance time window ends. Format: HH:mm:ss
|
enable_publicip |
Boolean |
No |
Indicates whether to enable public access for an instance.
|
public_bandwidth |
String |
No |
Indicates the public network bandwidth. Unit: Mbit/s Value range:
|
publicip_id |
String |
No |
Indicates the 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). |
ssl_enable |
Boolean |
No |
Indicates whether to enable SSL-encrypted access.
|
retention_policy |
String |
No |
Indicates the action to be taken when the memory usage reaches the disk capacity threshold. Options:
|
enable_auto_topic |
Boolean |
No |
Indicates whether to enable automatic topic creation.
If automatic topic creation is enabled, a topic will be automatically created with 3 partitions and 3 replicas when a message is produced to or consumed from a topic that does not exist. |
storage_spec_code |
String |
Yes |
Indicates storage I/O specification. Options:
|
enterprise_project_id |
String |
No |
Indicates the enterprise project ID. |
tags |
Array<Object> |
No |
Indicates the list of tags. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
key |
String |
No |
Indicates the tag key. A tag key can contain a maximum of 36 Unicode characters. The key cannot be left blank or be an empty string. It cannot contain nonprintable ASCII (0–31) characters and the following special characters: =*<>\,|/ |
value |
String |
No |
Indicates the value. A tag value can contain a maximum of 43 Unicode characters. The value cannot be left blank or be an empty string. It cannot contain nonprintable ASCII (0–31) characters and the following special characters: =*<>\,|/ |
{ "name": "kafka-35777931", "description": "", "engine": "kafka", "engine_version": "2.3.0", "storage_space": 900, "vpc_id": "1511c95c-540c-42b7-ae78-72fdb3502dc4", "security_group_id": "0b605722-22ce-4727-bde8-e5366aff941d", "subnet_id": "f8f80ddd-09f7-4f79-a702-3d5f74f215a3", "available_zones": ["xxx"], "product_id": "00300-30308-0--0", "ssl_enable": true, "enable_publicip": true, "publicip_id": "87864b85-7097-4c06-9d62-718d7359a503,72c12ba7-fade-4b06-a680-01d335cf786d,11b535df-ed6d-4521-8d00-12bb60beb617", "maintain_begin": "22:00:00", "maintain_end": "02:00:00", "access_user": "root", "password": "******", "specification": "100MB", "partition_num": "300", "retention_policy": "time_base", "public_bandwidth": 6, "storage_spec_code": "dms.physical.storage.high" }
Response
Response parameters
Table 4 describes the parameters.
Parameter |
Type |
Description |
---|---|---|
instance_id |
String |
Indicates the instance ID. |
Example response
{ "instance_id": "8959ab1c-7n1a-yyb1-a05t-93dfc361b32d" }
Status Code
Table 5 describes the status code of successful operations. For details about other status codes, see Status Code.
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