Updated on 2022-08-12 GMT+08:00

Getting Started

Scenarios

This section describes how to call an API to create a Kafka instance and customize the computing capabilities and storage space of the instance based on your service requirements.

For details on how to call APIs, see Calling APIs.

Prerequisites

Creating a Kafka Instance

The following is an example request for creating a Kafka instance:

{
	"name": "kafka-demo",
	"engine": "kafka",
	"engine_version": "2.3.0",
	"storage_space": 600,
	"kafka_manager_user": "******",
	"kafka_manager_password": "******",
	"vpc_id": "1a28dcc5-c90d-421c-82bb-783f30f5b40a",
	"security_group_id": "0cc8fdb7-872a-49da-a062-88ccc39463b5",
	"subnet_id": "ebba7994-260d-42ab-bce1-39a08b365dc8",
	"available_zones": ["ae04cf9d61544df3806a3feeb401b204"],
	"product_id": "00300-30308-0--0",
	"specification": "100MB",
	"storage_spec_code": "dms.physical.storage.ultra",
	"partition_num": "300"
}
  • name: name of the instance.
  • engine: message engine. The value is kafka.
  • engine_version: version of the message engine.
  • storage_space: message storage space in GB. For details about the value range, see Table 2.
  • kafka_manager_user: username for logging in to Kafka Manager
  • kafka_manager_password: password for logging in to Kafka Manager
  • vpc_id: ID of the Virtual Private Cloud (VPC) where the instance resides. For details, see Virtual Private Cloud API Reference.
  • security_group_id: ID of the security group. For details, see Virtual Private Cloud API Reference.
  • subnet_id: ID of the VPC subnet. For details, see Virtual Private Cloud API Reference.
  • available_zones: ID of the AZ where the instance resides. The value cannot be empty or null. For details, see Querying AZ Information.
  • product_id: ID of the product. For details, see Querying Product Specifications.
  • specification: bandwidth of the instance. For details about the value range, see Table 2.
  • storage_spec_code: storage I/O specification. For details about the value range, see Table 2.
  • partition_num: maximum partitions in the instance. For details about the value range, see Table 2.