Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-resourcemanager-servicenetworking] AGC v.2025-03-01-preview #13989

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,49 @@
# Release History

## 1.2.0-beta.1 (Unreleased)
## 1.2.0-beta.1 (2025-03-06)

- 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).

### Features Added

### Breaking Changes
* `models.IpAccessRule` was added

* `models.FrontendUpdateProperties` was added

* `models.IpAccessRuleAction` was added

* `models.IpAccessRulesPolicy` was added

* `models.IpAccessRulesSecurityPolicy` was added

#### `models.Frontend$Update` was modified

* `withProperties(models.FrontendUpdateProperties)` was added

#### `models.SecurityPolicyProperties` was modified

* `ipAccessRulesPolicy()` was added
* `withIpAccessRulesPolicy(models.IpAccessRulesPolicy)` was added

### Bugs Fixed
#### `models.SecurityPolicyConfigurations` was modified

### Other Changes
* `withIpAccessRulesSecurityPolicy(models.IpAccessRulesSecurityPolicy)` was added
* `ipAccessRulesSecurityPolicy()` was added

#### `models.FrontendUpdate` was modified

* `properties()` was added
* `withProperties(models.FrontendUpdateProperties)` was added

#### `models.SecurityPolicyUpdateProperties` was modified

* `withIpAccessRulesPolicy(models.IpAccessRulesPolicy)` was added
* `ipAccessRulesPolicy()` was added

#### `models.FrontendProperties` was modified

* `securityPolicyConfigurations()` was added
* `withSecurityPolicyConfigurations(models.SecurityPolicyConfigurations)` was added

