Skip to content

Commit 8ae0596

Browse files
authored
[Automation] Generate Fluent Lite from Swagger logz#package-2020-10-01 (Azure#44197)
1 parent 9b42687 commit 8ae0596

33 files changed

+70
-73
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# Release History
22

3-
## 1.0.0-beta.4 (Unreleased)
3+
## 1.0.0-beta.4 (2025-02-14)
44

5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
5+
- Please note, this package has been deprecated and will no longer be maintained after 01/01/2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details.
106

117
### Other Changes
128

9+
- Please note, this package has been deprecated and will no longer be maintained after 01/01/2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details.
10+
1311
## 1.0.0-beta.3 (2024-10-17)
1412

1513
- Azure Resource Manager logz client library for Java. This package contains Microsoft Azure SDK for logz Management SDK. Package tag package-2020-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Various documentation is available to help you get started
3434
<dependency>
3535
<groupId>com.azure.resourcemanager</groupId>
3636
<artifactId>azure-resourcemanager-logz</artifactId>
37-
<version>1.0.0-beta.3</version>
37+
<version>1.0.0-beta.4</version>
3838
</dependency>
3939
```
4040
[//]: # ({x-version-update-end})
@@ -54,15 +54,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5454
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5555

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

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

6767
See [Authentication][authenticate] for more options.
6868

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

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<packaging>jar</packaging>
1919

2020
<name>Microsoft Azure SDK for logz Management</name>
21-
<description>Please note, this package has been deprecated and will no longer be maintained after 01/01/2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details. This package contains Microsoft Azure SDK for logz Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2020-10-01.</description>
21+
<description>Please note, this package has been deprecated and will no longer be maintained after 01/01/2025. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>
@@ -46,6 +46,7 @@
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
4848
<revapi.skip>true</revapi.skip>
49+
<spotless.skip>false</spotless.skip>
4950
</properties>
5051
<dependencies>
5152
<dependency>

sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/LogzManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.azure.core.http.HttpPipelinePosition;
1212
import com.azure.core.http.policy.AddDatePolicy;
1313
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
14+
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
1415
import com.azure.core.http.policy.HttpLogOptions;
1516
import com.azure.core.http.policy.HttpLoggingPolicy;
1617
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -19,7 +20,6 @@
1920
import com.azure.core.http.policy.RetryOptions;
2021
import com.azure.core.http.policy.RetryPolicy;
2122
import com.azure.core.http.policy.UserAgentPolicy;
22-
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
2525
import com.azure.core.util.logging.ClientLogger;
@@ -228,7 +228,7 @@ public LogzManager authenticate(TokenCredential credential, AzureProfile profile
228228
.append("-")
229229
.append("com.azure.resourcemanager.logz")
230230
.append("/")
231-
.append("1.0.0-beta.3");
231+
.append("1.0.0-beta.4");
232232
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
233233
userAgentBuilder.append(" (")
234234
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -261,7 +261,7 @@ public LogzManager authenticate(TokenCredential credential, AzureProfile profile
261261
HttpPolicyProviders.addBeforeRetryPolicies(policies);
262262
policies.add(retryPolicy);
263263
policies.add(new AddDatePolicy());
264-
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
264+
policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
265265
policies.addAll(this.policies.stream()
266266
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
267267
.collect(Collectors.toList()));

sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVMHostsMockTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import com.azure.core.credential.AccessToken;
88
import com.azure.core.http.HttpClient;
99
import com.azure.core.http.rest.PagedIterable;
10-
import com.azure.core.management.AzureEnvironment;
1110
import com.azure.core.management.profile.AzureProfile;
11+
import com.azure.core.models.AzureCloud;
1212
import com.azure.core.test.http.MockHttpResponse;
1313
import com.azure.resourcemanager.logz.LogzManager;
1414
import com.azure.resourcemanager.logz.models.VMResources;
@@ -28,7 +28,7 @@ public void testListVMHosts() throws Exception {
2828
LogzManager manager = LogzManager.configure()
2929
.withHttpClient(httpClient)
3030
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
31-
new AzureProfile("", "", AzureEnvironment.AZURE));
31+
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));
3232

3333
PagedIterable<VMResources> response
3434
= manager.monitorOperations().listVMHosts("qhoftrmaequiah", "icslfaoq", com.azure.core.util.Context.NONE);

sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVmHostUpdateMockTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import com.azure.core.credential.AccessToken;
88
import com.azure.core.http.HttpClient;
99
import com.azure.core.http.rest.PagedIterable;
10-
import com.azure.core.management.AzureEnvironment;
1110
import com.azure.core.management.profile.AzureProfile;
11+
import com.azure.core.models.AzureCloud;
1212
import com.azure.core.test.http.MockHttpResponse;
1313
import com.azure.resourcemanager.logz.LogzManager;
1414
import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner;
@@ -32,7 +32,7 @@ public void testListVmHostUpdate() throws Exception {
3232
LogzManager manager = LogzManager.configure()
3333
.withHttpClient(httpClient)
3434
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
35-
new AzureProfile("", "", AzureEnvironment.AZURE));
35+
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));
3636

3737
PagedIterable<VMResources> response = manager.monitorOperations()
3838
.listVmHostUpdate("qqmoaku", "gm",

sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsCreateMockTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
import com.azure.core.credential.AccessToken;
88
import com.azure.core.http.HttpClient;
9-
import com.azure.core.management.AzureEnvironment;
109
import com.azure.core.management.profile.AzureProfile;
10+
import com.azure.core.models.AzureCloud;
1111
import com.azure.core.test.http.MockHttpResponse;
1212
import com.azure.resourcemanager.logz.LogzManager;
1313
import com.azure.resourcemanager.logz.models.IdentityProperties;
@@ -38,7 +38,7 @@ public void testCreate() throws Exception {
3838
LogzManager manager = LogzManager.configure()
3939
.withHttpClient(httpClient)
4040
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
41-
new AzureProfile("", "", AzureEnvironment.AZURE));
41+
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));
4242

4343
LogzMonitorResource response = manager.monitors()
4444
.define("lpvlopw")

sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteMockTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
import com.azure.core.credential.AccessToken;
88
import com.azure.core.http.HttpClient;
9-
import com.azure.core.management.AzureEnvironment;
109
import com.azure.core.management.profile.AzureProfile;
10+
import com.azure.core.models.AzureCloud;
1111
import com.azure.core.test.http.MockHttpResponse;
1212
import com.azure.resourcemanager.logz.LogzManager;
1313
import java.nio.charset.StandardCharsets;
@@ -25,7 +25,7 @@ public void testDelete() throws Exception {
2525
LogzManager manager = LogzManager.configure()
2626
.withHttpClient(httpClient)
2727
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
28-
new AzureProfile("", "", AzureEnvironment.AZURE));
28+
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));
2929

3030
manager.monitors().delete("xbzpfzab", "lcuhxwtctyqiklb", com.azure.core.util.Context.NONE);
3131

sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupWithResponseMockTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
import com.azure.core.credential.AccessToken;
88
import com.azure.core.http.HttpClient;
9-
import com.azure.core.management.AzureEnvironment;
109
import com.azure.core.management.profile.AzureProfile;
10+
import com.azure.core.models.AzureCloud;
1111
import com.azure.core.test.http.MockHttpResponse;
1212
import com.azure.resourcemanager.logz.LogzManager;
1313
import com.azure.resourcemanager.logz.models.LogzMonitorResource;
@@ -31,7 +31,7 @@ public void testGetByResourceGroupWithResponse() throws Exception {
3131
LogzManager manager = LogzManager.configure()
3232
.withHttpClient(httpClient)
3333
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
34-
new AzureProfile("", "", AzureEnvironment.AZURE));
34+
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));
3535

3636
LogzMonitorResource response = manager.monitors()
3737
.getByResourceGroupWithResponse("qzahmgkbrp", "y", com.azure.core.util.Context.NONE)

sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupMockTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import com.azure.core.credential.AccessToken;
88
import com.azure.core.http.HttpClient;
99
import com.azure.core.http.rest.PagedIterable;
10-
import com.azure.core.management.AzureEnvironment;
1110
import com.azure.core.management.profile.AzureProfile;
11+
import com.azure.core.models.AzureCloud;
1212
import com.azure.core.test.http.MockHttpResponse;
1313
import com.azure.resourcemanager.logz.LogzManager;
1414
import com.azure.resourcemanager.logz.models.LogzMonitorResource;
@@ -32,7 +32,7 @@ public void testListByResourceGroup() throws Exception {
3232
LogzManager manager = LogzManager.configure()
3333
.withHttpClient(httpClient)
3434
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
35-
new AzureProfile("", "", AzureEnvironment.AZURE));
35+
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));
3636

3737
PagedIterable<LogzMonitorResource> response
3838
= manager.monitors().listByResourceGroup("gyxzk", com.azure.core.util.Context.NONE);

0 commit comments

Comments
 (0)