Class DeviceUpdateClient


  • public final class DeviceUpdateClient
    extends Object
    Initializes a new instance of the synchronous DeviceUpdateClient type.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.azure.core.util.polling.SyncPoller<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.SyncPoller<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.
      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.
      com.azure.core.http.rest.Response<com.azure.core.util.BinaryData> getOperationWithResponse​(String operationId, com.azure.core.http.rest.RequestOptions requestOptions)
      Retrieve operation status.
      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.PagedIterable<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.PagedIterable<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.PagedIterable<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.PagedIterable<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.PagedIterable<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.PagedIterable<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

      • beginImportUpdate

        public com.azure.core.util.polling.SyncPoller<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
        NameTypeRequiredDescription
        actionStringYesImport update action.
        apiVersionStringYesApi 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 of Mono.
        Throws:
        com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      • listUpdates

        public com.azure.core.http.rest.PagedIterable<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
        NameTypeRequiredDescription
        apiVersionStringYesApi Version
        searchStringNoRequest updates matching a free-text search expression.
        filterStringNoFilter 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 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
        NameTypeRequiredDescription
        apiVersionStringYesApi Version

        Header Parameters

        Header Parameters
        NameTypeRequiredDescription
        ifNoneMatchStringNoDefines 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.
        Throws:
        com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      • beginDeleteUpdate

        public com.azure.core.util.polling.SyncPoller<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
        NameTypeRequiredDescription
        apiVersionStringYesApi 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 of Mono.
        Throws:
        com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      • listProviders

        public com.azure.core.http.rest.PagedIterable<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
        NameTypeRequiredDescription
        apiVersionStringYesApi 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.PagedIterable<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
        NameTypeRequiredDescription
        apiVersionStringYesApi 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.PagedIterable<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
        NameTypeRequiredDescription
        apiVersionStringYesApi Version
        filterStringNoFilter 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.PagedIterable<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
        NameTypeRequiredDescription
        apiVersionStringYesApi 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 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
        NameTypeRequiredDescription
        apiVersionStringYesApi Version

        Header Parameters

        Header Parameters
        NameTypeRequiredDescription
        ifNoneMatchStringNoDefines 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.
        Throws:
        com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      • listOperations

        public com.azure.core.http.rest.PagedIterable<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
        NameTypeRequiredDescription
        filterStringNoRestricts the set of operations returned. Only one specific filter is supported: "status eq 'NotStarted' or status eq 'Running'"
        topStringNoSpecifies 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.
        apiVersionStringYesApi 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 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
        NameTypeRequiredDescription
        apiVersionStringYesApi Version

        Header Parameters

        Header Parameters
        NameTypeRequiredDescription
        ifNoneMatchStringNoDefines 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.
        Throws:
        com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.