## 1.1.0 (2025-02-06)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 @@ -49,7 +49,7 @@ import com.azure.resourcemanager.servicenetworking.models.AssociationType;
*/
public final class AssociationsInterfaceCreateOrUpdateSamples {
/*
* x-ms-original-file: 2025-01-01/AssociationPut.json
* x-ms-original-file: 2025-03-01-preview/AssociationPut.json
*/
/**
* Sample code: Put Association.
Expand Down Expand Up @@ -77,7 +77,7 @@ public final class AssociationsInterfaceCreateOrUpdateSamples {
*/
public final class AssociationsInterfaceDeleteSamples {
/*
* x-ms-original-file: 2025-01-01/AssociationDelete.json
* x-ms-original-file: 2025-03-01-preview/AssociationDelete.json
*/
/**
* Sample code: Delete Association.
Expand All @@ -98,7 +98,7 @@ public final class AssociationsInterfaceDeleteSamples {
*/
public final class AssociationsInterfaceGetSamples {
/*
* x-ms-original-file: 2025-01-01/AssociationGet.json
* x-ms-original-file: 2025-03-01-preview/AssociationGet.json
*/
/**
* Sample code: Get Association.
Expand All @@ -119,7 +119,7 @@ public final class AssociationsInterfaceGetSamples {
*/
public final class AssociationsInterfaceListByTrafficControllerSamples {
/*
* x-ms-original-file: 2025-01-01/AssociationsGet.json
* x-ms-original-file: 2025-03-01-preview/AssociationsGet.json
*/
/**
* Sample code: Get Associations.
Expand All @@ -145,7 +145,7 @@ import com.azure.resourcemanager.servicenetworking.models.AssociationUpdatePrope
*/
public final class AssociationsInterfaceUpdateSamples {
/*
* x-ms-original-file: 2025-01-01/AssociationPatch.json
* x-ms-original-file: 2025-03-01-preview/AssociationPatch.json
*/
/**
* Sample code: Update Association.
Expand Down Expand Up @@ -175,7 +175,7 @@ import com.azure.resourcemanager.servicenetworking.models.FrontendProperties;
*/
public final class FrontendsInterfaceCreateOrUpdateSamples {
/*
* x-ms-original-file: 2025-01-01/FrontendPut.json
* x-ms-original-file: 2025-03-01-preview/FrontendPut.json
*/
/**
* Sample code: Put Frontend.
Expand All @@ -201,7 +201,7 @@ public final class FrontendsInterfaceCreateOrUpdateSamples {
*/
public final class FrontendsInterfaceDeleteSamples {
/*
* x-ms-original-file: 2025-01-01/FrontendDelete.json
* x-ms-original-file: 2025-03-01-preview/FrontendDelete.json
*/
/**
* Sample code: Delete Frontend.
Expand All @@ -222,7 +222,7 @@ public final class FrontendsInterfaceDeleteSamples {
*/
public final class FrontendsInterfaceGetSamples {
/*
* x-ms-original-file: 2025-01-01/FrontendGet.json
* x-ms-original-file: 2025-03-01-preview/FrontendGet.json
*/
/**
* Sample code: Get Frontend.
Expand All @@ -243,7 +243,7 @@ public final class FrontendsInterfaceGetSamples {
*/
public final class FrontendsInterfaceListByTrafficControllerSamples {
/*
* x-ms-original-file: 2025-01-01/FrontendsGet.json
* x-ms-original-file: 2025-03-01-preview/FrontendsGet.json
*/
/**
* Sample code: Get Frontends.
Expand All @@ -266,7 +266,7 @@ import com.azure.resourcemanager.servicenetworking.models.Frontend;
*/
public final class FrontendsInterfaceUpdateSamples {
/*
* x-ms-original-file: 2025-01-01/FrontendPatch.json
* x-ms-original-file: 2025-03-01-preview/FrontendPatch.json
*/
/**
* Sample code: Update Frontend.
Expand All @@ -290,7 +290,7 @@ public final class FrontendsInterfaceUpdateSamples {
*/
public final class OperationsListSamples {
/*
* x-ms-original-file: 2025-01-01/OperationsList.json
* x-ms-original-file: 2025-03-01-preview/OperationsList.json
*/
/**
* Sample code: Get Operations List.
Expand All @@ -306,22 +306,44 @@ public final class OperationsListSamples {
### SecurityPoliciesInterface_CreateOrUpdate

```java
import com.azure.resourcemanager.servicenetworking.models.IpAccessRulesPolicy;
import com.azure.resourcemanager.servicenetworking.models.SecurityPolicyProperties;
import com.azure.resourcemanager.servicenetworking.models.WafPolicy;
import java.util.Arrays;

/**
* Samples for SecurityPoliciesInterface CreateOrUpdate.
*/
public final class SecurityPoliciesInterfaceCreateOrUpdateSamples {
/*
* x-ms-original-file: 2025-01-01/SecurityPolicyPut.json
* x-ms-original-file: 2025-03-01-preview/IpAccessRulesSecurityPolicyPut.json
*/
/**
* Sample code: Put SecurityPolicy.
* Sample code: Put IpAccessRules SecurityPolicy.
*
* @param manager Entry point to TrafficControllerManager.
*/
public static void putSecurityPolicy(com.azure.resourcemanager.servicenetworking.TrafficControllerManager manager) {
public static void
putIpAccessRulesSecurityPolicy(com.azure.resourcemanager.servicenetworking.TrafficControllerManager manager) {
manager.securityPoliciesInterfaces()
.define("sp1")
.withRegion("NorthCentralUS")
.withExistingTrafficController("rg1", "tc1")
.withProperties(new SecurityPolicyProperties()
.withIpAccessRulesPolicy(new IpAccessRulesPolicy().withRules(Arrays.asList())))
.create();
}

/*
* x-ms-original-file: 2025-03-01-preview/WafSecurityPolicyPut.json
*/
/**
* Sample code: Put WAF SecurityPolicy.
*
* @param manager Entry point to TrafficControllerManager.
*/
public static void
putWAFSecurityPolicy(com.azure.resourcemanager.servicenetworking.TrafficControllerManager manager) {
manager.securityPoliciesInterfaces()
.define("sp1")
.withRegion("NorthCentralUS")
Expand All @@ -341,7 +363,7 @@ public final class SecurityPoliciesInterfaceCreateOrUpdateSamples {
*/
public final class SecurityPoliciesInterfaceDeleteSamples {
/*
* x-ms-original-file: 2025-01-01/SecurityPolicyDelete.json
* x-ms-original-file: 2025-03-01-preview/SecurityPolicyDelete.json
*/
/**
* Sample code: Delete SecurityPolicy.
Expand All @@ -363,7 +385,7 @@ public final class SecurityPoliciesInterfaceDeleteSamples {
*/
public final class SecurityPoliciesInterfaceGetSamples {
/*
* x-ms-original-file: 2025-01-01/SecurityPolicyGet.json
* x-ms-original-file: 2025-03-01-preview/SecurityPolicyGet.json
*/
/**
* Sample code: Get SecurityPolicy.
Expand All @@ -384,7 +406,7 @@ public final class SecurityPoliciesInterfaceGetSamples {
*/
public final class SecurityPoliciesInterfaceListByTrafficControllerSamples {
/*
* x-ms-original-file: 2025-01-01/SecurityPoliciesGetList.json
* x-ms-original-file: 2025-03-01-preview/SecurityPoliciesGetList.json
*/
/**
* Sample code: Get SecurityPolicies.
Expand All @@ -401,24 +423,45 @@ public final class SecurityPoliciesInterfaceListByTrafficControllerSamples {
### SecurityPoliciesInterface_Update

```java
import com.azure.resourcemanager.servicenetworking.models.IpAccessRulesPolicy;
import com.azure.resourcemanager.servicenetworking.models.SecurityPolicy;
import com.azure.resourcemanager.servicenetworking.models.SecurityPolicyUpdateProperties;
import com.azure.resourcemanager.servicenetworking.models.WafPolicy;
import java.util.Arrays;

/**
* Samples for SecurityPoliciesInterface Update.
*/
public final class SecurityPoliciesInterfaceUpdateSamples {
/*
* x-ms-original-file: 2025-01-01/SecurityPolicyPatch.json
* x-ms-original-file: 2025-03-01-preview/IpAccessRulesSecurityPolicyPatch.json
*/
/**
* Sample code: Update IpAccessRules SecurityPolicy.
*
* @param manager Entry point to TrafficControllerManager.
*/
public static void updateIpAccessRulesSecurityPolicy(
com.azure.resourcemanager.servicenetworking.TrafficControllerManager manager) {
SecurityPolicy resource = manager.securityPoliciesInterfaces()
.getWithResponse("rg1", "tc1", "sp1", com.azure.core.util.Context.NONE)
.getValue();
resource.update()
.withProperties(new SecurityPolicyUpdateProperties()
.withIpAccessRulesPolicy(new IpAccessRulesPolicy().withRules(Arrays.asList())))
.apply();
}

/*
* x-ms-original-file: 2025-03-01-preview/WafSecurityPolicyPatch.json
*/
/**
* Sample code: Update SecurityPolicy.
* Sample code: Update WAF SecurityPolicy.
*
* @param manager Entry point to TrafficControllerManager.
*/
public static void
updateSecurityPolicy(com.azure.resourcemanager.servicenetworking.TrafficControllerManager manager) {
updateWAFSecurityPolicy(com.azure.resourcemanager.servicenetworking.TrafficControllerManager manager) {
SecurityPolicy resource = manager.securityPoliciesInterfaces()
.getWithResponse("rg1", "tc1", "sp1", com.azure.core.util.Context.NONE)
.getValue();
Expand All @@ -441,7 +484,7 @@ import java.util.Map;
*/
public final class TrafficControllerInterfaceCreateOrUpdateSamples {
/*
* x-ms-original-file: 2025-01-01/TrafficControllerPut.json
* x-ms-original-file: 2025-03-01-preview/TrafficControllerPut.json
*/
/**
* Sample code: Put Traffic Controller.
Expand Down Expand Up @@ -480,7 +523,7 @@ public final class TrafficControllerInterfaceCreateOrUpdateSamples {
*/
public final class TrafficControllerInterfaceDeleteSamples {
/*
* x-ms-original-file: 2025-01-01/TrafficControllerDelete.json
* x-ms-original-file: 2025-03-01-preview/TrafficControllerDelete.json
*/
/**
* Sample code: Delete Traffic Controller.
Expand All @@ -502,7 +545,7 @@ public final class TrafficControllerInterfaceDeleteSamples {
*/
public final class TrafficControllerInterfaceGetByResourceGroupSamples {
/*
* x-ms-original-file: 2025-01-01/TrafficControllerGet.json
* x-ms-original-file: 2025-03-01-preview/TrafficControllerGet.json
*/
/**
* Sample code: Get Traffic Controller.
Expand All @@ -525,7 +568,7 @@ public final class TrafficControllerInterfaceGetByResourceGroupSamples {
*/
public final class TrafficControllerInterfaceListSamples {
/*
* x-ms-original-file: 2025-01-01/TrafficControllersGetList.json
* x-ms-original-file: 2025-03-01-preview/TrafficControllersGetList.json
*/
/**
* Sample code: Get Traffic Controllers List.
Expand All @@ -547,7 +590,7 @@ public final class TrafficControllerInterfaceListSamples {
*/
public final class TrafficControllerInterfaceListByResourceGroupSamples {
/*
* x-ms-original-file: 2025-01-01/TrafficControllersGet.json
* x-ms-original-file: 2025-03-01-preview/TrafficControllersGet.json
*/
/**
* Sample code: Get Traffic Controllers.
Expand All @@ -573,7 +616,7 @@ import java.util.Map;
*/
public final class TrafficControllerInterfaceUpdateSamples {
/*
* x-ms-original-file: 2025-01-01/TrafficControllerPatch.json
* x-ms-original-file: 2025-03-01-preview/TrafficControllerPatch.json
*/
/**
* Sample code: Patch Traffic Controller.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
<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>
</properties>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.azure.resourcemanager.servicenetworking.models.Frontend;
import com.azure.resourcemanager.servicenetworking.models.FrontendProperties;
import com.azure.resourcemanager.servicenetworking.models.FrontendUpdate;
import com.azure.resourcemanager.servicenetworking.models.FrontendUpdateProperties;
import java.util.Collections;
import java.util.Map;

Expand Down Expand Up @@ -177,6 +178,11 @@ public FrontendImpl withProperties(FrontendProperties properties) {
return this;
}

public FrontendImpl withProperties(FrontendUpdateProperties properties) {
this.updateProperties.withProperties(properties);
return this;
}

private boolean isInCreateMode() {
return this.innerModel().id() == null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.endpoint = endpoint;
this.subscriptionId = subscriptionId;
this.apiVersion = "2025-01-01";
this.apiVersion = "2025-03-01-preview";
this.associationsInterfaces = new AssociationsInterfacesClientImpl(this);
this.frontendsInterfaces = new FrontendsInterfacesClientImpl(this);
this.securityPoliciesInterfaces = new SecurityPoliciesInterfacesClientImpl(this);
Expand Down
Loading