Updates the name and description of a parser.
Usage notes
After you call the CreateParser operation to create a parser, you can update the name and description of the parser based on the return value of the ParserId parameter.
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 | UpdateParser | The operation that you want to perform. Set the value to UpdateParser. |
ParserId | Long | Yes | 1001 | 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-8t*** | The ID of the instance. You can view the ID of the instance on the Overview page in the IoT Platform console. Important
For more information, see Overview. |
Description | String | No | Forward data. | The description of the parser. |
Name | String | No | DataParserTwo | The name of the parser. The name must be 1 to 30 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). |
In addition to the preceding operation-specific request parameters, you must configure 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 request 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=UpdateParser
&ParserId=1001
&Name=DataParserTwo
&<Common request parameters>
Sample success responses
XML
format
<UpdateParserResponse>
<RequestId>E4C0FF92-2A86-41DB-92D3-73B60310D25E</RequestId>
<Success>true</Success>
</UpdateParserResponse>
JSON
format
{
"RequestId": "E4C0FF92-2A86-41DB-92D3-73B60310D25E",
"Success": true
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | iot.system.SystemException | An internal error occurred. Try again later. | The error message returned because a system exception occurred. |
400 | iot.common.InvalidFormattedParameter | The parameter format is invalid. | The error message returned because the format of the parameter is invalid. |
400 | iot.rule.UpdateRuleFailed | An error occurred while upgrading the rule. | The error message returned because the system failed to update the rule. |
For a list of error codes, visit the API Error Center.