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 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",
 "specification": "100MB",
 "storage_space": 600,
 "partition_num": 300,
 "vpc_id": "60fc80a5-35db-45a9-acdb-0ef2361e1088",
 "security_group_id": "d8c81e0f-de6a-4110-8c96-81af3eacb3d1",
 "subnet_id": "45767e73-a093-4a1c-8cdd-b8d664b34dcc",
 "available_zones": [
  "72d50cedc49846b9b42c21495f38d81c"
 ],
 "product_id": "00300-30308-0--0",
 "kafka_manager_user": "test",
 "kafka_manager_password": "Z****x",
 "storage_spec_code": "dms.physical.storage.high"
}
  • name: name of the instance.
  • engine: message engine. The value is kafka.
  • engine_version: version of the message engine.
  • specification: bandwidth of the instance. For details about the value range, see section "Creating a Pay-per-Use Instance".
  • storage_space: message storage space in GB. For details about the value range, see section "Creating a Pay-per-Use Instance".
  • partition_num: maximum number of partitions in a Kafka instance. For details about the value range, see section "Creating a Pay-per-Use Instance".
  • vpc_id: ID of the Virtual Private Cloud (VPC) where the instance resides. You can query the VPC ID on the VPC console or by calling the API for querying VPCs.
  • security_group_id: ID of the security group. You can query the security group ID on the VPC console or by calling the API for querying security groups.
  • subnet_id: ID of the VPC subnet. You can query the security group ID on the VPC console or by calling the API for querying subnets.
  • available_zones: ID of the AZ where the instance resides. The value cannot be empty or null. For details, see section "Querying AZ Information".
  • product_id: ID of the product. For details, see section "Querying Product Specifications".
  • kafka_manager_user: username for logging in to Kafka Manager
  • kafka_manager_password: password for logging in to Kafka Manager
  • storage_spec_code: storage I/O specification. For details about the value range, see section "Creating a Pay-per-Use Instance".