DigitalTwinClient.InvokeComponentCommandAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Invoke a command on a component of a digital twin.
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))
Parameters
- 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.
- requestOptions
- DigitalTwinInvokeCommandRequestOptions
The optional settings for this request.
- cancellationToken
- CancellationToken
The cancellationToken.
Returns
The application/json command invocation response and the http response.
Applies to
Współpracuj z nami w serwisie GitHub
Źródło tej zawartości można znaleźć w witrynie GitHub, gdzie można również tworzyć i przeglądać problemy i żądania ściągnięcia. Więcej informacji znajdziesz w naszym przewodniku dla współtwórców.
Azure SDK for .NET