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 CreateRuleGroup API operation.

Syntax

New-NWFWRuleGroup
-RuleGroupName <String>
-Capacity <Int32>
-StatelessRulesAndCustomActions_CustomAction <CustomAction[]>
-Description <String>
-DryRun <Boolean>
-RulesSourceList_GeneratedRulesType <GeneratedRulesType>
-RuleVariables_IPSet <Hashtable>
-RuleVariables_PortSet <Hashtable>
-StatefulRuleOptions_RuleOrder <RuleOrder>
-Rule <String>
-RulesSource_RulesString <String>
-RulesSource_StatefulRule <StatefulRule[]>
-StatelessRulesAndCustomActions_StatelessRule <StatelessRule[]>
-Tag <Tag[]>
-RulesSourceList_Target <String[]>
-RulesSourceList_TargetType <String[]>
-Type <RuleGroupType>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>

Description

Creates the specified stateless or stateful rule group, which includes the rules for network traffic inspection, a capacity setting, and tags. You provide your rule group specification in your request using either RuleGroup or Rules.

Parameters

-Capacity <Int32>
The maximum operating resources that this rule group can use. Rule group capacity is fixed at creation. When you update a rule group, you are limited to this capacity. When you reference a rule group from a firewall policy, Network Firewall reserves this capacity for the rule group. You can retrieve the capacity that would be required for a rule group before you create the rule group by calling CreateRuleGroup with DryRun set to TRUE.You can't change or exceed this capacity when you update the rule group, so leave room for your rule group to grow. Capacity for a stateless rule groupFor a stateless rule group, the capacity required is the sum of the capacity requirements of the individual rules that you expect to have in the rule group. To calculate the capacity requirement of a single rule, multiply the capacity requirement values of each of the rule's match settings:
  • A match setting with no criteria specified has a value of 1.
  • A match setting with Any specified has a value of 1.
  • All other match settings have a value equal to the number of elements provided in the setting. For example, a protocol setting ["UDP"] and a source setting ["10.0.0.0/24"] each have a value of 1. A protocol setting ["UDP","TCP"] has a value of 2. A source setting ["10.0.0.0/24","10.0.0.1/24","10.0.0.2/24"] has a value of 3.
A rule with no criteria specified in any of its match settings has a capacity requirement of 1. A rule with protocol setting ["UDP","TCP"], source setting ["10.0.0.0/24","10.0.0.1/24","10.0.0.2/24"], and a single specification or no specification for each of the other match settings has a capacity requirement of 6. Capacity for a stateful rule groupFor a stateful rule group, the minimum capacity required is the number of individual rules that you expect to have in the rule group.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-Description <String>
A description of the rule group.
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)
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)
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the RuleGroupName parameter. The -PassThru parameter is deprecated, use -Select '^RuleGroupName' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Rule <String>
A string containing stateful rule group rules specifications in Suricata flat format, with one rule per line. Use this to import your existing Suricata compatible rule groups. You must provide either this rules setting or a populated RuleGroup setting, but not both. You can provide your rule group specification in Suricata flat format through this setting when you create or update your rule group. The call response returns a RuleGroup object that Network Firewall has populated from your string.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRules
-RuleGroupName <String>
The descriptive name of the rule group. You can't change the name of a rule group after you create it.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-RulesSource_RulesString <String>
Stateful inspection criteria, provided in Suricata compatible intrusion prevention system (IPS) rules. Suricata is an open-source network IPS that includes a standard rule-based language for network traffic inspection.These rules contain the inspection criteria and the action to take for traffic that matches the criteria, so this type of rule group doesn't have a separate action setting.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRuleGroup_RulesSource_RulesString
-RulesSource_StatefulRule <StatefulRule[]>
An array of individual stateful rules inspection criteria to be used together in a stateful rule group. Use this option to specify simple Suricata rules with protocol, source and destination, ports, direction, and rule options. For information about the Suricata Rules format, see Rules Format.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRuleGroup_RulesSource_StatefulRules
-RulesSourceList_GeneratedRulesType <GeneratedRulesType>
Whether you want to allow or deny access to the domains in your target list.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRuleGroup_RulesSource_RulesSourceList_GeneratedRulesType
-RulesSourceList_Target <String[]>
The domains that you want to inspect for in your traffic flows. To provide multiple domains, separate them with commas. Valid domain specifications are the following:
  • Explicit names. For example, abc.example.com matches only the domain abc.example.com.
  • Names that use a domain wildcard, which you indicate with an initial '.'. For example,.example.com matches example.com and matches all subdomains of example.com, such as abc.example.com and www.example.com.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRuleGroup_RulesSource_RulesSourceList_Targets
-RulesSourceList_TargetType <String[]>
The protocols you want to inspect. Specify TLS_SNI for HTTPS. Specify HTTP_HOST for HTTP. You can specify either or both.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRuleGroup_RulesSource_RulesSourceList_TargetTypes
-RuleVariables_IPSet <Hashtable>
A list of IP addresses and address ranges, in CIDR notation.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRuleGroup_RuleVariables_IPSets
-RuleVariables_PortSet <Hashtable>
A list of port ranges.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRuleGroup_RuleVariables_PortSets
-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.CreateRuleGroupResponse). Specifying the name of a property of type Amazon.NetworkFirewall.Model.CreateRuleGroupResponse 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)
-StatefulRuleOptions_RuleOrder <RuleOrder>
Indicates how to manage the order of the rule evaluation for the rule group. By default, Network Firewall leaves the rule evaluation order up to the Suricata rule processing engine. If you set this to STRICT_ORDER, your rules are evaluated in the exact order that they're listed in your Suricata rules string.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRuleGroup_StatefulRuleOptions_RuleOrder
-StatelessRulesAndCustomActions_CustomAction <CustomAction[]>
Defines an array of individual custom action definitions that are available for use by the stateless rules in this StatelessRulesAndCustomActions specification. You name each custom action that you define, and then you can use it by name in your StatelessRuleRuleDefinitionActions specification.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRuleGroup_RulesSource_StatelessRulesAndCustomActions_CustomActions
-StatelessRulesAndCustomActions_StatelessRule <StatelessRule[]>
Defines the set of stateless rules for use in a stateless rule group.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRuleGroup_RulesSource_StatelessRulesAndCustomActions_StatelessRules
-Tag <Tag[]>
The key:value pairs to associate with the resource.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains stateless rules. If it is stateful, it contains stateful rules.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)

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.CreateRuleGroupResponse object containing multiple properties. The object can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

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