Compartir a través de


DigitalTwinClient.InvokeCommandAsync Método

Definición

Invoque un comando en un gemelo digital.

public virtual System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.Devices.DigitalTwinCommandResponse,Microsoft.Azure.Devices.DigitalTwinInvokeCommandHeaders>> InvokeCommandAsync (string digitalTwinId, string commandName, string payload = default, Microsoft.Azure.Devices.DigitalTwinInvokeCommandRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeCommandAsync : string * string * string * Microsoft.Azure.Devices.DigitalTwinInvokeCommandRequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.Devices.DigitalTwinCommandResponse, Microsoft.Azure.Devices.DigitalTwinInvokeCommandHeaders>>
override this.InvokeCommandAsync : string * string * string * Microsoft.Azure.Devices.DigitalTwinInvokeCommandRequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.Devices.DigitalTwinCommandResponse, Microsoft.Azure.Devices.DigitalTwinInvokeCommandHeaders>>
Public Overridable Function InvokeCommandAsync (digitalTwinId As String, commandName As String, Optional payload As String = Nothing, Optional requestOptions As DigitalTwinInvokeCommandRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of DigitalTwinCommandResponse, DigitalTwinInvokeCommandHeaders))

Parámetros

digitalTwinId
String

Identificador del gemelo digital.

commandName
String

Comando que se va a invocar.

payload
String

Carga del comando.

requestOptions
DigitalTwinInvokeCommandRequestOptions

La configuración opcional de esta solicitud.

cancellationToken
CancellationToken

CancellationToken.

Devoluciones

La respuesta de invocación del comando application/json y la respuesta http.

Se aplica a