Package com.azure.iot.deviceupdate
Class DeviceUpdateAsyncClient
java.lang.Object
com.azure.iot.deviceupdate.DeviceUpdateAsyncClient
Initializes a new instance of the asynchronous DeviceUpdateClient type.
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.core.util.polling.PollerFlux<com.azure.core.util.BinaryData, com.azure.core.util.BinaryData> beginDeleteUpdate(String provider, String name, String version, com.azure.core.http.rest.RequestOptions requestOptions) Delete a specific update version.com.azure.core.util.polling.PollerFlux<com.azure.core.util.BinaryData, com.azure.core.util.BinaryData> beginImportUpdate(com.azure.core.util.BinaryData updateToImport, com.azure.core.http.rest.RequestOptions requestOptions) Import new update version.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getFileWithResponse(String provider, String name, String version, String fileId, com.azure.core.http.rest.RequestOptions requestOptions) Get a specific update file from the version.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getOperationStatusWithResponse(String operationId, com.azure.core.http.rest.RequestOptions requestOptions) Retrieve operation status.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getUpdateWithResponse(String provider, String name, String version, com.azure.core.http.rest.RequestOptions requestOptions) Get a specific update version.com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listFiles(String provider, String name, String version, com.azure.core.http.rest.RequestOptions requestOptions) Get a list of all update file identifiers for the specified version.com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> Get a list of all update names that match the specified provider.com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listOperationStatuses(com.azure.core.http.rest.RequestOptions requestOptions) Get a list of all import update operations.com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listProviders(com.azure.core.http.rest.RequestOptions requestOptions) Get a list of all update providers that have been imported to Device Update for IoT Hub.com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listUpdates(com.azure.core.http.rest.RequestOptions requestOptions) Get a list of all updates that have been imported to Device Update for IoT Hub.com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listVersions(String provider, String name, com.azure.core.http.rest.RequestOptions requestOptions) Get a list of all update versions that match the specified provider and name.
-
Method Details
-
listUpdates
public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listUpdates(com.azure.core.http.rest.RequestOptions requestOptions) Get a list of all updates that have been imported to Device Update for IoT Hub.Query Parameters
You can add these to a request withQuery Parameters Name Type Required Description search String No Request updates matching a free-text search expression. filter String No Optional to filter updates by isDeployable property. RequestOptions.addQueryParam(java.lang.String, java.lang.String)Response Body Schema
{ value (Required): [ (Required){ updateId (Required): { provider: String (Required) name: String (Required) version: String (Required) } description: String (Optional) friendlyName: String (Optional) isDeployable: Boolean (Optional) updateType: String (Optional) installedCriteria: String (Optional) compatibility (Required): [ (Required){ String: String (Required) } ] instructions (Optional): { steps (Required): [ (Required){ type: String(Inline/Reference) (Optional) description: String (Optional) handler: String (Optional) handlerProperties: Object (Optional) files (Optional): [ String (Optional) ] updateId (Optional): (recursive schema, see updateId above) } ] } referencedBy (Optional): [ (recursive schema, see above) ] scanResult: String (Optional) manifestVersion: String (Required) importedDateTime: OffsetDateTime (Required) createdDateTime: OffsetDateTime (Required) etag: String (Optional) } ] nextLink: String (Optional) }- Parameters:
requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a list of all updates that have been imported to Device Update for IoT Hub as paginated response with
PagedFlux. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
beginImportUpdate
public com.azure.core.util.polling.PollerFlux<com.azure.core.util.BinaryData,com.azure.core.util.BinaryData> beginImportUpdate(com.azure.core.util.BinaryData updateToImport, com.azure.core.http.rest.RequestOptions requestOptions) Import new update version. This is a long-running-operation; use Operation-Location response header value to check for operation status.Request Body Schema
[ (Required){ importManifest (Required): { url: String (Required) sizeInBytes: long (Required) hashes (Required): { String: String (Required) } } friendlyName: String (Optional) files (Optional): [ (Optional){ filename: String (Required) url: String (Required) } ] } ]Response Body Schema
{ updateId (Required): { provider: String (Required) name: String (Required) version: String (Required) } description: String (Optional) friendlyName: String (Optional) isDeployable: Boolean (Optional) updateType: String (Optional) installedCriteria: String (Optional) compatibility (Required): [ (Required){ String: String (Required) } ] instructions (Optional): { steps (Required): [ (Required){ type: String(Inline/Reference) (Optional) description: String (Optional) handler: String (Optional) handlerProperties: Object (Optional) files (Optional): [ String (Optional) ] updateId (Optional): (recursive schema, see updateId above) } ] } referencedBy (Optional): [ (recursive schema, see above) ] scanResult: String (Optional) manifestVersion: String (Required) importedDateTime: OffsetDateTime (Required) createdDateTime: OffsetDateTime (Required) etag: String (Optional) }- Parameters:
updateToImport- The update to be imported (see schema https://json.schemastore.org/azure-deviceupdate-import-manifest-5.0.json for details).requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the
PollerFluxfor polling of update metadata. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
getUpdateWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getUpdateWithResponse(String provider, String name, String version, com.azure.core.http.rest.RequestOptions requestOptions) Get a specific update version.Header Parameters
You can add these to a request withHeader Parameters Name Type Required Description If-None-Match String No Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. RequestOptions.addHeader(java.lang.String, java.lang.String)Response Body Schema
{ updateId (Required): { provider: String (Required) name: String (Required) version: String (Required) } description: String (Optional) friendlyName: String (Optional) isDeployable: Boolean (Optional) updateType: String (Optional) installedCriteria: String (Optional) compatibility (Required): [ (Required){ String: String (Required) } ] instructions (Optional): { steps (Required): [ (Required){ type: String(Inline/Reference) (Optional) description: String (Optional) handler: String (Optional) handlerProperties: Object (Optional) files (Optional): [ String (Optional) ] updateId (Optional): (recursive schema, see updateId above) } ] } referencedBy (Optional): [ (recursive schema, see above) ] scanResult: String (Optional) manifestVersion: String (Required) importedDateTime: OffsetDateTime (Required) createdDateTime: OffsetDateTime (Required) etag: String (Optional) }- Parameters:
provider- Update provider.name- Update name.version- Update version.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a specific update version along with
Responseon successful completion ofMono. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
beginDeleteUpdate
public com.azure.core.util.polling.PollerFlux<com.azure.core.util.BinaryData,com.azure.core.util.BinaryData> beginDeleteUpdate(String provider, String name, String version, com.azure.core.http.rest.RequestOptions requestOptions) Delete a specific update version. This is a long-running-operation; use Operation-Location response header value to check for operation status.- Parameters:
provider- Update provider.name- Update name.version- Update version.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the
PollerFluxfor polling of long-running operation. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
listProviders
public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listProviders(com.azure.core.http.rest.RequestOptions requestOptions) Get a list of all update providers that have been imported to Device Update for IoT Hub.Response Body Schema
{ value (Required): [ String (Required) ] nextLink: String (Optional) }- Parameters:
requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a list of all update providers that have been imported to Device Update for IoT Hub as paginated response
with
PagedFlux. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
listNames
public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listNames(String provider, com.azure.core.http.rest.RequestOptions requestOptions) Get a list of all update names that match the specified provider.Response Body Schema
{ value (Required): [ String (Required) ] nextLink: String (Optional) }- Parameters:
provider- Update provider.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a list of all update names that match the specified provider as paginated response with
PagedFlux. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
listVersions
public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listVersions(String provider, String name, com.azure.core.http.rest.RequestOptions requestOptions) Get a list of all update versions that match the specified provider and name.Query Parameters
You can add these to a request withQuery Parameters Name Type Required Description filter String No Optional to filter updates by isDeployable property. RequestOptions.addQueryParam(java.lang.String, java.lang.String)Response Body Schema
{ value (Required): [ String (Required) ] nextLink: String (Optional) }- Parameters:
provider- Update provider.name- Update name.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a list of all update versions that match the specified provider and name as paginated response with
PagedFlux. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
listFiles
public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listFiles(String provider, String name, String version, com.azure.core.http.rest.RequestOptions requestOptions) Get a list of all update file identifiers for the specified version.Response Body Schema
{ value (Required): [ String (Required) ] nextLink: String (Optional) }- Parameters:
provider- Update provider.name- Update name.version- Update version.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a list of all update file identifiers for the specified version as paginated response with
PagedFlux. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
getFileWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getFileWithResponse(String provider, String name, String version, String fileId, com.azure.core.http.rest.RequestOptions requestOptions) Get a specific update file from the version.Header Parameters
You can add these to a request withHeader Parameters Name Type Required Description If-None-Match String No Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. RequestOptions.addHeader(java.lang.String, java.lang.String)Response Body Schema
{ fileName: String (Required) sizeInBytes: long (Required) hashes (Required): { String: String (Required) } mimeType: String (Optional) scanResult: String (Optional) scanDetails: String (Optional) properties (Optional): { String: String (Optional) } fileId: String (Required) relatedFiles (Optional): [ (Optional){ fileName: String (Required) sizeInBytes: long (Required) hashes (Required): { String: String (Required) } mimeType: String (Optional) scanResult: String (Optional) scanDetails: String (Optional) properties (Optional): { String: String (Optional) } } ] downloadHandler (Optional): { id: String (Required) } etag: String (Optional) }- Parameters:
provider- Update provider.name- Update name.version- Update version.fileId- File identifier.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a specific update file from the version along with
Responseon successful completion ofMono. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
listOperationStatuses
public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listOperationStatuses(com.azure.core.http.rest.RequestOptions requestOptions) Get a list of all import update operations. Completed operations are kept for 7 days before auto-deleted. Delete operations are not returned by this API version.Query Parameters
You can add these to a request withQuery Parameters Name Type Required Description filter String No Optional to filter operations by status property. Only one specific filter is supported: "status eq 'NotStarted' or status eq 'Running'" top Integer No Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n. RequestOptions.addQueryParam(java.lang.String, java.lang.String)Response Body Schema
{ value (Required): [ (Required){ operationId: String (Required) status: String(NotStarted/Running/Succeeded/Failed) (Required) update (Optional): { updateId (Required): { provider: String (Required) name: String (Required) version: String (Required) } description: String (Optional) friendlyName: String (Optional) } resourceLocation: String (Optional) error (Optional): { code: String (Required) message: String (Required) target: String (Optional) details (Optional): [ (recursive schema, see above) ] innererror (Optional): { code: String (Required) message: String (Optional) errorDetail: String (Optional) innerError (Optional): (recursive schema, see innerError above) } occurredDateTime: OffsetDateTime (Optional) } traceId: String (Optional) lastActionDateTime: OffsetDateTime (Required) createdDateTime: OffsetDateTime (Required) etag: String (Optional) } ] nextLink: String (Optional) }- Parameters:
requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a list of all import update operations as paginated response with
PagedFlux. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
getOperationStatusWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getOperationStatusWithResponse(String operationId, com.azure.core.http.rest.RequestOptions requestOptions) Retrieve operation status.Header Parameters
You can add these to a request withHeader Parameters Name Type Required Description If-None-Match String No Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. RequestOptions.addHeader(java.lang.String, java.lang.String)Response Body Schema
{ operationId: String (Required) status: String(NotStarted/Running/Succeeded/Failed) (Required) update (Optional): { updateId (Required): { provider: String (Required) name: String (Required) version: String (Required) } description: String (Optional) friendlyName: String (Optional) } resourceLocation: String (Optional) error (Optional): { code: String (Required) message: String (Required) target: String (Optional) details (Optional): [ (recursive schema, see above) ] innererror (Optional): { code: String (Required) message: String (Optional) errorDetail: String (Optional) innerError (Optional): (recursive schema, see innerError above) } occurredDateTime: OffsetDateTime (Optional) } traceId: String (Optional) lastActionDateTime: OffsetDateTime (Required) createdDateTime: OffsetDateTime (Required) etag: String (Optional) }- Parameters:
operationId- Operation identifier.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- operation metadata along with
Responseon successful completion ofMono. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-