public override void ExecuteCmdlet() { base.ExecuteCmdlet(); var psAzureFirewallFqdnTags = AzureFirewallFqdnTagHelper.GetAzureFirewallAllowedFqdnTags(this.AzureFirewallFqdnTagClient); WriteObject(psAzureFirewallFqdnTags, true); }
public override void Execute() { base.Execute(); if (FqdnTag != null) { this.Protocol = PSAzureFirewallApplicationRuleProtocol.AllProtocols().ToArray(); FqdnTag = AzureFirewallFqdnTagHelper.MapUserInputToAllowedFqdnTags(FqdnTag, this.AzureFirewallFqdnTagClient).ToArray(); } var protocolsAsWeExpectThem = MapUserProtocolsToFirewallProtocols(Protocol?.ToList()); var applicationRule = new PSAzureFirewallApplicationRule { Name = this.Name, Description = this.Description, SourceAddresses = this.SourceAddress?.ToList(), SourceIpGroups = this.SourceIpGroup?.ToList(), Protocols = protocolsAsWeExpectThem, TargetFqdns = this.TargetFqdn?.ToList(), FqdnTags = this.FqdnTag?.ToList() }; WriteObject(applicationRule); }
public override void Execute() { base.Execute(); if (FqdnTag != null) { this.Protocol = new string[] { "http", "https" }; FqdnTag = AzureFirewallFqdnTagHelper.MapUserInputToAllowedFqdnTags(FqdnTag, this.AzureFirewallPolicyFqdnTagClient).ToArray(); } var protocolsAsWeExpectThem = MapUserProtocolsToFirewallPolicyProtocols(Protocol?.ToList()); var applicationRule = new PSAzureFirewallPolicyApplicationRule { Name = this.Name, SourceAddresses = this.SourceAddress?.ToList(), SourceIpGroups = this.SourceIpGroup?.ToList(), Protocols = protocolsAsWeExpectThem, TargetFqdns = this.TargetFqdn?.ToList(), FqdnTags = this.FqdnTag?.ToList(), RuleType = "ApplicationRule" }; WriteObject(applicationRule); }
public override void Execute() { base.Execute(); if (FqdnTag != null) { this.Protocol = new List <string> { "http", "https" }; FqdnTag = AzureFirewallFqdnTagHelper.MapUserInputToAllowedFqdnTags(FqdnTag); } var protocolsAsWeExpectThem = MapUserProtocolsToFirewallProtocols(Protocol); var applicationRule = new PSAzureFirewallApplicationRule { Name = this.Name, Description = this.Description, SourceAddresses = this.SourceAddress, Protocols = protocolsAsWeExpectThem, TargetFqdns = this.TargetFqdn, FqdnTags = this.FqdnTag }; WriteObject(applicationRule); }