Package com.azure.iot.deviceupdate
Class DeviceUpdateAsyncClient
- java.lang.Object
-
- com.azure.iot.deviceupdate.DeviceUpdateAsyncClient
-
public final class DeviceUpdateAsyncClient extends Object
Initializes a new instance of the asynchronous DeviceUpdateClient type.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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<Void>>
deleteUpdateWithResponse(String provider, String name, String version, com.azure.core.http.rest.RequestOptions requestOptions)
Delete a specific 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>>
getOperationWithResponse(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.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>>
importUpdateWithResponse(com.azure.core.util.BinaryData updateToImport, com.azure.core.http.rest.RequestOptions requestOptions)
Import new 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>
listNames(String provider, com.azure.core.http.rest.RequestOptions requestOptions)
Get a list of all update names that match the specified provider.com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData>
listOperations(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 Detail
-
importUpdateWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> importUpdateWithResponse(com.azure.core.util.BinaryData updateToImport, com.azure.core.http.rest.RequestOptions requestOptions)
Import new update version.Query Parameters
Query Parameters Name Type Required Description action String Yes Import update action. apiVersion String Yes Api Version Request Body Schema
[ { importManifest: { url: String sizeInBytes: long hashes: { String: String } } friendlyName: String files: [ { filename: String url: String } ] } ]
Response Body Schema
{ updateId: { provider: String name: String version: String } description: String friendlyName: String isDeployable: Boolean updateType: String installedCriteria: String compatibility: [ { String: String } ] instructions: { steps: [ { type: String(Inline/Reference) description: String handler: String handlerProperties: Object files: [ String ] updateId: (recursive schema, see updateId above) } ] } referencedBy: [ (recursive schema, see above) ] scanResult: String manifestVersion: String importedDateTime: String createdDateTime: String etag: String }
- Parameters:
updateToImport
- The update to be imported.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- update metadata along with
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
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.Query Parameters
Query Parameters Name Type Required Description action String Yes Import update action. apiVersion String Yes Api Version Request Body Schema
[ { importManifest: { url: String sizeInBytes: long hashes: { String: String } } friendlyName: String files: [ { filename: String url: String } ] } ]
Response Body Schema
{ updateId: { provider: String name: String version: String } description: String friendlyName: String isDeployable: Boolean updateType: String installedCriteria: String compatibility: [ { String: String } ] instructions: { steps: [ { type: String(Inline/Reference) description: String handler: String handlerProperties: Object files: [ String ] updateId: (recursive schema, see updateId above) } ] } referencedBy: [ (recursive schema, see above) ] scanResult: String manifestVersion: String importedDateTime: String createdDateTime: String etag: String }
- Parameters:
updateToImport
- The update to be imported.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- update metadata along with
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
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
Query Parameters Name Type Required Description apiVersion String Yes Api Version search String No Request updates matching a free-text search expression. filter String No Filter updates by its properties. Response Body Schema
{ value: [ { updateId: { provider: String name: String version: String } description: String friendlyName: String isDeployable: Boolean updateType: String installedCriteria: String compatibility: [ { String: String } ] instructions: { steps: [ { type: String(Inline/Reference) description: String handler: String handlerProperties: Object files: [ String ] updateId: (recursive schema, see updateId above) } ] } referencedBy: [ (recursive schema, see above) ] scanResult: String manifestVersion: String importedDateTime: String createdDateTime: String etag: String } ] nextLink: String }
- 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.
- Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
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.Query Parameters
Query Parameters Name Type Required Description apiVersion String Yes Api Version Header Parameters
Header Parameters Name Type Required Description ifNoneMatch 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. Response Body Schema
{ updateId: { provider: String name: String version: String } description: String friendlyName: String isDeployable: Boolean updateType: String installedCriteria: String compatibility: [ { String: String } ] instructions: { steps: [ { type: String(Inline/Reference) description: String handler: String handlerProperties: Object files: [ String ] updateId: (recursive schema, see updateId above) } ] } referencedBy: [ (recursive schema, see above) ] scanResult: String manifestVersion: String importedDateTime: String createdDateTime: String etag: String }
- 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
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
deleteUpdateWithResponse
public Mono<com.azure.core.http.rest.Response<Void>> deleteUpdateWithResponse(String provider, String name, String version, com.azure.core.http.rest.RequestOptions requestOptions)
Delete a specific update version.Query Parameters
Query Parameters Name Type Required Description apiVersion String Yes Api Version - 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
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
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.Query Parameters
Query Parameters Name Type Required Description apiVersion String Yes Api Version - 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 response body along with
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
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.Query Parameters
Query Parameters Name Type Required Description apiVersion String Yes Api Version Response Body Schema
{ value: [ String ] nextLink: String }
- 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.
- Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
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.Query Parameters
Query Parameters Name Type Required Description apiVersion String Yes Api Version Response Body Schema
{ value: [ String ] nextLink: String }
- 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.
- Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
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
Query Parameters Name Type Required Description apiVersion String Yes Api Version filter String No Filter updates by its properties. Response Body Schema
{ value: [ String ] nextLink: String }
- 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.
- Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
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.Query Parameters
Query Parameters Name Type Required Description apiVersion String Yes Api Version Response Body Schema
{ value: [ String ] nextLink: String }
- 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.
- Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
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.Query Parameters
Query Parameters Name Type Required Description apiVersion String Yes Api Version Header Parameters
Header Parameters Name Type Required Description ifNoneMatch 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. Response Body Schema
{ fileId: String fileName: String sizeInBytes: long hashes: { String: String } mimeType: String scanResult: String scanDetails: String etag: String }
- 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
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
listOperations
public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listOperations(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
Query Parameters Name Type Required Description filter String No Restricts the set of operations returned. Only one specific filter is supported: "status eq 'NotStarted' or status eq 'Running'" top String 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. apiVersion String Yes Api Version Response Body Schema
{ value: [ { operationId: String status: String(Undefined/NotStarted/Running/Succeeded/Failed) updateId: { provider: String name: String version: String } resourceLocation: String error: { code: String message: String target: String details: [ (recursive schema, see above) ] innererror: { code: String message: String errorDetail: String innerError: (recursive schema, see innerError above) } occurredDateTime: String } traceId: String lastActionDateTime: String createdDateTime: String etag: String } ] nextLink: String }
- Parameters:
requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a list of all import update operations.
- Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
getOperationWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getOperationWithResponse(String operationId, com.azure.core.http.rest.RequestOptions requestOptions)
Retrieve operation status.Query Parameters
Query Parameters Name Type Required Description apiVersion String Yes Api Version Header Parameters
Header Parameters Name Type Required Description ifNoneMatch 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. Response Body Schema
{ operationId: String status: String(Undefined/NotStarted/Running/Succeeded/Failed) updateId: { provider: String name: String version: String } resourceLocation: String error: { code: String message: String target: String details: [ (recursive schema, see above) ] innererror: { code: String message: String errorDetail: String innerError: (recursive schema, see innerError above) } occurredDateTime: String } traceId: String lastActionDateTime: String createdDateTime: String etag: String }
- Parameters:
operationId
- Operation identifier.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- operation metadata along with
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.
-
-