Skip to content

Commit 1bb1a8e

Browse files
author
SDKAuto
committed
CodeGen from PR 33763 in Azure/azure-rest-api-specs
Merge 12f16a9b44c820fd1523cd767480d7828d2c33a6 into eb9abbcdb08fe6c2faca5c2a6182568b52a3b1ce
1 parent 98281a1 commit 1bb1a8e

File tree

46 files changed

+161
-2983
lines changed

Some content is hidden

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

46 files changed

+161
-2983
lines changed

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

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

3-
## 1.1.0-beta.4 (Unreleased)
3+
## 1.0.0-beta.1 (2025-04-10)
4+
5+
- Azure Resource Manager ResourceHealth client library for Java. This package contains Microsoft Azure SDK for ResourceHealth Management SDK. The Resource Health Client. Package tag package-preview-2023-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
46

57
### Features Added
68

7-
### Breaking Changes
9+
* `models.EventsOperations` was added
10+
11+
* `models.EventLevelValues` was added
12+
13+
* `models.IssueNameParameter` was added
14+
15+
* `models.SecurityAdvisoryImpactedResources` was added
16+
17+
* `models.KeyValueItem` was added
18+
19+
* `models.Impact` was added
20+
21+
* `models.ImpactedResources` was added
22+
23+
* `models.EventTypeValues` was added
24+
25+
* `models.MetadataEntity` was added
26+
27+
* `models.StatusBanner` was added
28+
29+
* `models.EventPropertiesRecommendedActionsItem` was added
30+
31+
* `models.Events` was added
32+
33+
* `models.ImpactedServiceRegion` was added
34+
35+
* `models.EventStatusValues` was added
36+
37+
* `models.EmergingIssueImpact` was added
38+
39+
* `models.EventOperations` was added
40+
41+
* `models.Event` was added
42+
43+
* `models.ChildAvailabilityStatuses` was added
44+
45+
* `models.EmergingIssues` was added
46+
47+
* `models.EmergingIssuesGetResult` was added
48+
49+
* `models.Metadatas` was added
50+
51+
* `models.SeverityValues` was added
52+
53+
* `models.StageValues` was added
54+
55+
* `models.ChildResources` was added
56+
57+
* `models.ImpactedRegion` was added
58+
59+
* `models.EventSubTypeValues` was added
60+
61+
* `models.EventPropertiesRecommendedActions` was added
62+
63+
* `models.EventImpactedResourceListResult` was added
64+
65+
* `models.StatusActiveEvent` was added
66+
67+
* `models.MetadataEntityListResult` was added
68+
69+
* `models.LinkTypeValues` was added
70+
71+
* `models.EventImpactedResource` was added
72+
73+
* `models.LevelValues` was added
74+
75+
* `models.EmergingIssueListResult` was added
76+
77+
* `models.Faq` was added
78+
79+
* `models.EventSourceValues` was added
80+
81+
* `models.Link` was added
82+
83+
* `models.Scenario` was added
84+
85+
* `models.LinkDisplayText` was added
86+
87+
* `models.Update` was added
88+
89+
* `models.EventPropertiesArticle` was added
90+
91+
* `models.EventPropertiesAdditionalInformation` was added
92+
93+
* `models.MetadataSupportedValueDetail` was added
94+
95+
#### `models.ServiceImpactingEventStatus` was modified
96+
97+
* `toJson(com.azure.json.JsonWriter)` was added
98+
* `fromJson(com.azure.json.JsonReader)` was added
99+
100+
#### `models.RecommendedAction` was modified
101+
102+
* `withActionUrlComment(java.lang.String)` was added
103+
* `actionUrlComment()` was added
104+
* `fromJson(com.azure.json.JsonReader)` was added
105+
* `toJson(com.azure.json.JsonWriter)` was added
106+
107+
#### `ResourceHealthManager` was modified
108+
109+
* `emergingIssues()` was added
110+
* `childResources()` was added
111+
* `impactedResources()` was added
112+
* `metadatas()` was added
113+
* `eventOperations()` was added
114+
* `childAvailabilityStatuses()` was added
115+
* `securityAdvisoryImpactedResources()` was added
116+
* `eventsOperations()` was added
117+
118+
#### `models.AvailabilityStatusProperties` was modified
119+
120+
* `context()` was added
121+
* `articleId()` was added
122+
* `withArticleId(java.lang.String)` was added
123+
* `withCategory(java.lang.String)` was added
124+
* `toJson(com.azure.json.JsonWriter)` was added
125+
* `withContext(java.lang.String)` was added
126+
* `category()` was added
127+
* `fromJson(com.azure.json.JsonReader)` was added
128+
129+
#### `models.OperationDisplay` was modified
130+
131+
* `fromJson(com.azure.json.JsonReader)` was added
132+
* `toJson(com.azure.json.JsonWriter)` was added
133+
134+
#### `models.ServiceImpactingEvent` was modified
135+
136+
* `toJson(com.azure.json.JsonWriter)` was added
137+
* `fromJson(com.azure.json.JsonReader)` was added
138+
139+
#### `models.ServiceImpactingEventIncidentProperties` was modified
140+
141+
* `toJson(com.azure.json.JsonWriter)` was added
142+
* `fromJson(com.azure.json.JsonReader)` was added
143+
144+
#### `models.Operation` was modified
145+
146+
* `toJson(com.azure.json.JsonWriter)` was added
147+
* `fromJson(com.azure.json.JsonReader)` was added
148+
149+
#### `models.AvailabilityStatusPropertiesRecentlyResolved` was modified
150+
151+
* `toJson(com.azure.json.JsonWriter)` was added
152+
* `fromJson(com.azure.json.JsonReader)` was added
8153

