Compartir a través de


DigitalTwinClient.InvokeComponentCommandAsync Método

Definición

Invoque un comando en un componente de un gemelo digital.

public virtual System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.Devices.DigitalTwinCommandResponse,Microsoft.Azure.Devices.DigitalTwinInvokeCommandHeaders>> InvokeComponentCommandAsync (string digitalTwinId, string componentName, string commandName, string payload = default, Microsoft.Azure.Devices.DigitalTwinInvokeCommandRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeComponentCommandAsync : string * 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.InvokeComponentCommandAsync : string * 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 InvokeComponentCommandAsync (digitalTwinId As String, componentName 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.

componentName
String

Nombre del componente con el que se define el comando.

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

Respuesta de invocación de comandos application/json y respuesta http.

Se aplica a