AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the AWS Network Firewall CreateFirewallPolicy API operation.

Syntax

New-NWFWFirewallPolicy
-FirewallPolicyName <String>
-FirewallPolicy_Route53ResolvedIPValidation_Action <Route53ResolvedIPValidationAction>
-FirewallPolicy_Route53ResolvedIPValidation_BypassDestinationValidationIPRange <Address[]>
-Description <String>
-FirewallPolicy_Route53ResolvedIPValidation_DNSExpiryExceptionPolicy <DNSExpiryExceptionPolicy>
-FirewallPolicy_Route53ResolvedIPValidation_DNSFirewallRuleGroupId <String>
-DryRun <Boolean>
-FirewallPolicy_EnableTLSSessionHolding <Boolean>
-EncryptionConfiguration_KeyId <String>
-StatefulEngineOptions_RuleOrder <RuleOrder>
-PolicyVariables_RuleVariable <Hashtable>
-FirewallPolicy_Route53ResolvedIPValidation_SourceIPRange <Address[]>
-FirewallPolicy_StatefulDefaultAction <String[]>
-FirewallPolicy_StatefulRuleGroupReference <StatefulRuleGroupReference[]>
-FirewallPolicy_StatelessCustomAction <CustomAction[]>
-FirewallPolicy_StatelessDefaultAction <String[]>
-FirewallPolicy_StatelessFragmentDefaultAction <String[]>
-FirewallPolicy_StatelessRuleGroupReference <StatelessRuleGroupReference[]>
-StatefulEngineOptions_StreamExceptionPolicy <StreamExceptionPolicy>
-Tag <Tag[]>
-FlowTimeouts_TcpIdleTimeoutSecond <Int32>
-FirewallPolicy_TLSInspectionConfigurationArn <String>
-EncryptionConfiguration_Type <EncryptionType>
-Select <String>
-Force <SwitchParameter>
-ClientConfig <AmazonNetworkFirewallConfig>

Description

Creates the firewall policy for the firewall according to the specifications. An Network Firewall firewall policy defines the behavior of a firewall, in a collection of stateless and stateful rule groups and other settings. You can use one firewall policy for multiple firewalls.

Parameters

Amazon.PowerShell.Cmdlets.NWFW.AmazonNetworkFirewallClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Description <String>
A description of the firewall policy.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-DryRun <Boolean>
Indicates whether you want Network Firewall to just check the validity of the request, rather than run the request. If set to TRUE, Network Firewall checks whether the request can run successfully, but doesn't actually make the requested changes. The call returns the value that the request would return if you ran it with dry run set to FALSE, but doesn't make additions or changes to your resources. This option allows you to make sure that you have the required permissions to run the request and that your request parameters are valid. If set to FALSE, Network Firewall makes the requested changes to your resources.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-EncryptionConfiguration_KeyId <String>
The ID of the Amazon Web Services Key Management Service (KMS) customer managed key. You can use any of the key identifiers that KMS supports, unless you're using a key that's managed by another account. If you're using a key managed by another account, then specify the key ARN. For more information, see Key ID in the Amazon Web Services KMS Developer Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-EncryptionConfiguration_Type <EncryptionType>
The type of Amazon Web Services KMS key to use for encryption of your Network Firewall resources.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-FirewallPolicy_EnableTLSSessionHolding <Boolean>
When true, prevents TCP and TLS packets from reaching destination servers until TLS Inspection has evaluated Server Name Indication (SNI) rules. Requires an associated TLS Inspection configuration.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-FirewallPolicy_Route53ResolvedIPValidation_Action <Route53ResolvedIPValidationAction>
The action that Network Firewall takes for a connection whose destination IP address fails resolved IP validation. A destination IP address fails validation when the Route 53 Resolver didn't return it in a DNS response in an associated VPC. Valid values are the following:
  • ALERT – Tags the matching connection in the firewall's flow logs without blocking it, when you enable logging. Use this to observe the effect of resolved IP validation before you enforce it.
  • DROP – Silently blocks the connection without sending any response to the client.
  • REJECT – Blocks the connection and sends a TCP reset (RST) to the client. Because a TCP reset applies only to TCP connections, Network Firewall drops non-TCP traffic instead of resetting it.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-FirewallPolicy_Route53ResolvedIPValidation_BypassDestinationValidationIPRange <Address[]>