9-
### Bugs Fixed
154+
#### `models.AvailabilityStatusListResult` was modified
10155

11-
### Other Changes
156+
* `toJson(com.azure.json.JsonWriter)` was added
157+
* `fromJson(com.azure.json.JsonReader)` was added
12158

13159
## 1.1.0-beta.3 (2024-12-06)
14160

sdk/resourcehealth/azure-resourcemanager-resourcehealth/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
ResourceHealthManager manager = ResourceHealthManager
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

@@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
100100
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
101101
[coc]: https://opensource.microsoft.com/codeofconduct/
102102
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
103-
104-

sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/ResourceHealthManager.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.resourcehealth.fluent.MicrosoftResourceHealth;
2728
import com.azure.resourcemanager.resourcehealth.implementation.AvailabilityStatusesImpl;
@@ -49,6 +50,7 @@
4950
import java.time.temporal.ChronoUnit;
5051
import java.util.ArrayList;
5152
import java.util.List;
53+
import java.util.Map;
5254
import java.util.Objects;
5355
import java.util.stream.Collectors;
5456

@@ -129,6 +131,9 @@ public static Configurable configure() {
129131
*/
130132
public static final class Configurable {
131133
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
134+
private static final String SDK_VERSION = "version";
135+
private static final Map<String, String> PROPERTIES
136+
= CoreUtils.getProperties("azure-resourcemanager-resourcehealth.properties");
132137

133138
private HttpClient httpClient;
134139
private HttpLogOptions httpLogOptions;
@@ -236,12 +241,14 @@ public ResourceHealthManager authenticate(TokenCredential credential, AzureProfi
236241
Objects.requireNonNull(credential, "'credential' cannot be null.");
237242
Objects.requireNonNull(profile, "'profile' cannot be null.");
238243

244+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
245+
239246
StringBuilder userAgentBuilder = new StringBuilder();
240247
userAgentBuilder.append("azsdk-java")
241248
.append("-")
242249
.append("com.azure.resourcemanager.resourcehealth")
243250
.append("/")
244-
.append("1.1.0-beta.3");
251+
.append(clientVersion);
245252
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
246253
userAgentBuilder.append(" (")
247254
.append(Configuration.getGlobalConfiguration().get("java.version"))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version=${project.version}

0 commit comments

Comments
 (0)