Creates an intelligent alert event-triggered recording plan.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateEventRecordPlan |
The operation that you want to perform. Set the value to CreateEventRecordPlan. |
Name | String | Yes | plan1 |
The name of the recording plan. The name must be less than 48 characters in length, and can contain letters, digits, and the following special characters: - _ @ . : |
RecordDuration | Integer | Yes | 10 |
The recording duration, including the prerecording duration. Unit: seconds. Valid values: 10 to 60. |
TemplateId | String | Yes | fc82774fa749485bad7d719f9670**** |
The ID of the time template. You can call the QueryTimeTemplate operation to query the ID of the time template. |
EventTypes | String | No | 1 |
The type of the alert event.
You can view all alert event types on the Define Feature tab of the Product Details page in the IoT Platform console. For more information, see View alert event types. |
PreRecordDuration | Integer | No | 5 |
The prerecording duration. Unit: seconds. Default value: 0. The maximum prerecording duration is 10 seconds. |
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 | 200 |
The response code.
|
Data | String | fc82774fa749485bad7d719f9670**** |
The ID of the recording plan. |
ErrorMessage | String | product is not active. |
The error message returned if the call failed. |
RequestId | String | a195f615-8c64-4cc6-af57-2f42c6cca15c |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call was successful.
|
Examples
Sample requests
http(s)://linkvisual.cn-shanghai.aliyuncs.com/?Action=CreateEventRecordPlan
&Name=plan1
&RecordDuration=10
&TemplateId=fc82774fa749485bad7d719f9670****
&<Common request parameters>
Sample success responses
XML
format
<CreateEventRecordPlanResponse>
<RequestId>a195f615-8c64-4cc6-af57-2f42c6cca15c</RequestId>
<Data>fc82774fa749485bad7d719f9670****</Data>
<Code>200</Code>
<Success>true</Success>
</CreateEventRecordPlanResponse>
JSON
format
{
"RequestId": "a195f615-8c64-4cc6-af57-2f42c6cca15c",
"Data": "fc82774fa749485bad7d719f9670****",
"Code": "200",
"Success": "true"
}
Error codes
For a list of error codes, visit the API Error Center.