Skip to content

Commit 912db82

Browse files
author
SDKAuto
committed
CodeGen from PR 33778 in Azure/azure-rest-api-specs
Merge 93c0099c5d540d7edaea322094a0e2cce4748458 into 84eef1839d5db0edaf791fd0915b38a50b3b64b5
1 parent cbacda2 commit 912db82

File tree

100 files changed

+14
-3681
lines changed

Some content is hidden

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

100 files changed

+14
-3681
lines changed

sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
# Release History
22

3-
## 1.4.0-beta.1 (Unreleased)
3+
## 1.0.0-beta.1 (2025-04-08)
44

5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
5+
- Azure Resource Manager IotHub client library for Java. This package contains Microsoft Azure SDK for IotHub Management SDK. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2023-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
126

137
## 1.3.0 (2024-12-11)
148

sdk/iothub/azure-resourcemanager-iothub/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5252
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5353

5454
```java
55-
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
5656
TokenCredential credential = new DefaultAzureCredentialBuilder()
5757
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
5858
.build();
5959
IotHubManager manager = IotHubManager
6060
.authenticate(credential, profile);
6161
```
6262

63-
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
6464

6565
See [Authentication][authenticate] for more options.
6666

@@ -143,5 +143,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
143143
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
144144
[coc]: https://opensource.microsoft.com/codeofconduct/
145145
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
146-
147-

sdk/iothub/azure-resourcemanager-iothub/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
48+
<revapi.skip>true</revapi.skip>
4849
<spotless.skip>false</spotless.skip>
4950
</properties>
5051
<dependencies>

sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.azure.core.http.policy.UserAgentPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
25+
import com.azure.core.util.CoreUtils;
2526
import com.azure.core.util.logging.ClientLogger;
2627
import com.azure.resourcemanager.iothub.fluent.IotHubClient;
2728
import com.azure.resourcemanager.iothub.implementation.CertificatesImpl;
@@ -43,6 +44,7 @@
4344
import java.time.temporal.ChronoUnit;
4445
import java.util.ArrayList;
4546
import java.util.List;
47+
import java.util.Map;
4648
import java.util.Objects;
4749
import java.util.stream.Collectors;
4850

@@ -117,6 +119,9 @@ public static Configurable configure() {
117119
*/
118120
public static final class Configurable {
119121
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
122+
private static final String SDK_VERSION = "version";
123+
private static final Map<String, String> PROPERTIES
124+
= CoreUtils.getProperties("azure-resourcemanager-iothub.properties");
120125

121126
private HttpClient httpClient;
122127
private HttpLogOptions httpLogOptions;
@@ -224,12 +229,14 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
224229
Objects.requireNonNull(credential, "'credential' cannot be null.");
225230
Objects.requireNonNull(profile, "'profile' cannot be null.");
226231

232+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
233+
227234
StringBuilder userAgentBuilder = new StringBuilder();
228235
userAgentBuilder.append("azsdk-java")
229236
.append("-")
230237
.append("com.azure.resourcemanager.iothub")
231238
.append("/")
232-
.append("1.3.0");
239+
.append(clientVersion);
233240
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
234241
userAgentBuilder.append(" (")
235242
.append(Configuration.getGlobalConfiguration().get("java.version"))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version=${project.version}

sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ArmIdentityTests.java

Lines changed: 0 additions & 44 deletions
This file was deleted.

sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/ArmUserIdentityTests.java

Lines changed: 0 additions & 23 deletions
This file was deleted.

sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificateDescriptionInnerTests.java

Lines changed: 0 additions & 30 deletions
This file was deleted.

sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificateListDescriptionInnerTests.java

Lines changed: 0 additions & 37 deletions
This file was deleted.

sdk/iothub/azure-resourcemanager-iothub/src/test/java/com/azure/resourcemanager/iothub/generated/CertificatePropertiesTests.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)