Skip to content

Commit 9c0deae

Browse files
authored
Sensitivity Feature for Application Gateway Firewall Policy Managed Rule Override (#25705)
* sensitivity add * add back deleted rule * add back deleted rule * removed bracket * merge conf * edit comment and add nuget * retry test * fix test * edit sdk * edit test
1 parent d230ce1 commit 9c0deae

File tree

46 files changed

+4052
-81
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

+4052
-81
lines changed

src/Network/Network.Management.Sdk/Generated/AzureFirewallsOperations.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,10 @@ internal AzureFirewallsOperations (NetworkManagementClient client)
990990
{
991991
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
992992
}
993-
993+
if (parameters != null)
994+
{
995+
parameters.Validate();
996+
}
994997
if (resourceGroupName == null)
995998
{
996999
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");

src/Network/Network.Management.Sdk/Generated/IVpnLinkConnectionsOperations.cs

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,142 @@ public partial interface IVpnLinkConnectionsOperations
4242
/// </exception>
4343
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> ResetConnectionWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, string linkConnectionName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
4444

45+
/// <summary>
46+
/// Lists all shared keys of VpnLink connection specified.
47+
/// </summary>
48+
/// <remarks>
49+
/// Lists all shared keys of VpnLink connection specified.
50+
/// </remarks>
51+
/// <param name='resourceGroupName'>
52+
/// The name of the resource group.
53+
/// </param>
54+
/// <param name='gatewayName'>
55+
/// The name of the gateway.
56+
/// </param>
57+
/// <param name='connectionName'>
58+
/// The name of the vpn connection.
59+
/// </param>
60+
/// <param name='linkConnectionName'>
61+
/// The name of the vpn link connection.
62+
/// </param>
63+
/// <param name='customHeaders'>
64+
/// The headers that will be added to request.
65+
/// </param>
66+
/// <param name='cancellationToken'>
67+
/// The cancellation token.
68+
/// </param>
69+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
70+
/// Thrown when the operation returned an invalid status code
71+
/// </exception>
72+
/// <exception cref="Microsoft.Rest.SerializationException">
73+
/// Thrown when unable to deserialize the response
74+
/// </exception>
75+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Rest.Azure.IPage<ConnectionSharedKeyResult>>> GetAllSharedKeysWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, string linkConnectionName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
76+
77+
/// <summary>
78+
/// Gets the shared key of VpnLink connection specified.
79+
/// </summary>
80+
/// <remarks>
81+
/// Gets the shared key of VpnLink connection specified.
82+
/// </remarks>
83+
/// <param name='resourceGroupName'>
84+
/// The name of the resource group.
85+
/// </param>
86+
/// <param name='gatewayName'>
87+
/// The name of the gateway.
88+
/// </param>
89+
/// <param name='connectionName'>
90+
/// The name of the vpn connection.
91+
/// </param>
92+
/// <param name='linkConnectionName'>
93+
/// The name of the vpn link connection.
94+
/// </param>
95+
/// <param name='customHeaders'>
96+
/// The headers that will be added to request.
97+
/// </param>
98+
/// <param name='cancellationToken'>
99+
/// The cancellation token.
100+
/// </param>
101+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
102+
/// Thrown when the operation returned an invalid status code
103+
/// </exception>
104+
/// <exception cref="Microsoft.Rest.SerializationException">
105+
/// Thrown when unable to deserialize the response
106+
/// </exception>
107+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<ConnectionSharedKeyResult>> GetDefaultSharedKeyWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, string linkConnectionName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
108+
109+
/// <summary>
110+
/// Sets or auto generates the shared key based on the user input. If users
111+
/// give a shared key value, it does the set operation. If key length is given,
112+
/// the operation creates a random key of the pre-defined length.
113+
/// </summary>
114+
/// <remarks>
115+
/// Sets or auto generates the shared key based on the user input. If users
116+
/// give a shared key value, it does the set operation. If key length is given,
117+
/// the operation creates a random key of the pre-defined length.
118+
/// </remarks>
119+
/// <param name='resourceGroupName'>
120+
/// The resource group name of the VpnGateway.
121+
/// </param>
122+
/// <param name='gatewayName'>
123+
/// The name of the gateway.
124+
/// </param>
125+
/// <param name='connectionName'>
126+
/// The name of the connection.
127+
/// </param>
128+
/// <param name='linkConnectionName'>
129+
/// The name of the vpn link connection.
130+
/// </param>
131+
/// <param name='connectionSharedKeyParameters'>
132+
/// Parameters supplied to set or auto generate the shared key for the vpn link
133+
/// connection.
134+
/// </param>
135+
/// <param name='customHeaders'>
136+
/// The headers that will be added to request.
137+
/// </param>
138+
/// <param name='cancellationToken'>
139+
/// The cancellation token.
140+
/// </param>
141+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
142+
/// Thrown when the operation returned an invalid status code
143+
/// </exception>
144+
/// <exception cref="Microsoft.Rest.SerializationException">
145+
/// Thrown when unable to deserialize the response
146+
/// </exception>
147+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<ConnectionSharedKeyResult>> SetOrInitDefaultSharedKeyWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, string linkConnectionName, ConnectionSharedKeyResult connectionSharedKeyParameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
148+
149+
/// <summary>
150+
/// Gets the value of the shared key of VpnLink connection specified.
151+
/// </summary>
152+
/// <remarks>
153+
/// Gets the value of the shared key of VpnLink connection specified.
154+
/// </remarks>
155+
/// <param name='resourceGroupName'>
156+
/// The name of the resource group.
157+
/// </param>
158+
/// <param name='gatewayName'>
159+
/// The name of the gateway.
160+
/// </param>
161+
/// <param name='connectionName'>
162+
/// The name of the vpn connection.
163+
/// </param>
164+
/// <param name='linkConnectionName'>
165+
/// The name of the vpn link connection.
166+
/// </param>
167+
/// <param name='customHeaders'>
168+
/// The headers that will be added to request.
169+
/// </param>
170+
/// <param name='cancellationToken'>
171+
/// The cancellation token.
172+
/// </param>
173+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
174+
/// Thrown when the operation returned an invalid status code
175+
/// </exception>
176+
/// <exception cref="Microsoft.Rest.SerializationException">
177+
/// Thrown when unable to deserialize the response
178+
/// </exception>
179+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<ConnectionSharedKeyResult>> ListDefaultSharedKeyWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, string linkConnectionName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
180+
45181
/// <summary>
46182
/// Lists IKE Security Associations for Vpn Site Link Connection in the
47183
/// specified resource group.
@@ -136,6 +272,46 @@ public partial interface IVpnLinkConnectionsOperations
136272
/// </exception>
137273
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> BeginResetConnectionWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, string linkConnectionName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
138274

275+
/// <summary>
276+
/// Sets or auto generates the shared key based on the user input. If users
277+
/// give a shared key value, it does the set operation. If key length is given,
278+
/// the operation creates a random key of the pre-defined length.
279+
/// </summary>
280+
/// <remarks>
281+
/// Sets or auto generates the shared key based on the user input. If users
282+
/// give a shared key value, it does the set operation. If key length is given,
283+
/// the operation creates a random key of the pre-defined length.
284+
/// </remarks>
285+
/// <param name='resourceGroupName'>
286+
/// The resource group name of the VpnGateway.
287+
/// </param>
288+
/// <param name='gatewayName'>
289+
/// The name of the gateway.
290+
/// </param>
291+
/// <param name='connectionName'>
292+
/// The name of the connection.
293+
/// </param>
294+
/// <param name='linkConnectionName'>
295+
/// The name of the vpn link connection.
296+
/// </param>
297+
/// <param name='connectionSharedKeyParameters'>
298+
/// Parameters supplied to set or auto generate the shared key for the vpn link
299+
/// connection.
300+
/// </param>
301+
/// <param name='customHeaders'>
302+
/// The headers that will be added to request.
303+
/// </param>
304+
/// <param name='cancellationToken'>
305+
/// The cancellation token.
306+
/// </param>
307+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
308+
/// Thrown when the operation returned an invalid status code
309+
/// </exception>
310+
/// <exception cref="Microsoft.Rest.SerializationException">
311+
/// Thrown when unable to deserialize the response
312+
/// </exception>
313+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<ConnectionSharedKeyResult>> BeginSetOrInitDefaultSharedKeyWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, string linkConnectionName, ConnectionSharedKeyResult connectionSharedKeyParameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
314+
139315
/// <summary>
140316
/// Lists IKE Security Associations for Vpn Site Link Connection in the
141317
/// specified resource group.
@@ -170,6 +346,29 @@ public partial interface IVpnLinkConnectionsOperations
170346
/// </exception>
171347
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<string>> BeginGetIkeSasWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, string linkConnectionName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
172348

349+
/// <summary>
350+
/// Lists all shared keys of VpnLink connection specified.
351+
/// </summary>
352+
/// <remarks>
353+
/// Lists all shared keys of VpnLink connection specified.
354+
/// </remarks>
355+
/// <param name='nextPageLink'>
356+
/// The NextLink from the previous successful call to List operation.
357+
/// </param>
358+
/// <param name='customHeaders'>
359+
/// The headers that will be added to request.
360+
/// </param>
361+
/// <param name='cancellationToken'>
362+
/// The cancellation token.
363+
/// </param>
364+
/// <exception cref="Microsoft.Rest.Azure.CloudException">
365+
/// Thrown when the operation returned an invalid status code
366+
/// </exception>
367+
/// <exception cref="Microsoft.Rest.SerializationException">
368+
/// Thrown when unable to deserialize the response
369+
/// </exception>
370+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Rest.Azure.IPage<ConnectionSharedKeyResult>>> GetAllSharedKeysNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
371+
173372
/// <summary>
174373
/// Retrieves all vpn site link connections for a particular virtual wan vpn
175374
/// gateway vpn connection.

src/Network/Network.Management.Sdk/Generated/Models/ApplicationGatewayFirewallRule.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,19 @@ public ApplicationGatewayFirewallRule()
3636
/// <param name="action">The string representation of the web application firewall rule action.
3737
/// Possible values include: &#39;None&#39;, &#39;AnomalyScoring&#39;, &#39;Allow&#39;, &#39;Block&#39;, &#39;Log&#39;</param>
3838

39+
/// <param name="sensitivity">The string representation of the web application firewall rule sensitivity.
40+
/// Possible values include: &#39;None&#39;, &#39;Low&#39;, &#39;Medium&#39;, &#39;High&#39;</param>
41+
3942
/// <param name="description">The description of the web application firewall rule.
4043
/// </param>
41-
public ApplicationGatewayFirewallRule(int ruleId, string ruleIdString = default(string), string state = default(string), string action = default(string), string description = default(string))
44+
public ApplicationGatewayFirewallRule(int ruleId, string ruleIdString = default(string), string state = default(string), string action = default(string), string sensitivity = default(string), string description = default(string))
4245

4346
{
4447
this.RuleId = ruleId;
4548
this.RuleIdString = ruleIdString;
4649
this.State = state;
4750
this.Action = action;
51+
this.Sensitivity = sensitivity;
4852
this.Description = description;
4953
CustomInit();
5054
}
@@ -82,6 +86,13 @@ public ApplicationGatewayFirewallRule()
8286
[Newtonsoft.Json.JsonProperty(PropertyName = "action")]
8387
public string Action {get; set; }
8488

89+
/// <summary>
90+
/// Gets or sets the string representation of the web application firewall rule
91+
/// sensitivity. Possible values include: &#39;None&#39;, &#39;Low&#39;, &#39;Medium&#39;, &#39;High&#39;
92+
/// </summary>
93+
[Newtonsoft.Json.JsonProperty(PropertyName = "sensitivity")]
94+
public string Sensitivity {get; set; }
95+
8596
/// <summary>
8697
/// Gets or sets the description of the web application firewall rule.
8798
/// </summary>
@@ -99,6 +110,7 @@ public virtual void Validate()
99110

100111

101112

113+
102114
}
103115
}
104116
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.Network.Models
7+
{
8+
using System.Linq;
9+
10+
/// <summary>
11+
/// Defines an application gateway for containers reference.
12+
/// </summary>
13+
public partial class ApplicationGatewayForContainersReferenceDefinition
14+
{
15+
/// <summary>
16+
/// Initializes a new instance of the ApplicationGatewayForContainersReferenceDefinition class.
17+
/// </summary>
18+
public ApplicationGatewayForContainersReferenceDefinition()
19+
{
20+
CustomInit();
21+
}
22+
23+
/// <summary>
24+
/// Initializes a new instance of the ApplicationGatewayForContainersReferenceDefinition class.
25+
/// </summary>
26+
27+
/// <param name="id">Resource Id of the application gateway for containers.
28+
/// </param>
29+
public ApplicationGatewayForContainersReferenceDefinition(string id)
30+
31+
{
32+
this.Id = id;
33+
CustomInit();
34+
}
35+
36+
/// <summary>
37+
/// An initialization method that performs custom operations like setting defaults
38+
/// </summary>
39+
partial void CustomInit();
40+
41+
42+
/// <summary>
43+
/// Gets or sets resource Id of the application gateway for containers.
44+
/// </summary>
45+
[Newtonsoft.Json.JsonProperty(PropertyName = "id")]
46+
public string Id {get; set; }
47+
/// <summary>
48+
/// Validate the object.
49+
/// </summary>
50+
/// <exception cref="Microsoft.Rest.ValidationException">
51+
/// Thrown if validation fails
52+
/// </exception>
53+
public virtual void Validate()
54+
{
55+
if (this.Id == null)
56+
{
57+
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Id");
58+
}
59+
60+
}
61+
}
62+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.Network.Models
7+
{
8+
9+
/// <summary>
10+
/// Defines values for ApplicationGatewayWafRuleSensitivityTypes.
11+
/// </summary>
12+
13+
14+
public static class ApplicationGatewayWafRuleSensitivityTypes
15+
{
16+
public const string None = "None";
17+
public const string Low = "Low";
18+
public const string Medium = "Medium";
19+
public const string High = "High";
20+
}
21+
}

0 commit comments

Comments
 (0)