Domain name for API request: ckafka.intl.tencentcloudapi.com.
This API is used to create prepaid annual and monthly instances. It only supports creating Pro Edition instances.
A maximum of 10 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateInstancePre. |
| Version | Yes | String | Common Params. The value used for this API: 2019-08-19. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| InstanceName | Yes | String | Specifies the Name of the ckafka cluster instance, which is any string with a length not more than 128 characters. . |
| ZoneId | Yes | Integer | Availability zone. when purchasing a multi-availability zone instance, this parameter specifies the primary az. view availability zones . |
| Period | Yes | String | Specifies the prepaid purchase duration, such as "1m" (exactly one month). value ranges from 1m to 36m. . |
| InstanceType | Yes | Integer | Specifies the standard edition instance specification for the international site. currently only the standard edition on the international site uses the current field to distinguish specifications, while the domestic site standard edition uses peak bandwidth. fill in 1 for all instances except the international site standard edition. for international site standard edition instances: [entry-level (general)] fill 1; [standard type (standard)] fill 2; [advanced] fill 3; [capacity type (capacity)] fill 4; [advanced type 1 (specialized-1)] fill 5; [advanced type 2 (specialized-2)] fill 6; [advanced type 3 (specialized-3)] fill 7; [advanced type 4 (specialized-4)] fill 8. . |
| VpcId | Yes | String | VPC Id. . |
| SubnetId | Yes | String | Subnet id. . |
| MsgRetentionTime | No | Integer | Optional. specifies the maximum retention time for instance logs, in minutes. default value: 1440 (1 day) when left blank. configurable range: 1 minute to 90 days. . |
| ClusterId | No | Integer | Specifies the cluster Id when creating an instance. this parameter indicates the cluster Id. . |
| RenewFlag | No | Integer | Auto-Renewal tag for prepaid services. 0 means default state (not set by the user, i.e. initial state), 1 means auto-renew, 2 means explicitly no auto-renew (set by the user). . |
| KafkaVersion | No | String | Specifies the CKafka version number. valid values: 2.4.1, 2.4.2, 2.8.1, 3.2.3. default value is 2.4.1. 2.4.1 and 2.4.2 belong to the same version, any one can be passed. . |
| SpecificationsType | No | String | Instance type. specifies "standard" for standard edition instance (default), "profession" for professional edition instance, "premium" for advanced edition instance. . |
| DiskSize | No | Integer | Disk size. if it does not match the console specification ratio, creation cannot succeed. default value is 500. step length is set to 100. can be accessed through the following link to view billing specifications: https://www.tencentcloud.com/document/product/597/122562.?from_cn_redirect=1 . |
| BandWidth | No | Integer | Instance bandwidth, default value is 40, unit MB/s. minimum value: 20MB/s. advanced edition maximum value: 360MB/s. professional edition maximum value: 100000MB/s. standard version fixed bandwidth specifications: 40MB/s, 100MB/s, 150MB/s. billing specifications can be viewed through the following link: https://www.tencentcloud.com/document/product/597/11745.?from_cn_redirect=1 . |
| Partition | No | Integer | Specifies the partition size. if it does not match the console specification ratio, the creation cannot succeed. default value is 800 with a step length of 100. view billing specifications through the following link: https://www.tencentcloud.com/document/product/597/122563.?from_cn_redirect=1 . |
| Tags.N | No | Array of Tag | Tag. . |
| DiskType | No | String | Specifies the instance disk type for pro edition/advanced edition. standard edition instances do not require this field. valid values: "CLOUD_SSD" (SSD CLOUD disk), "CLOUD_BASIC" (high-performance CLOUD block storage). default value: "CLOUD_BASIC". . |
| MultiZoneFlag | No | Boolean | Specifies whether to create a cross-availability zone instance. when the current parameter is true, zoneIds is required. . |
| ZoneIds.N | No | Array of Integer | Availability zone list. required item when purchasing multi-availability zone instance. . |
| PublicNetworkMonthly | No | Integer | Specifies the public bandwidth size in Mbps. the free 3 Mbps bandwidth is not included by default. for example, if the total required public network bandwidth is 3 Mbps, input 0 here; if the total required public network bandwidth is 6 Mbps, input 3 here. default value: 0. ensure the input parameter is a multiple of 3. . |
| InstanceNum | No | Integer | Specifies the number of instances to purchase. optional. default value is 1. when input this parameter, it will create multiple instances with case-sensitive suffixes added to instanceName. . |
| AutoVoucher | No | Integer | Specifies whether to automatically select voucher. valid values: 1-yes; 0-no. default is 0. . |
| ElasticBandwidthSwitch | No | Integer | Elastic bandwidth switch 0 disable 1 enable (0 default). . |
| CustomSSLCertId | No | String | Specifies the custom certificate Id. this parameter is valid only when SpecificationsType is profession. supports custom certificate capacity. can be obtained through the DescribeCertificateDetail api. . |
| Parameter Name | Type | Description |
|---|---|---|
| Result | CreateInstancePreResp | Returned result. . |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to create a Prepaid Professional Edition instance.
POST / HTTP/1.1
Host: ckafka.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateInstancePre
<Common request parameters>
{
"InstanceName": "ckafka trial"
"VpcId": "vpc-rmcgxxxx",
"SubnetId": "subnet-mnzcxxxx",
"ZoneId": 450001,
"Period": "1m",
"RenewFlag": 0,
"InstanceType": 1,
"KafkaVersion": "2.4.1",
"SpecificationsType": "profession",
"DiskSize": 200,
"BandWidth": 20,
"Partition": 400,
"DiskType": "CLOUD_BASIC",
"PublicNetworkMonthly": 0,
"CustomSSLCertId": "TPNd2oBB"
}{
"Response": {
"Result": {
"Data": {
"DealNameInstanceIdMapping": [
{
"DealName": "20251204581021815942281",
"InstanceIdList": [
"ckafka-ma4ab5n5"
]
}
],
"DealNames": [
"20251204581021815942281"
],
"FlowId": 0,
"InstanceId": "ckafka-ma4ab5n5"
},
"ReturnCode": "0",
"ReturnMessage": "ok"
},
"RequestId": "8c8050a7-ea8d-44f1-a00e-c09cd673afa3"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
| InternalError | Internal error. |
| InvalidParameter | Invalid parameter. |
| InvalidParameterValue.InstanceNotExist | The instance does not exist. |
| InvalidParameterValue.NotAllowedEmpty | The parameter is required. |
| InvalidParameterValue.RepetitionValue | The parameter already exists. |
| InvalidParameterValue.SubnetIdInvalid | Invalid subnet ID. |
| InvalidParameterValue.SubnetNotBelongToZone | The subnet is not in the zone. |
| InvalidParameterValue.VpcIdInvalid | Invalid VPC ID. |
| InvalidParameterValue.WrongAction | The value of the Action parameter is incorrect. |
| InvalidParameterValue.ZoneNotSupport | The zone is not supported. |
| ResourceInsufficient | Insufficient resources. |
| ResourceUnavailable | The resource is unavailable. |
| UnauthorizedOperation | Unauthorized operation. |
| UnsupportedOperation.OssReject | Oss rejected the operation. |
Feedback