Create an IoTDA Instance
Function
This API is used to create an IoTDA instance. For details about the supported instance specifications, see Specifications.
URI
POST /v5/iot/{project_id}/iotda-instances
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Parameter description : project ID. For details, see Obtaining a Project ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| instance_type | Yes | String | Parameter description : type of the instance to be created. For details about instance types, see Specifications. |
| flavor | Yes | Flavor object | Parameter description: specifications of an IoTDA instance. |
| name | Yes | String | Parameter description: instance name. Value: Enter 1 to 64 characters, including letters, digits, underscores (_), and hyphens (-). |
| charge_info | Yes | ChargeInfo object | Parameter description: billing information of an IoTDA instance. |
| description | No | String | Parameter description: description of an IoTDA instance. Value: The value can contain a maximum of 256 characters. Use only letters, digits, and special characters (_,.&-). |
| enterprise_project_id | No | String | Parameter description: enterprise project ID. If this parameter is set to a specific enterprise project ID or 0 (default enterprise project ID), the enterprise project feature is supported. You can obtain the value from Enterprise Project Management Service (EPS). Value: Enter up to 36 characters, including lowercase letters (a-f), digits, and hyphens (-). |
| tags | No | Array of Tag objects | Parameter description: tag information of an IoTDA instance. |
| additional_params | No | AdditionalParams object | Additional parameter information of the enterprise edition. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| type | Yes | String | Parameter description : specification name of the IoTDA instance to create. For details, see Specifications. |
| size | No | Integer | Parameter description : unit number of the standard IoTDA instances to create. For details, see Specifications. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| charge_mode | Yes | String | Parameter description: payment mode of the instance. Options: |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| key | Yes | String | Parameter description: tag key. Use letters, digits, spaces, and special characters (_.:=+-@). No space is allowed at the beginning or end. |
| value | No | String | Parameter description: tag value, which can be an empty string or null. Use letters, digits, spaces, and special characters (_.:=+-@). |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| vpc_id | Yes | String | Parameter description: VPC ID of the instance of the enterprise edition. |
| subnet_id | Yes | String | Parameter description: subnet ID of the instance of the enterprise edition. |
| security_group_id | Yes | String | Parameter description: security group ID of the instance of the enterprise edition. Ensure that port 22 (Linux SSH login), port 3389 (Windows remote login), and ICMP (Ping) have been enabled for the selected security group. |
| smn_topic_urn | No | String | Parameter description: SMN topic URN. When an instance of the enterprise edition is successfully created, the platform sends notifications through this topic. |
| ciphering_algorithm | No | String | Parameter description: encryption algorithm supported by the instance. Options: |
| port_info | Yes | Port object | Port information of the enterprise edition. This parameter is mandatory when you create an enterprise instance. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| app_https_port | No | Integer | Parameter description: HTTPS port for application access. The default value is 443. |
| app_amqps_port | No | Integer | Parameter description: AMQP port for application access. The default value is 5671. |
| app_mqtts_port | No | Integer | Parameter description: MQTTS port for application access. The default value is 8883. |
| device_coap_port | No | Integer | Parameter description: CoAP port for device access. The default value is 5683. |
| device_coaps_port | No | Integer | Parameter description: CoAPS port for device access. The default value is 5684. |
| device_mqtt_port | No | Integer | Parameter description: MQTT port for device access. The default value is 1883. |
| device_mqtts_port | No | Integer | Parameter description: MQTTS port for device access. The default value is 8883. |
| device_https_port | No | Integer | Parameter description: HTTPS port for device access. The default value is 443. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| instance_type | String | Parameter description: instance type. Options: |
| instance_id | String | Parameter description: instance ID. Value: Enter up to 36 characters, including lowercase letters (a-f), digits, and hyphens (-). |
| name | String | Parameter description: instance name. Value: Enter 1 to 64 characters, including letters, digits, underscores (_), and hyphens (-). |
| flavor | Flavor object | Parameter description: specifications of an IoTDA instance. |
| status | String | Parameter description: instance status. Options: |
| charge_info | ChargeInfo object | Parameter description: billing information of an IoTDA instance. |
| description | String | Parameter description: description of an IoTDA instance. Value: The value can contain a maximum of 256 characters. Use only letters, digits, spaces, and special characters (_,.&-). |
| enterprise_project_id | String | Parameter description: enterprise project ID. |
| tags | Array of Tag objects | Parameter description: tag information of an IoTDA instance. This field has values if the instance has tags. Or, it is left empty. |
| order_id | String | Parameter description: order ID. |
| additional_params | AdditionalParams object | Additional parameter information of the enterprise edition. |
| Parameter | Type | Description |
|---|---|---|
| type | String | Parameter description : specification name of the IoTDA instance to create. For details, see Specifications. |
| size | Integer | Parameter description : unit number of the standard IoTDA instances to create. For details, see Specifications. |
| Parameter | Type | Description |
|---|---|---|
| charge_mode | String | Parameter description: payment mode of the instance. Options: |
| Parameter | Type | Description |
|---|---|---|
| key | String | Parameter description: tag key. Use letters, digits, spaces, and special characters (_.:=+-@). No space is allowed at the beginning or end. |
| value | String | Parameter description: tag value, which can be an empty string or null. Use letters, digits, spaces, and special characters (_.:=+-@). |
| Parameter | Type | Description |
|---|---|---|
| vpc_id | String | Parameter description: VPC ID of the instance of the enterprise edition. |
| subnet_id | String | Parameter description: subnet ID of the instance of the enterprise edition. |
| security_group_id | String | Parameter description: security group ID of the instance of the enterprise edition. Ensure that port 22 (Linux SSH login), port 3389 (Windows remote login), and ICMP (Ping) have been enabled for the selected security group. |
| smn_topic_urn | String | Parameter description: SMN topic URN. When an instance of the enterprise edition is successfully created, the platform sends notifications through this topic. |
| ciphering_algorithm | String | Parameter description: encryption algorithm supported by the instance. Options: |
| port_info | Port object | Port information of the enterprise edition. This parameter is mandatory when you create an enterprise instance. |
| Parameter | Type | Description |
|---|---|---|
| app_https_port | Integer | Parameter description: HTTPS port for application access. The default value is 443. |
| app_amqps_port | Integer | Parameter description: AMQP port for application access. The default value is 5671. |
| app_mqtts_port | Integer | Parameter description: MQTTS port for application access. The default value is 8883. |
| device_coap_port | Integer | Parameter description: CoAP port for device access. The default value is 5683. |
| device_coaps_port | Integer | Parameter description: CoAPS port for device access. The default value is 5684. |
| device_mqtt_port | Integer | Parameter description: MQTT port for device access. The default value is 1883. |
| device_mqtts_port | Integer | Parameter description: MQTTS port for device access. The default value is 8883. |
| device_https_port | Integer | Parameter description: HTTPS port for device access. The default value is 443. |
Example Requests
-
Create an instance with the instance specification set to the enterprise edition and the billing mode set to pay-per-use.
POST https://{endpoint}/v5/iot/{project_id}/iotda-instances { "instance_type" : "enterprise", "flavor" : { "type" : "iotda.enterprise.1000tps.10wonlinedevice" }, "name" : "iotda_enterprise_instance", "charge_info" : { "charge_mode" : "prePaid", "period_type" : "year", "period_num" : 1, "is_auto_renew" : "true", "is_auto_pay" : "false" }, "description" : "IoTDA instance for production.", "enterprise_project_id" : "d22e47e9-cfad-4254-8a29-d2a56a07681d", "additional_params" : { "vpc_id" : "40926909-d411-45dd-a8b4-1ebc36512345", "subnet_id" : "088c7d8a-f49e-4f5f-bd33-ce9b6b712345", "security_group_id" : "55980b43-f006-4dbf-ab58-9b0d9e712345", "smn_topic_urn" : "urn:smn:cn-north-7:08aaee8ae000d5182f26c00199812345:iotda_instance_create", "ciphering_algorithm" : "COMMON_ALGORITHM", "port_info" : { "app_https_port" : "443", "app_amqps_port" : "5671", "device_coap_port" : "5683", "device_coaps_port" : "5684", "device_mqtt_port" : "1883", "device_mqtts_port" : "8883", "device_https_port" : "443" } } }
Example Responses
Status code: 200
OK
{
"instance_type" : "standard",
"instance_id" : "8561675c-d8a3-4956-9884-9cf9cbdd3134",
"flavor" : {
"type" : "iotda.standard.s2",
"size" : 2
},
"status" : "CREATING",
"charge_info" : {
"charge_mode" : "prePaid",
"period_type" : "year",
"period_num" : 1,
"is_auto_renew" : true,
"is_auto_pay" : false
},
"description" : "IoTDA instance for production.",
"enterprise_project_id" : "d22e47e9-cfad-4254-8a29-d2a56a07681d",
"tags" : [ {
"key" : "testTagName",
"value" : "testTagValue"
} ],
"order_id" : "CS22121614500ABCD",
"additional_params" : null
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot