Updates the name, operation type, and description of a data destination.

Usage notes

After you call the CreateDestination operation to create a data destination, you can update its information based on the value of the DestinationId parameter returned by the CreateDestination operation.

QPS limits

Each Alibaba Cloud account can run up to 10 queries per second (QPS).

Note The RAM users of an Alibaba Cloud account share the quota of the Alibaba Cloud account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateDestination

The operation that you want to perform. Set the value to UpdateDestination.

Configuration String Yes {"topic":"/a1POX0c****/device1/user/get","topicType":1}

The configurations of the data destination. Set the value to a JSON string. The configurations vary based on the rule action type that you specified. For more information, see the description of the Configuration parameter in the CreateDestination topic.

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.

Name String Yes DataPurpose

The name of the data destination.

Type String Yes REPUBLISH

The operation that you want to perform on the data of the data destination. Valid values:

  • REPUBLISH: forwards topic data that is processed by a parser script to an IoT Platform communication topic.
  • AMQP: forwards topic data that is processed by a parser script to an Advanced Message Queuing Protocol (AMQP) consumer group.
  • DATAHUB: forwards topic data that is processed by a parser script to Alibaba Cloud DataHub for stream computing.
  • ONS: forwards topic data that is processed by a parser script to Message Queue for Apache RocketMQ for message distribution.
  • MNS: forwards topic data that is processed by a parser script to Message Service (MNS) for message transmission.
  • FC: forwards topic data that is processed by a parser script to Function Compute for event computing.
  • OTS: forwards topic data that is processed by a parser script to Tablestore (OTS) for NoSQL data storage.
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
  • If your instance has an ID, you must specify the ID for this parameter. Otherwise, the call fails.
  • If no Overview page or ID is generated for your instance, you do not need to configure this parameter.

For more information, see Overview.

Description String No The data that is forwarded to another topic.

The description of the data destination.

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 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.

  • true: The call was successful.
  • false: The call failed.

Examples

Sample requests

http(s)://iot.cn-shanghai.aliyuncs.com/?Action=UpdateDestination
&Configuration={"topic":"/a1POX0c****/device1/user/get","topicType":1}
&DestinationId=1002
&Name=DataPurpose
&Type=REPUBLISH
&<Common request parameters>

Sample success responses

XML format

<UpdateDestinationResponse>
  <RequestId>E4C0FF92-2A86-41DB-92D3-73B60310D25E</RequestId>
  <Success>true</Success>
</UpdateDestinationResponse>

JSON format

{
    "RequestId": "E4C0FF92-2A86-41DB-92D3-73B60310D25E",
    "Success": true
}