Associates a parser with a data destination.
Usage notes
The CreateDestination operation is called to create a data destination and the CreateParser operation is called to create a parser.
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 | AttachDestination |
The operation that you want to perform. Set the value to AttachDestination. |
DestinationId | Long | Yes | 1002 |
The ID of the data destination. You can call the ListDestination operation to query data destinations and obtain the ID of the data destination. |
IsFailover | Boolean | Yes | false |
Specifies whether to configure the data destination to forward error operation data. The error operation data indicates the data that failed to be forwarded and re-forwarded to other Alibaba Cloud services
Default value: false. |
ParserId | Long | Yes | 1000 |
The ID of the parser. You can call the ListParser operation to query parsers and obtain the ID of the parser. |
IotInstanceId | String | No | iot-2w**** |
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. |
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. |
ErrorMessage | String | A system exception occurred. |
The error message returned if the call fails. |
RequestId | String | E4C0FF92-2A86-41DB-92D3-73B60310D25E |
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=AttachDestination
&DestinationId=1002
&IsFailover=false
&ParserId=1000
&<Common request parameters>
Sample success responses
XML
format
<AttachDestinationResponse>
<RequestId>E4C0FF92-2A86-41DB-92D3-73B60310D25E</RequestId>
<Success>true</Success>
</AttachDestinationResponse>
JSON
format
{
"RequestId": "E4C0FF92-2A86-41DB-92D3-73B60310D25E",
"Success": true
}