Skip to content

Commit

Permalink
CodeGen from PR 32757 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge e19a8873154c10c913d29fc13a70a029e3b059f9 into df7c9b730f08e00dbe543b57235b36666563ff7d
  • Loading branch information
SDKAuto committed Feb 21, 2025
1 parent e2e8395 commit 48bb0c3
Show file tree
Hide file tree
Showing 18 changed files with 35 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
# Release History

## 1.2.0-beta.1 (Unreleased)
## 1.2.0-beta.1 (2025-02-21)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- Azure Resource Manager Traffic Controller client library for Java. This package contains Microsoft Azure SDK for Traffic Controller Management SDK. Traffic Controller Provider management API. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.1.0 (2025-02-06)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-servicenetworking</artifactId>
<version>1.1.0</version>
<version>1.2.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
TrafficControllerManager manager = TrafficControllerManager
.authenticate(credential, profile);
```

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

See [Authentication][authenticate] for more options.

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


Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<spotless.skip>false</spotless.skip>
<revapi.skip>true</revapi.skip>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.Association;
Expand All @@ -33,7 +33,7 @@ public void testCreateOrUpdate() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

Association response = manager.associationsInterfaces()
.define("jdeyeamdpha")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.Association;
Expand All @@ -29,7 +29,7 @@ public void testGetWithResponse() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

Association response = manager.associationsInterfaces()
.getWithResponse("oczvy", "fqrvkdvjsllrmvvd", "watkpnpulexxb", com.azure.core.util.Context.NONE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.Association;
Expand All @@ -30,7 +30,7 @@ public void testListByTrafficController() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

PagedIterable<Association> response
= manager.associationsInterfaces().listByTrafficController("hl", "m", com.azure.core.util.Context.NONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.Frontend;
Expand All @@ -31,7 +31,7 @@ public void testCreateOrUpdate() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

Frontend response = manager.frontendsInterfaces()
.define("axdbabph")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.Frontend;
Expand All @@ -28,7 +28,7 @@ public void testGetWithResponse() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

Frontend response = manager.frontendsInterfaces()
.getWithResponse("ebrjcxe", "fuwutttxf", "jrbirphxepcyv", com.azure.core.util.Context.NONE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.Frontend;
Expand All @@ -29,7 +29,7 @@ public void testListByTrafficController() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

PagedIterable<Frontend> response = manager.frontendsInterfaces()
.listByTrafficController("y", "hibnuqqkpika", com.azure.core.util.Context.NONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.Operation;
Expand All @@ -28,7 +28,7 @@ public void testList() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

PagedIterable<Operation> response = manager.operations().list(com.azure.core.util.Context.NONE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.SecurityPolicy;
Expand All @@ -32,7 +32,7 @@ public void testCreateOrUpdate() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

SecurityPolicy response = manager.securityPoliciesInterfaces()
.define("qj")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.SecurityPolicy;
Expand All @@ -28,7 +28,7 @@ public void testGetWithResponse() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

SecurityPolicy response = manager.securityPoliciesInterfaces()
.getWithResponse("xnkjzkdesl", "vlopwiyighx", "kdwzbaiuebbaumny", com.azure.core.util.Context.NONE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.SecurityPolicy;
Expand All @@ -29,7 +29,7 @@ public void testListByTrafficController() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

PagedIterable<SecurityPolicy> response = manager.securityPoliciesInterfaces()
.listByTrafficController("nxdhbt", "kphywpnvjto", com.azure.core.util.Context.NONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.SecurityPolicyConfigurations;
Expand All @@ -33,7 +33,7 @@ public void testCreateOrUpdate() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

TrafficController response = manager.trafficControllerInterfaces()
.define("tswb")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.TrafficController;
Expand All @@ -28,7 +28,7 @@ public void testGetByResourceGroupWithResponse() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

TrafficController response = manager.trafficControllerInterfaces()
.getByResourceGroupWithResponse("vo", "bvmeuecivy", com.azure.core.util.Context.NONE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.TrafficController;
Expand All @@ -29,7 +29,7 @@ public void testListByResourceGroup() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

PagedIterable<TrafficController> response
= manager.trafficControllerInterfaces().listByResourceGroup("c", com.azure.core.util.Context.NONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import com.azure.core.credential.AccessToken;
import com.azure.core.http.HttpClient;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.models.AzureCloud;
import com.azure.core.test.http.MockHttpResponse;
import com.azure.resourcemanager.servicenetworking.TrafficControllerManager;
import com.azure.resourcemanager.servicenetworking.models.TrafficController;
Expand All @@ -29,7 +29,7 @@ public void testList() throws Exception {
TrafficControllerManager manager = TrafficControllerManager.configure()
.withHttpClient(httpClient)
.authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureEnvironment.AZURE));
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));

PagedIterable<TrafficController> response
= manager.trafficControllerInterfaces().list(com.azure.core.util.Context.NONE);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/servicenetworking/ServiceNetworking.Management
commit: 05b150757bd72ad78bd27216e5e662beaa49bd6c
commit: 85eb1483236af80200adae48392d642f3235c22b
repo: Azure/azure-rest-api-specs
additionalDirectories:

0 comments on commit 48bb0c3

Please sign in to comment.