Creates a data source from which you want to forward data.
QPS limits
Each Alibaba Cloud account can run up to 10 queries per second (QPS).
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateParserDataSource |
The operation that you want to perform. Set the value to CreateParserDataSource. |
Name | String | Yes | DataSource |
The name of the data source. The name must be 1 to 30 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). |
IotInstanceId | String | No | iot-w2**** |
The ID of the instance. You can view the ID of the instance on the Overview page in the IoT Platform console. Notice
For more information, see Overview. |
Description | String | No | The device data. |
The description of the data source. |
In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information, see Common request parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | iot.system.SystemException |
The error code returned if the call fails. For more information, see Error codes. |
DataSource | Struct |
The returned information about the data source after the data source is created. |
|
DataSourceId | Long | 1001 |
The ID of the data source. |
Description | String | The device data. |
The description of the data source. |
Name | String | DataSource |
The name of the data source. |
UtcCreated | String | 2022-03-27T12:45:43.000Z |
The time when the data source was created. The time is displayed in UTC. Format: |
ErrorMessage | String | A system exception occurred. |
The error message returned if the call fails. |
RequestId | String | 291438BA-6E10-4C4C-B761-243B9A0D324F |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call was successful.
|
Examples
Sample requests
http(s)://iot.cn-shanghai.aliyuncs.com/?Action=CreateParserDataSource
&Name=DataSource
&<Common request parameters>
Sample success responses
XML
format
<CreateParserDataSourceResponse>
<RequestId>291438BA-6E10-4C4C-B761-243B9A0D324F</RequestId>
<Success>true</Success>
<DataSource>
<Description>The device data. </Description>
<UtcCreated>2022-03-27T12:45:43.000Z</UtcCreated>
<DataSourceId>1001</DataSourceId>
<Name>DataSource</Name>
</DataSource>
</CreateParserDataSourceResponse>
JSON
format
{
"RequestId": "291438BA-6E10-4C4C-B761-243B9A0D324F",
"Success": true,
"DataSource": {
"Description": "The device data.",
"UtcCreated": "2022-03-27T12:45:43.000Z",
"DataSourceId": 1001,
"Name": "DataSource"
}
}