Domain name for API request: mqtt.intl.tencentcloudapi.com.
This API is used to purchase a new MQTT instance.
A maximum of 20 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: CreateInstance. |
| Version | Yes | String | Common Params. The value used for this API: 2024-05-16. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| InstanceType | Yes | String | Instance type, which needs to correspond to SkuCode. for details, see the get MQTT product sales spec api. BASIC: basic edition. PRO edition. PLATINUM version. |
| Name | Yes | String | Specifies the cluster name, cannot be empty, 3-64 characters, only comprised of digits, letters, "-", and "_". |
| SkuCode | Yes | String | Product specification, which must correspond to InstanceType. see the get MQTT product sales spec api to obtain details. |
| Remark | No | String | Specifies the remark information with a maximum length of 128 characters. |
| TagList.N | No | Array of Tag | Tag list |
| VpcList.N | No | Array of VpcInfo | Specifies the VPC information associated with the instance. the available VPC and SUBNET under the current user must be provided. |
| EnablePublic | No | Boolean | Whether public network access is enabled. default false (disabled). |
| Bandwidth | No | Integer | Public network bandwidth (unit: Mbps). this field is mandatory and must be more than 0 when EnablePublic is True. |
| IpRules.N | No | Array of IpRule | Public network access allowlist. if not passed, it means deny all IP network access. |
| RenewFlag | No | Integer | Whether the instance is automatically renewed (0: no auto-renewal; 1: auto-renewal). this parameter is valid only when you purchase a prepaid cluster. default value: 1 (auto-renewal). |
| TimeSpan | No | Integer | Specifies the purchase duration (measurement unit: month). this parameter is valid only when you purchase a prepaid cluster. default: 1m (month). valid values: 1-12, 24, 36, 48, 60. |
| PayMode | No | Integer | Payment mode (0: postpaid; 1: prepaid). default: 0 (postpaid). |
| Parameter Name | Type | Description |
|---|---|---|
| InstanceId | String | Instance ID. |
| 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 the example.
POST / HTTP/1.1
Host: mqtt.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateMQTTInstance
<Common request parameters>
{
"InstanceType": "BASIC",
"Name": "instance-1",
"SkuCode": "basic_1k",
"Remark": "this is remark",
"VpcList": [
{
"VpcId": "vpc-9a5wnirv",
"SubnetId": "subnet-0tw6tlfi"
}
],
"IpRules": [
{
"Ip": "1.1.1.1",
"Allow": true,
"Remark": "remark"
}
]
}{
"Error": null,
"RequestId": null,
"Response": {
"InstanceId": "mqtt-7pnqmkrx",
"RequestId": "request-id"
}
}
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. |
| InvalidParameter.InstanceTypeNotMatch | InstanceTypeNotMatch |
| InvalidParameterValue | Parameter value error. |
| InvalidParameterValue.PublicNetworkInvalidParameterValue | PublicNetworkInvalidParameterValue |
| MissingParameter | Parameters are missing. |
Feedback