public class DigitalTwinAsyncClient extends Object
The Digital Twins Service Client contains asynchronous methods to retrieve and update digital twin information, and invoke commands on a digital twin device.
| Constructor and Description |
|---|
DigitalTwinAsyncClient(String connectionString)
Creates an implementation instance of
DigitalTwins that is used to invoke the Digital Twin features |
DigitalTwinAsyncClient(String hostName,
com.azure.core.credential.AzureSasCredential azureSasCredential)
Creates an implementation instance of
DigitalTwins that is used to invoke the Digital Twin features |
DigitalTwinAsyncClient(String hostName,
com.azure.core.credential.AzureSasCredential azureSasCredential,
DigitalTwinClientOptions options)
Creates an implementation instance of
DigitalTwins that is used to invoke the Digital Twin features |
DigitalTwinAsyncClient(String connectionString,
DigitalTwinClientOptions options)
Creates an implementation instance of
DigitalTwins that is used to invoke the Digital Twin features |
DigitalTwinAsyncClient(String hostName,
com.azure.core.credential.TokenCredential credential)
Creates an implementation instance of
DigitalTwins that is used to invoke the Digital Twin features |
DigitalTwinAsyncClient(String hostName,
com.azure.core.credential.TokenCredential credential,
DigitalTwinClientOptions options)
Creates an implementation instance of
DigitalTwins that is used to invoke the Digital Twin features |
| Modifier and Type | Method and Description |
|---|---|
static DigitalTwinAsyncClient |
createFromConnectionString(String connectionString)
Creates an implementation instance of
DigitalTwins that is used to invoke the Digital Twin features |
<T> rx.Observable<T> |
getDigitalTwin(String digitalTwinId,
Class<T> clazz)
Gets a digital twin.
|
<T> rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<T,DigitalTwinGetHeaders>> |
getDigitalTwinWithResponse(String digitalTwinId,
Class<T> clazz)
Gets a digital twin.
|
rx.Observable<DigitalTwinCommandResponse> |
invokeCommand(String digitalTwinId,
String commandName)
Invoke a command on a digital twin.
|
rx.Observable<DigitalTwinCommandResponse> |
invokeCommand(String digitalTwinId,
String commandName,
String payload)
Invoke a command on a digital twin.
|
rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<DigitalTwinCommandResponse,DigitalTwinInvokeCommandHeaders>> |
invokeCommandWithResponse(String digitalTwinId,
String commandName,
String payload,
DigitalTwinInvokeCommandRequestOptions options)
Invoke a command on a digital twin.
|
rx.Observable<DigitalTwinCommandResponse> |
invokeComponentCommand(String digitalTwinId,
String componentName,
String commandName)
Invoke a command on a digital twin component.
|
rx.Observable<DigitalTwinCommandResponse> |
invokeComponentCommand(String digitalTwinId,
String componentName,
String commandName,
String payload)
Invoke a command on a digital twin component.
|
rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<DigitalTwinCommandResponse,DigitalTwinInvokeCommandHeaders>> |
invokeComponentCommandWithResponse(String digitalTwinId,
String componentName,
String commandName,
String payload,
DigitalTwinInvokeCommandRequestOptions options)
Invoke a command on a digital twin component.
|
rx.Observable<Void> |
updateDigitalTwin(String digitalTwinId,
List<Object> digitalTwinUpdateOperations)
Updates a digital twin.
|
rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Void,DigitalTwinUpdateHeaders>> |
updateDigitalTwinWithResponse(String digitalTwinId,
List<Object> digitalTwinUpdateOperations)
Updates a digital twin.
|
rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Void,DigitalTwinUpdateHeaders>> |
updateDigitalTwinWithResponse(String digitalTwinId,
List<Object> digitalTwinUpdateOperations,
DigitalTwinUpdateRequestOptions options)
Updates a digital twin.
|
public DigitalTwinAsyncClient(String connectionString)
DigitalTwins that is used to invoke the Digital Twin featuresconnectionString - The IoTHub connection stringpublic DigitalTwinAsyncClient(String connectionString, DigitalTwinClientOptions options)
DigitalTwins that is used to invoke the Digital Twin featuresconnectionString - The IoTHub connection stringoptions - The optional settings for this client. May not be null.public DigitalTwinAsyncClient(String hostName, com.azure.core.credential.TokenCredential credential)
DigitalTwins that is used to invoke the Digital Twin featureshostName - The hostname of your IoT Hub instance (For instance, "your-iot-hub.azure-devices.net")credential - The custom TokenCredential that will provide authentication tokens to
this library when they are needed.public DigitalTwinAsyncClient(String hostName, com.azure.core.credential.TokenCredential credential, DigitalTwinClientOptions options)
DigitalTwins that is used to invoke the Digital Twin featureshostName - The hostname of your IoT Hub instance (For instance, "your-iot-hub.azure-devices.net")credential - The custom TokenCredential that will provide authentication tokens to
this library when they are needed.options - The optional settings for this client. May not be null.public DigitalTwinAsyncClient(String hostName, com.azure.core.credential.AzureSasCredential azureSasCredential)
DigitalTwins that is used to invoke the Digital Twin featureshostName - The hostname of your IoT Hub instance (For instance, "your-iot-hub.azure-devices.net")azureSasCredential - The SAS token provider that will be used for authentication.public DigitalTwinAsyncClient(String hostName, com.azure.core.credential.AzureSasCredential azureSasCredential, DigitalTwinClientOptions options)
DigitalTwins that is used to invoke the Digital Twin featureshostName - The hostname of your IoT Hub instance (For instance, "your-iot-hub.azure-devices.net")azureSasCredential - The SAS token provider that will be used for authentication.options - The optional settings for this client. May not be null.public static DigitalTwinAsyncClient createFromConnectionString(String connectionString)
DigitalTwins that is used to invoke the Digital Twin featuresconnectionString - The IoTHub connection stringpublic <T> rx.Observable<T> getDigitalTwin(String digitalTwinId, Class<T> clazz)
T - The generic type to deserialize the application/json into.digitalTwinId - The Id of the digital twin.clazz - The class to deserialize the application/json into.public <T> rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<T,DigitalTwinGetHeaders>> getDigitalTwinWithResponse(String digitalTwinId, Class<T> clazz)
T - The generic type to deserialize the application/json into.digitalTwinId - The Id of the digital twin.clazz - The class to deserialize the application/json into.ServiceResponseWithHeaders representing deserialized application/json of the digital twin with DigitalTwinGetHeaders.public rx.Observable<Void> updateDigitalTwin(String digitalTwinId, List<Object> digitalTwinUpdateOperations)
digitalTwinId - The Id of the digital twin.digitalTwinUpdateOperations - The JSON patch to apply to the specified digital twin. This argument can be created using UpdateOperationUtility.public rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Void,DigitalTwinUpdateHeaders>> updateDigitalTwinWithResponse(String digitalTwinId, List<Object> digitalTwinUpdateOperations)
digitalTwinId - The Id of the digital twin.digitalTwinUpdateOperations - The JSON patch to apply to the specified digital twin. This argument can be created using UpdateOperationUtility.ServiceResponseWithHeaders with DigitalTwinUpdateHeaders.public rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Void,DigitalTwinUpdateHeaders>> updateDigitalTwinWithResponse(String digitalTwinId, List<Object> digitalTwinUpdateOperations, DigitalTwinUpdateRequestOptions options)
digitalTwinId - The Id of the digital twin.digitalTwinUpdateOperations - The JSON patch to apply to the specified digital twin. This argument can be created using UpdateOperationUtility.options - The optional settings for this request.ServiceResponseWithHeaders with DigitalTwinUpdateHeaders.public rx.Observable<DigitalTwinCommandResponse> invokeCommand(String digitalTwinId, String commandName)
digitalTwinId - The Id of the digital twin.commandName - The command to be invoked.DigitalTwinCommandResponse which contains the application/json command invocation response.public rx.Observable<DigitalTwinCommandResponse> invokeCommand(String digitalTwinId, String commandName, String payload)
digitalTwinId - The Id of the digital twin.commandName - The command to be invoked.payload - The command payload.DigitalTwinCommandResponse which contains the application/json command invocation response.public rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<DigitalTwinCommandResponse,DigitalTwinInvokeCommandHeaders>> invokeCommandWithResponse(String digitalTwinId, String commandName, String payload, DigitalTwinInvokeCommandRequestOptions options)
digitalTwinId - The Id of the digital twin.commandName - The command to be invoked.payload - The command payload.options - The optional settings for this request.ServiceResponseWithHeaders with DigitalTwinInvokeRootLevelCommandHeaders and DigitalTwinCommandResponse which contains the application/json command invocation response.public rx.Observable<DigitalTwinCommandResponse> invokeComponentCommand(String digitalTwinId, String componentName, String commandName)
digitalTwinId - The Id of the digital twin.componentName - The component name under which the command is defined.commandName - The command to be invoked.DigitalTwinCommandResponse which contains the application/json command invocation response.public rx.Observable<DigitalTwinCommandResponse> invokeComponentCommand(String digitalTwinId, String componentName, String commandName, String payload)
digitalTwinId - The Id of the digital twin.componentName - The component name under which the command is defined.commandName - The command to be invoked.payload - The command payload.DigitalTwinCommandResponse which contains the application/json command invocation response.public rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<DigitalTwinCommandResponse,DigitalTwinInvokeCommandHeaders>> invokeComponentCommandWithResponse(String digitalTwinId, String componentName, String commandName, String payload, DigitalTwinInvokeCommandRequestOptions options)
digitalTwinId - The Id of the digital twin.componentName - The component name under which the command is defined.commandName - The command to be invoked.payload - The command payload.options - The optional settings for this request.ServiceResponseWithHeaders with DigitalTwinInvokeRootLevelCommandHeaders and DigitalTwinCommandResponse which contains the application/json command invocation response.Copyright © 2023. All rights reserved.