Skip to Content
Kafka(UKafka)CreateUKafkaInstance

Create instance - CreateUKafkaInstance

Overview

Create an instance using the API.

Before creating an instance, prepare the necessary parameters as follows:

1. Obtain the Region and Zone. Access the link: /docs/api/summary/regionlist to obtain all supported regions and availability zones;

2. Obtain the FrameworkVersion. Access the link: https://docs.ucloud.cn/api/ukafka-api/list_ukafka_framework_version. The FrameworkVersions[N].Version field in the response indicates the supported Kafka versions;

3. ChargeType: Payment type. Available values: Dynamic (hourly), Month (monthly), Year (yearly);

4. Obtain the NodeType: Node model details. Access the link: https://docs.ucloud.cn/api/ukafka-api/get_ukafka_node_type. The NodeTypeSet[N].NodeTypeName field in the response indicates all supported node models;

5. Obtain the DiskSize: Disk size range. Access link: https://docs.ucloud.cn/api/ukafka-api/get_ukafka_node_type. The NodeTypeSet[N].MinDiskSize and NodeTypeSet[N].MaxDiskSize fields in the response of this interface are the range of disk size values;

6. InstanceName, a custom input instance name, which can only contain Chinese and English characters, numbers, and -_.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateUKafkaInstance.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ZonestringAvailability Zones. See List of Availability ZonesYes
ProjectIdstringProject ID. Leaving this field blank will default to the project ID; it is required for sub-accounts. Please refer to the GetProjectList APINo
FrameworkVersionstringThe supported Kafka versions can be obtained through the FrameworkVersions field returned by the ListUKafkaFrameworkVersion interface.Yes
VPCIdstringVPC IDYes
SubnetIdstringSubnet IDYes
ChargeTypestringPayment methodsYes
NodeTypestringThe supported machine models can be found by checking the InstanceTypeSet[].InstanceTypeName returned by the GetUKafkaNodeType interface.Yes
DiskSizeintData disk size. The supported range is obtained from the InstanceTypeSet[].MaxDiskSize and MinDiskSize returned by the GetUKafkaNodeType interface.Yes
InstanceNamestringInstance name, can be customized。It can only contain Chinese and English characters, numbers, and hyphens - _ .Yes
BusinessIdstringBusiness group, defaultNo
QuantitystringNumber of instances, default 1No
NodeCountintNumber of cluster nodes. Default: 3 nodes.No
LogRetentionHoursstringKafka log retention time, supported range [1, 240]. Default is 72 hours.No
DiskControllerTypestringDisk management mode, supported values: NONE, CLEAN. Default value: NONENo
DiskThresholdstringDisk cleanup threshold, supported range [70, 90]. Required if DiskControllerType is CLEAN. Default value: 90.No
IsSecurityEnabledstringWhether to enable the security group, supporting “true” or “false”, the default is false.No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
InstanceIdstringInstance resource IDYes

Example

Request Example

https://api.dezai.com/?Action=CreateUKafkaInstance &Region=cn-zj &Zone=cn-zj-01 &ProjectId=UTnNmyFz &FrameworkVersion=NCaSSrbA &VPCId=Xersagmc &SubnetId=EbTTLPWW &ChargeType=jHScnWTI &NodeType=cjEAuPWT &DiskSize=3 &InstanceName=VFRMQMkS &BusinessId=ySLTzIEl &Quantity=CIZwhKZG &NodeCount=3 &LogRetentionHours=ZkwzUota &DiskControllerType=pJPWwZjQ &DiskThreshold=FTegxrIv &IsSecurityEnabled=ZijHghwt

Response Example

{ "Action": "CreateUKafkaInstanceResponse", "InstanceId": "VtVVhchC", "Message": "jvKmwNEU", "RetCode": 0 }