Skip to content

Commit b0811a0

Browse files
Deviceupdate public preview release prepare(Azure#26293)
* regen code * regen code based on newest autorest * Update pom and README according to comments * Update README due to CI failure * Update purview tests to avoid using * Update tests to avoid using DEFAULT_SCOPE * Enable checkstyle and update checkstyle issue * Update codesnippet * Update CHANGELOG content * regen based on the new swagger (client name change) * Update sample and tests * update session records * update session records * update README * update README * update client name in code snippet stub * Remove unused imports * Update CHANGELOG * Update sdk/deviceupdate/azure-iot-deviceupdate/pom.xml Co-authored-by: Weidong Xu <weidxu@microsoft.com> * Update changelog according to comments * Update CHANGELOG according to comments * Update release date in CHANGELOG to prepare for release Co-authored-by: Weidong Xu <weidxu@microsoft.com>
1 parent 00a7380 commit b0811a0

File tree

172 files changed

+16177
-14652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+16177
-14652
lines changed

sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
# Release History
22

3-
## 1.0.0-beta.2 (Unreleased)
3+
## 1.0.0-beta.2 (2022-01-19)
44

5+
### Breaking Changes
6+
7+
This is a new version of client SDK. Changes are:
8+
9+
- Remove models, use `BinaryData` as request and response payload.
10+
- A sync client and an async client for each operation group.
11+
- Add `RequestOptions` to client method parameters.
12+
- Return type of client method is always `Response` except paging and long-running operations.
13+
- Allow users to set `ServiceVersion` in client builder.
14+
15+
### Other Changes
16+
17+
#### Dependency Updates
18+
19+
- Upgraded `azure-core` to `1.24.1`.
20+
- Upgraded `azure-core-http-netty` to `1.11.6`.
521

622
## 1.0.0-beta.1 (2021-03-02)
723
This is the initial release of Azure Device Update for IoT Hub library. For more information, please see the [README](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/deviceupdate/azure-iot-deviceupdate/README.md)

sdk/deviceupdate/azure-iot-deviceupdate/README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,23 @@ For the best development experience, developers should use the official Microsof
2424
<dependency>
2525
<groupId>com.azure</groupId>
2626
<artifactId>azure-iot-deviceupdate</artifactId>
27-
<version>1.0.0-beta.1</version>
27+
<version>1.0.0-beta.2</version>
2828
</dependency>
2929
```
3030
[//]: # ({x-version-update-end})
3131

3232
### Authenticate the client
3333

34-
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/java/api/com.azure.core.credential.tokencredential?view=azure-java-stable) and pass it to the constructor of your AzureDeviceUpdateClientBuilder class.
34+
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/java/api/com.azure.core.credential.tokencredential?view=azure-java-stable) and pass it to the constructor of your `DeviceUpdateClientBuilder` class.
35+
36+
Please refer to [Java SDK Get Started document](https://docs.microsoft.com/azure/developer/java/sdk/get-started#set-up-authentication) for more authentication configuration.
3537

3638
## Key concepts
3739

38-
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:
40+
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 two main components:
3941

40-
- **Updates**: update management (import, enumerate, delete, etc.)
41-
- **Devices**: device management (enumerate devices and retrieve device properties)
42-
- **Deployments**: deployment management (start and monitor update deployments to a set of devices)
42+
- **DeviceUpdate**: update management (import, enumerate, delete, etc.)
43+
- **DeviceManagement**: device management (enumerate devices and retrieve device properties), deployment management (start and monitor update deployments to a set of devices)
4344

4445
You can learn more about Device Update for IoT Hub by visiting [Device Update for IoT Hub](https://github.com/azure/iot-hub-device-update).
4546

@@ -51,20 +52,17 @@ You can familiarize yourself with different APIs using [Samples](https://github.
5152

5253
All Device Update for IoT Hub service operations will throw a ErrorResponseException on failure with helpful ErrorCodes.
5354

54-
For example, if you use the `getUpdateAsync` operation and the model you are looking for doesn't exist, you can catch that specific HttpStatusCode to decide the operation that follows in that case.
55+
For example, if you use the `getUpdateWithResponse` operation and the model you are looking for doesn't exist, you can catch that specific HttpStatusCode to decide the operation that follows in that case.
5556

56-
``` java
57+
``` java com.azure.iot.deviceupdate.DeviceUpdateAsyncClient.notfound
5758
try {
58-
Update update = client.getUpdates().getUpdateAsync(
59-
"provider", "name", "1.0.0.0")
60-
.block();
61-
}
62-
catch (HttpResponseException ex) {
63-
if (e..getResponse().getStatusCode() == 404) {
64-
// Update does not exist.
59+
client.getUpdateWithResponse("foo", "bar", "0.0.0.1", null).block();
60+
} catch (HttpResponseException e) {
61+
if (e.getResponse().getStatusCode() == 404) {
62+
// update does not exist
63+
System.out.println("update does not exist");
6564
}
6665
}
67-
6866
```
6967

7068
## Next steps

sdk/deviceupdate/azure-iot-deviceupdate/pom.xml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929

3030
<properties>
3131
<!-- TODO: (https://github.com/Azure/azure-sdk-for-java/issues/18279) -->
32-
<checkstyle.skip>true</checkstyle.skip>
32+
<checkstyle.skip>false</checkstyle.skip>
33+
<jacoco.skip>true</jacoco.skip>
3334
</properties>
3435

3536
<dependencies>
@@ -74,24 +75,6 @@
7475
<version>5.8.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-params;external_dependency} -->
7576
<scope>test</scope>
7677
</dependency>
77-
<dependency>
78-
<groupId>com.azure</groupId>
79-
<artifactId>azure-storage-blob</artifactId>
80-
<version>12.14.3</version> <!-- {x-version-update;com.azure:azure-storage-blob;dependency} -->
81-
<scope>test</scope>
82-
</dependency>
8378
</dependencies>
8479

85-
<build>
86-
<plugins>
87-
<plugin>
88-
<groupId>org.jacoco</groupId>
89-
<artifactId>jacoco-maven-plugin</artifactId>
90-
<version>0.8.7</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
91-
<configuration>
92-
<skip>true</skip>
93-
</configuration>
94-
</plugin>
95-
</plugins>
96-
</build>
9780
</project>

0 commit comments

Comments
 (0)