-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Release of Device Update for IoT Hub SDK for .NET. #19116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
52ae28f
Release of Device Update for IoT Hub SDK for .NET.
2f14f70
deviceupdate/ci.yml
pakrym 5d186fa
Some README and csproj fixes to get things building
pakrym c1469a6
changelog
pakrym 9f8c5a3
Update ContentFactory.cs
abcf1c4
Updating test and samples.
08d462e
Updating doc links
7332ced
Fixing one more link
cdce459
Fixing broken links.
6b1e58c
Fixing/removing extra client option classes.
0e60c41
Update README.md
9b85195
Merge remote-tracking branch 'upstream/master' into HEAD
dpokluda 7090ad2
Regenerating all the files with new autorest
dpokluda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
sdk/deviceupdate/Azure.Iot.DeviceUpdate/Azure.Iot.DeviceUpdate.sln
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio Version 16 | ||
| VisualStudioVersion = 16.0.30621.155 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Iot.DeviceUpdate", "src\Azure.Iot.DeviceUpdate.csproj", "{F1AB3BFB-DBBF-4002-A93F-DFB02545C666}" | ||
| EndProject | ||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Iot.DeviceUpdate.Tests", "tests\Azure.Iot.DeviceUpdate.Tests.csproj", "{C039F382-F091-433C-9DAA-CC2FF7CF4644}" | ||
| EndProject | ||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{24219D07-7E76-4631-9D89-49DCB79F7A84}" | ||
| EndProject | ||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DeviceUpdateClientSample", "samples\DeviceUpdateClientSample\DeviceUpdateClientSample.csproj", "{4719AE90-2B90-4DBC-92DA-8CCE29D5B7F3}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {F1AB3BFB-DBBF-4002-A93F-DFB02545C666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {F1AB3BFB-DBBF-4002-A93F-DFB02545C666}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {F1AB3BFB-DBBF-4002-A93F-DFB02545C666}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {F1AB3BFB-DBBF-4002-A93F-DFB02545C666}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| {C039F382-F091-433C-9DAA-CC2FF7CF4644}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {C039F382-F091-433C-9DAA-CC2FF7CF4644}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {C039F382-F091-433C-9DAA-CC2FF7CF4644}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {C039F382-F091-433C-9DAA-CC2FF7CF4644}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| {24219D07-7E76-4631-9D89-49DCB79F7A84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {24219D07-7E76-4631-9D89-49DCB79F7A84}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {24219D07-7E76-4631-9D89-49DCB79F7A84}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {24219D07-7E76-4631-9D89-49DCB79F7A84}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| {4719AE90-2B90-4DBC-92DA-8CCE29D5B7F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {4719AE90-2B90-4DBC-92DA-8CCE29D5B7F3}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {4719AE90-2B90-4DBC-92DA-8CCE29D5B7F3}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {4719AE90-2B90-4DBC-92DA-8CCE29D5B7F3}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {3D97F8B9-00F4-4457-BD23-58F8D58B9C64} | ||
| EndGlobalSection | ||
| EndGlobal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Release History | ||
|
|
||
| ## 1.0.0-preview.1 (2020-09-01) | ||
| - Initial changelog |
6 changes: 6 additions & 0 deletions
6
sdk/deviceupdate/Azure.Iot.DeviceUpdate/Directory.Build.props
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <!-- | ||
| Add any shared properties you want for the projects under this package directory that need to be set before the auto imported Directory.Build.props | ||
| --> | ||
| <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" /> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # Device Update for IoT Hub client library for .NET | ||
|
|
||
| The library provides access to the Device Update for IoT Hub service that enables customers to publish updates for their IoT devices to the cloud, and then deploy these updates to their devices (approve updates to groups of devices managed and provisioned in IoT Hub). | ||
|
|
||
| [Source code](https://github.com/Azure/azure-sdk-for-sdk/tree/master/sdk/deviceupdate/Azure.Iot.DeviceUpdate/src/) | [Package](https://www.nuget.org/packages/Azure.DeviceUpdate) | [Product documentation](https://github.com/Azure/adu-private-preview/blob/master/docs/adu-overview.md) | ||
|
|
||
|
|
||
| ## Getting started | ||
|
|
||
| The complete Microsoft Azure SDK can be downloaded from the [Microsoft Azure Downloads](https://azure.microsoft.com/downloads/?sdk=net) page and ships with support for building deployment packages, integrating with tooling, rich command line tooling, and more. | ||
|
|
||
| For the best development experience, developers should use the official Microsoft NuGet packages for libraries. NuGet packages are regularly updated with new functionality and hotfixes. | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - Microsoft Azure Subscription: To call Microsoft Azure services, you need to create an [Azure subscription](https://azure.microsoft.com/free/) | ||
| - Device Update for IoT Hub instance | ||
| - Azure IoT Hub instance | ||
|
|
||
| ### Install the package | ||
|
|
||
| Install the Device Update for IoT Hub client library for .NET with [NuGet](https://www.nuget.org/ ): | ||
|
|
||
| ```PowerShell | ||
| dotnet install Azure.Iot.DeviceUpdate --version 1.0.0-beta.1 | ||
| ``` | ||
|
|
||
| ### Authenticate the Client | ||
|
|
||
| In order to interact with the Device Update for IoT Hub service, you will need to create an instance of a [TokenCredential class](https://docs.microsoft.com/dotnet/api/azure.core.tokencredential?view=azure-dotnet) and pass it to the constructor of your UpdateClient, DeviceClient and DeploymentClient class. | ||
|
|
||
| ## Key concepts | ||
|
|
||
| Device Update for IoT Hub is a managed service that enables you to deploy over-the-air updates for your IoT devices. The client library has three main components: | ||
| - **UpdatesClient**: update management (import, enumerate, delete, etc.) | ||
| - **DevicesClient**: device management (enumerate devices and retrieve device properties) | ||
| - **DeploymentsClient**: deployment management (start and monitor update deployments to a set of devices) | ||
|
|
||
| You can learn more about Device Update for IoT Hub by visiting [Device Update for IoT Hub](https://github.com/Azure/adu-private-preview/tree/release/v0.2.0-private-preview). | ||
|
|
||
| ## Examples | ||
|
|
||
| You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-sdk/tree/master/sdk/deviceupdate/Azure.Iot.DeviceUpdate/samples). | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| All Device Update for IoT Hub service operations will throw a RequestFailedException on failure with helpful ErrorCodes. | ||
|
|
||
| For example, if you use the `GetUpdateAsync` operation and the model you are looking for doesn't exist, you can catch that specific [HttpStatusCode](https://docs.microsoft.com/dotnet/api/system.net.httpstatuscode?view=netcore-3.1) to decide the operation that follows in that case. | ||
|
|
||
| ```csharp | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| try | ||
| { | ||
| Response<Update> update = await _updatesClient.GetUpdateAsync( | ||
| "provider", "name", "1.0.0.0") | ||
| .ConfigureAwait(false); | ||
| } | ||
| catch (RequestFailedException ex) when (ex.Status == (int)HttpStatusCode.NotFound) | ||
| { | ||
| // Update does not exist. | ||
| } | ||
|
|
||
| ``` | ||
|
|
||
| ## Next steps | ||
|
|
||
| Get started with our [Device Update for IoT Hub samples](https://github.com/Azure/azure-sdk-for-sdk/tree/master/sdk/deviceupdate/Azure.Iot.DeviceUpdate/samples) | ||
|
|
||
| ## Contributing | ||
|
|
||
| This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit <https://cla.microsoft.com.> | ||
|
|
||
| When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. | ||
|
|
||
| This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.