DigitalTwinClient.invokeComponentCommandWithResponse(String digitalTwinId, String componentName, String commandName, String payload, DigitalTwinInvokeCommandRequestOptions options) 方法

定义

Invoke a command on a digital twin component.

public ServiceResponseWithHeaders<DigitalTwinCommandResponse, DigitalTwinInvokeCommandHeaders> invokeComponentCommandWithResponse(String digitalTwinId, String componentName, String commandName, String payload, DigitalTwinInvokeCommandRequestOptions options)

参数

digitalTwinId
String

The Id of the digital twin.

componentName
String

The component name under which the command is defined.

commandName
String

The command to be invoked.

payload
String

The command payload.

options
DigitalTwinInvokeCommandRequestOptions

The optional settings for this request.

返回

A ServiceResponseWithHeaders with DigitalTwinInvokeRootLevelCommandHeaders and DigitalTwinCommandResponse which contains the application/json command invocation response.

例外

IOException

can be thrown if the provided payload cannot be deserialized into a valid Json object.

适用于