Skip to content

Commit 343652d

Browse files
committed
add SqlSetting property to set az firewall policy operation
1 parent 9e05424 commit 343652d

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/Network/Network/AzureFirewallPolicy/NewAzureFirewallPolicyCommand.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ public class NewAzureFirewallPolicyCommand : AzureFirewallPolicyBaseCmdlet
8080

8181
[Parameter(
8282
Mandatory = false,
83-
HelpMessage = "The SQL related setting"
84-
)]
83+
HelpMessage = "The SQL related setting")]
8584
public PSAzureFirewallPolicySqlSettings SqlSetting { get; set; }
8685

8786
[Parameter(

src/Network/Network/AzureFirewallPolicy/SetAzureFirewallPolicyCommand.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ public class SetAzureFirewallPolicyCommand : AzureFirewallPolicyBaseCmdlet
9898
HelpMessage = "The DNS Setting")]
9999
public PSAzureFirewallPolicyDnsSettings DnsSetting { get; set; }
100100

101+
[Parameter(
102+
Mandatory = false,
103+
HelpMessage = "The SQL related setting")]
104+
public PSAzureFirewallPolicySqlSettings SqlSetting { get; set; }
105+
101106
[Parameter(
102107
Mandatory = true,
103108
ValueFromPipelineByPropertyName = true,
@@ -231,6 +236,7 @@ public override void Execute()
231236
this.ThreatIntelWhitelist = this.IsParameterBound(c => c.ThreatIntelWhitelist) ? ThreatIntelWhitelist : InputObject.ThreatIntelWhitelist;
232237
this.BasePolicy = this.IsParameterBound(c => c.BasePolicy) ? BasePolicy : (InputObject.BasePolicy != null ? InputObject.BasePolicy.Id : null);
233238
this.DnsSetting = this.IsParameterBound(c => c.DnsSetting) ? DnsSetting : (InputObject.DnsSettings != null ? InputObject.DnsSettings : null);
239+
this.SqlSetting = this.IsParameterBound(c => c.SqlSetting) ? SqlSetting : (InputObject.SqlSettings != null ? InputObject.SqlSettings : null);
234240
this.IntrusionDetection = this.IsParameterBound(c => c.IntrusionDetection) ? IntrusionDetection : (InputObject.IntrusionDetection != null ? InputObject.IntrusionDetection : null);
235241
this.TransportSecurityName = this.IsParameterBound(c => c.TransportSecurityName) ? TransportSecurityName : (InputObject.TransportSecurity?.CertificateAuthority != null ? InputObject.TransportSecurity.CertificateAuthority.Name : null);
236242
this.TransportSecurityKeyVaultSecretId = this.IsParameterBound(c => c.TransportSecurityKeyVaultSecretId) ? TransportSecurityKeyVaultSecretId : (InputObject.TransportSecurity?.CertificateAuthority != null ? InputObject.TransportSecurity.CertificateAuthority.KeyVaultSecretId : null);
@@ -248,6 +254,7 @@ public override void Execute()
248254
ThreatIntelWhitelist = this.ThreatIntelWhitelist,
249255
BasePolicy = this.BasePolicy != null ? new Microsoft.Azure.Management.Network.Models.SubResource(this.BasePolicy) : null,
250256
DnsSettings = this.DnsSetting,
257+
SqlSettings = this.SqlSetting,
251258
PrivateRange = this.PrivateRange
252259
};
253260

@@ -271,6 +278,7 @@ public override void Execute()
271278
ThreatIntelWhitelist = this.ThreatIntelWhitelist,
272279
BasePolicy = BasePolicy != null ? new Microsoft.Azure.Management.Network.Models.SubResource(BasePolicy) : null,
273280
DnsSettings = this.DnsSetting,
281+
SqlSettings = this.SqlSetting,
274282
PrivateRange = this.PrivateRange
275283
};
276284

src/Network/Network/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* Added new property `SqlSetting` for Azure Firewall Policy cmdlets
2323
- `Get-AzFirewallPolicy`
2424
- `New-AzFirewallPolicy`
25+
- `Set-AzFirewallPolicy`
2526
* Added new to create new `SqlSetting` object for creating Azure Firewall Policy
2627
- `New-AzFirewallPolicySqlSetting`
2728

0 commit comments

Comments
 (0)