#[non_exhaustive]pub struct CreateRuleGroupInput {
pub rule_group_name: Option<String>,
pub rule_group: Option<RuleGroup>,
pub rules: Option<String>,
pub type: Option<RuleGroupType>,
pub description: Option<String>,
pub capacity: Option<i32>,
pub tags: Option<Vec<Tag>>,
pub dry_run: Option<bool>,
pub encryption_configuration: Option<EncryptionConfiguration>,
pub source_metadata: Option<SourceMetadata>,
pub analyze_rule_group: Option<bool>,
pub summary_configuration: Option<SummaryConfiguration>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.rule_group_name: Option<String>
The descriptive name of the rule group. You can't change the name of a rule group after you create it.
rule_group: Option<RuleGroup>
An object that defines the rule group rules.
You must provide either this rule group setting or a Rules
setting, but not both.
rules: Option<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.
type: Option<RuleGroupType>
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.
description: Option<String>
A description of the rule group.
capacity: Option<i32>
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 group
For 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 group
For a stateful rule group, the minimum capacity required is the number of individual rules that you expect to have in the rule group.
The key:value pairs to associate with the resource.
dry_run: Option<bool>
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.
encryption_configuration: Option<EncryptionConfiguration>
A complex type that contains settings for encryption of your rule group resources.
source_metadata: Option<SourceMetadata>
A complex type that contains metadata about the rule group that your own rule group is copied from. You can use the metadata to keep track of updates made to the originating rule group.
analyze_rule_group: Option<bool>
Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule behavior such as asymmetric routing. If set to TRUE
, Network Firewall runs the analysis and then creates the rule group for you. To run the stateless rule group analyzer without creating the rule group, set DryRun
to TRUE
.
summary_configuration: Option<SummaryConfiguration>
An object that contains a RuleOptions
array of strings. You use RuleOptions
to determine which of the following RuleSummary
values are returned in response to DescribeRuleGroupSummary
.
-
Metadata
- returns -
Msg
-
SID
Implementations§
Source§impl CreateRuleGroupInput
impl CreateRuleGroupInput
Sourcepub fn rule_group_name(&self) -> Option<&str>
pub fn rule_group_name(&self) -> Option<&str>
The descriptive name of the rule group. You can't change the name of a rule group after you create it.
Sourcepub fn rule_group(&self) -> Option<&RuleGroup>
pub fn rule_group(&self) -> Option<&RuleGroup>
An object that defines the rule group rules.
You must provide either this rule group setting or a Rules
setting, but not both.
Sourcepub fn rules(&self) -> Option<&str>
pub fn rules(&self) -> Option<&str>
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.
Sourcepub fn type(&self) -> Option<&RuleGroupType>
pub fn type(&self) -> Option<&RuleGroupType>
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.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
A description of the rule group.
Sourcepub fn capacity(&self) -> Option<i32>
pub fn capacity(&self) -> Option<i32>
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 group
For 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 group
For a stateful rule group, the minimum capacity required is the number of individual rules that you expect to have in the rule group.
The key:value pairs to associate with the resource.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .tags.is_none()
.
Sourcepub fn dry_run(&self) -> Option<bool>
pub fn dry_run(&self) -> Option<bool>
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.
Sourcepub fn encryption_configuration(&self) -> Option<&EncryptionConfiguration>
pub fn encryption_configuration(&self) -> Option<&EncryptionConfiguration>
A complex type that contains settings for encryption of your rule group resources.
Sourcepub fn source_metadata(&self) -> Option<&SourceMetadata>
pub fn source_metadata(&self) -> Option<&SourceMetadata>
A complex type that contains metadata about the rule group that your own rule group is copied from. You can use the metadata to keep track of updates made to the originating rule group.
Sourcepub fn analyze_rule_group(&self) -> Option<bool>
pub fn analyze_rule_group(&self) -> Option<bool>
Indicates whether you want Network Firewall to analyze the stateless rules in the rule group for rule behavior such as asymmetric routing. If set to TRUE
, Network Firewall runs the analysis and then creates the rule group for you. To run the stateless rule group analyzer without creating the rule group, set DryRun
to TRUE
.
Sourcepub fn summary_configuration(&self) -> Option<&SummaryConfiguration>
pub fn summary_configuration(&self) -> Option<&SummaryConfiguration>
An object that contains a RuleOptions
array of strings. You use RuleOptions
to determine which of the following RuleSummary
values are returned in response to DescribeRuleGroupSummary
.
-
Metadata
- returns -
Msg
-
SID
Source§impl CreateRuleGroupInput
impl CreateRuleGroupInput
Sourcepub fn builder() -> CreateRuleGroupInputBuilder
pub fn builder() -> CreateRuleGroupInputBuilder
Creates a new builder-style object to manufacture CreateRuleGroupInput
.
Trait Implementations§
Source§impl Clone for CreateRuleGroupInput
impl Clone for CreateRuleGroupInput
Source§fn clone(&self) -> CreateRuleGroupInput
fn clone(&self) -> CreateRuleGroupInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CreateRuleGroupInput
impl Debug for CreateRuleGroupInput
Source§impl PartialEq for CreateRuleGroupInput
impl PartialEq for CreateRuleGroupInput
impl StructuralPartialEq for CreateRuleGroupInput
Auto Trait Implementations§
impl Freeze for CreateRuleGroupInput
impl RefUnwindSafe for CreateRuleGroupInput
impl Send for CreateRuleGroupInput
impl Sync for CreateRuleGroupInput
impl Unpin for CreateRuleGroupInput
impl UnwindSafe for CreateRuleGroupInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);