The destination IP address ranges that are exempt from the policy-level resolved IP check. Network Firewall doesn't apply the Action in this configuration to a connection whose destination falls in these ranges, even if the Route 53 Resolver didn't return that IP address in an associated VPC. Specify each entry as an IPv4 or IPv6 address or CIDR range, up to 100 entries.This exemption applies only to the policy-level check. Stateful rules that use the AWS_ROUTE_53_RESOLVED_DOMAIN target type or the aws_route_53_resolved_domain keyword still evaluate connections to these destinations and match them independently of this list. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFirewallPolicy_Route53ResolvedIPValidation_BypassDestinationValidationIPRanges
-FirewallPolicy_Route53ResolvedIPValidation_DNSExpiryExceptionPolicy <DNSExpiryExceptionPolicy>
The action that Network Firewall takes when the DNS resolution recorded for a destination IP address has expired from the resolved IP cache. This applies when Network Firewall still sees traffic to that IP address after the expiry. Network Firewall keeps a resolution for longer than the DNS record's time to live (TTL). Valid values are the following:
  • CONTINUE – Treats the expired resolution as still valid and doesn't block the connection because of expiry.
  • DROP – Silently blocks traffic to the IP address after its resolution has expired, without sending any response to the client.
  • REJECT – Blocks traffic to the IP address after its resolution has expired and sends a TCP reset (RST) to the client. Network Firewall drops non-TCP traffic instead of resetting it.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-FirewallPolicy_Route53ResolvedIPValidation_DNSFirewallRuleGroupId <String>
The ID of the Route 53 Resolver DNS Firewall rule group that determines which VPCs' DNS resolutions count for resolved IP validation. A destination IP address counts as resolved for a domain only when the Route 53 Resolver returned it in a DNS response within a VPC that's associated with this rule group. Associate the rule group with the VPCs that send traffic to the firewall. The ID must match the pattern ^rslvr-frg-[0-9a-f]+$. It must also exist and be accessible from your account. Network Firewall validates this when you create or update the policy.Changing this value swaps the managed rule group association. Network Firewall processes the swap asynchronously. Each policy can have only one managed Route 53 Resolver DNS Firewall association. While a swap is in progress, Network Firewall rejects further changes to this setting. Wait until the swap completes, then retry. The change may also require a restart of the stateful engine. When this occurs, existing connections will be treated according to your stream exception policy configuration.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-FirewallPolicy_Route53ResolvedIPValidation_SourceIPRange <Address[]>
The client source IP address ranges whose connections are subject to resolved IP validation. Specify each entry as an IPv4 or IPv6 address or CIDR range, up to 100 entries. If you omit this field, resolved IP validation applies to the CIDR ranges of the firewall's VPC and of any additional VPCs attached to the firewall. Specifying an empty list is not the same as omitting the field: an empty list means that Network Firewall doesn't validate any source addresses.This scope applies to the policy-level check only. Stateful rules that use the AWS_ROUTE_53_RESOLVED_DOMAIN target type or the aws_route_53_resolved_domain keyword still evaluate their destinations regardless of SourceIPRanges. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFirewallPolicy_Route53ResolvedIPValidation_SourceIPRanges
-FirewallPolicy_StatefulDefaultAction <String[]>
The default actions to take on a packet that doesn't match any stateful rules. The stateful default action is optional, and is only valid when using the strict rule order.Valid values of the stateful default action:
  • aws:drop_strict
  • aws:drop_established
  • aws:alert_strict
  • aws:alert_established
  • aws:drop_established_app_layer
  • aws:alert_established_app_layer
  • aws:drop_established_app_layer_to_server
  • aws:alert_established_app_layer_to_server
For more information, see Strict evaluation order in the Network Firewall Developer Guide. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFirewallPolicy_StatefulDefaultActions
-FirewallPolicy_StatefulRuleGroupReference <StatefulRuleGroupReference[]>
References to the stateful rule groups that are used in the policy. These define the inspection criteria in stateful rules. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFirewallPolicy_StatefulRuleGroupReferences
-FirewallPolicy_StatelessCustomAction <CustomAction[]>
The custom action definitions that are available for use in the firewall policy's StatelessDefaultActions setting. You name each custom action that you define, and then you can use it by name in your default actions specifications. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFirewallPolicy_StatelessCustomActions
-FirewallPolicy_StatelessDefaultAction <String[]>
The actions to take on a packet if it doesn't match any of the stateless rules in the policy. If you want non-matching packets to be forwarded for stateful inspection, specify aws:forward_to_sfe. You must specify one of the standard actions: aws:pass, aws:drop, or aws:forward_to_sfe. In addition, you can specify custom actions that are compatible with your standard section choice.For example, you could specify ["aws:pass"] or you could specify ["aws:pass", “customActionName”]. For information about compatibility, see the custom action descriptions under CustomAction. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFirewallPolicy_StatelessDefaultActions
-FirewallPolicy_StatelessFragmentDefaultAction <String[]>
The actions to take on a fragmented UDP packet if it doesn't match any of the stateless rules in the policy. Network Firewall only manages UDP packet fragments and silently drops packet fragments for other protocols. If you want non-matching fragmented UDP packets to be forwarded for stateful inspection, specify aws:forward_to_sfe.You must specify one of the standard actions: aws:pass, aws:drop, or aws:forward_to_sfe. In addition, you can specify custom actions that are compatible with your standard section choice.For example, you could specify ["aws:pass"] or you could specify ["aws:pass", “customActionName”]. For information about compatibility, see the custom action descriptions under CustomAction. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFirewallPolicy_StatelessFragmentDefaultActions
-FirewallPolicy_StatelessRuleGroupReference <StatelessRuleGroupReference[]>
References to the stateless rule groups that are used in the policy. These define the matching criteria in stateless rules. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFirewallPolicy_StatelessRuleGroupReferences
-FirewallPolicy_TLSInspectionConfigurationArn <String>
The Amazon Resource Name (ARN) of the TLS inspection configuration.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-FirewallPolicyName <String>
The descriptive name of the firewall policy. You can't change the name of a firewall policy after you create it.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-FlowTimeouts_TcpIdleTimeoutSecond <Int32>
The number of seconds that can pass without any TCP traffic sent through the firewall before the firewall determines that the connection is idle. After the idle timeout passes, data packets are dropped, however, the next TCP SYN packet is considered a new flow and is processed by the firewall. Clients or targets can use TCP keepalive packets to reset the idle timeout. You can define the TcpIdleTimeoutSeconds value to be between 60 and 6000 seconds. If no value is provided, it defaults to 350 seconds.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFirewallPolicy_StatefulEngineOptions_FlowTimeouts_TcpIdleTimeoutSeconds
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PolicyVariables_RuleVariable <Hashtable>
The IPv4 or IPv6 addresses in CIDR notation to use for the Suricata HOME_NET variable. If your firewall uses an inspection VPC, you might want to override the HOME_NET variable with the CIDRs of your home networks. If you don't override HOME_NET with your own CIDRs, Network Firewall by default uses the CIDR of your inspection VPC. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFirewallPolicy_PolicyVariables_RuleVariables
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is '*'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.NetworkFirewall.Model.CreateFirewallPolicyResponse). Specifying the name of a property of type Amazon.NetworkFirewall.Model.CreateFirewallPolicyResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StatefulEngineOptions_RuleOrder <RuleOrder>
Indicates how to manage the order of stateful rule evaluation for the policy. STRICT_ORDER is the recommended option, but DEFAULT_ACTION_ORDER is the default option. With STRICT_ORDER, provide your rules in the order that you want them to be evaluated. You can then choose one or more default actions for packets that don't match any rules. Choose STRICT_ORDER to have the stateful rules engine determine the evaluation order of your rules. The default action for this rule order is PASS, followed by DROP, REJECT, and ALERT actions. Stateful rules are provided to the rule engine as Suricata compatible strings, and Suricata evaluates them based on your settings. For more information, see Evaluation order for stateful rules in the Network Firewall Developer Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFirewallPolicy_StatefulEngineOptions_RuleOrder
-StatefulEngineOptions_StreamExceptionPolicy <StreamExceptionPolicy>
Configures how Network Firewall processes traffic when a network connection breaks midstream. Network connections can break due to disruptions in external networks or within the firewall itself.
  • DROP - Network Firewall fails closed and drops all subsequent traffic going to the firewall. This is the default behavior.
  • CONTINUE - Network Firewall continues to apply rules to the subsequent traffic without context from traffic before the break. This impacts the behavior of rules that depend on this context. For example, if you have a stateful rule to drop http traffic, Network Firewall won't match the traffic for this rule because the service won't have the context from session initialization defining the application layer protocol as HTTP. However, this behavior is rule dependent—a TCP-layer rule using a flow:stateless rule would still match, as would the aws:drop_strict default action.
  • REJECT - Network Firewall fails closed and drops all subsequent traffic going to the firewall. Network Firewall also sends a TCP reject packet back to your client so that the client can immediately establish a new session. Network Firewall will have context about the new session and will apply rules to the subsequent traffic.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFirewallPolicy_StatefulEngineOptions_StreamExceptionPolicy
-Tag <Tag[]>
The key:value pairs to associate with the resource. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.NetworkFirewall.Model.CreateFirewallPolicyResponse object containing multiple properties.

Supported Version

AWS Tools for PowerShell: 2.x.y.z