#[non_exhaustive]pub struct CreateRuleGroupInputBuilder { /* private fields */ }
Expand description
A builder for CreateRuleGroupInput
.
Implementations§
Source§impl CreateRuleGroupInputBuilder
impl CreateRuleGroupInputBuilder
Sourcepub fn rule_group_name(self, input: impl Into<String>) -> Self
pub fn rule_group_name(self, input: impl Into<String>) -> Self
The descriptive name of the rule group. You can't change the name of a rule group after you create it.
This field is required.Sourcepub fn set_rule_group_name(self, input: Option<String>) -> Self
pub fn set_rule_group_name(self, input: Option<String>) -> Self
The descriptive name of the rule group. You can't change the name of a rule group after you create it.
Sourcepub fn get_rule_group_name(&self) -> &Option<String>
pub fn get_rule_group_name(&self) -> &Option<String>
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, input: RuleGroup) -> Self
pub fn rule_group(self, input: RuleGroup) -> Self
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 set_rule_group(self, input: Option<RuleGroup>) -> Self
pub fn set_rule_group(self, input: Option<RuleGroup>) -> Self
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 get_rule_group(&self) -> &Option<RuleGroup>
pub fn get_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, input: impl Into<String>) -> Self
pub fn rules(self, input: impl Into<String>) -> Self
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 set_rules(self, input: Option<String>) -> Self
pub fn set_rules(self, input: Option<String>) -> Self
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 get_rules(&self) -> &Option<String>
pub fn get_rules(&self) -> &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.
Sourcepub fn type(self, input: RuleGroupType) -> Self
pub fn type(self, input: RuleGroupType) -> Self
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.
This field is required.Sourcepub fn set_type(self, input: Option<RuleGroupType>) -> Self
pub fn set_type(self, input: Option<RuleGroupType>) -> Self
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 get_type(&self) -> &Option<RuleGroupType>
pub fn get_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, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
A description of the rule group.
Sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
A description of the rule group.
Sourcepub fn get_description(&self) -> &Option<String>
pub fn get_description(&self) -> &Option<String>
A description of the rule group.
Sourcepub fn capacity(self, input: i32) -> Self
pub fn capacity(self, input: i32) -> Self
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.
This field is required.Sourcepub fn set_capacity(self, input: Option<i32>) -> Self
pub fn set_capacity(self, input: Option<i32>) -> Self
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.
Sourcepub fn get_capacity(&self) -> &Option<i32>
pub fn get_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.
Appends an item to tags
.
To override the contents of this collection use set_tags
.
The key:value pairs to associate with the resource.
The key:value pairs to associate with the resource.
The key:value pairs to associate with the resource.
Sourcepub fn dry_run(self, input: bool) -> Self
pub fn dry_run(self, input: bool) -> Self
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 set_dry_run(self, input: Option<bool>) -> Self
pub fn set_dry_run(self, input: Option<bool>) -> Self
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 get_dry_run(&self) -> &Option<bool>
pub fn get_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, input: EncryptionConfiguration) -> Self
pub fn encryption_configuration(self, input: EncryptionConfiguration) -> Self
A complex type that contains settings for encryption of your rule group resources.
Sourcepub fn set_encryption_configuration(
self,
input: Option<EncryptionConfiguration>,
) -> Self
pub fn set_encryption_configuration( self, input: Option<EncryptionConfiguration>, ) -> Self
A complex type that contains settings for encryption of your rule group resources.
Sourcepub fn get_encryption_configuration(&self) -> &Option<EncryptionConfiguration>
pub fn get_encryption_configuration(&self) -> &Option<EncryptionConfiguration>
A complex type that contains settings for encryption of your rule group resources.
Sourcepub fn source_metadata(self, input: SourceMetadata) -> Self
pub fn source_metadata(self, input: SourceMetadata) -> Self
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 set_source_metadata(self, input: Option<SourceMetadata>) -> Self
pub fn set_source_metadata(self, input: Option<SourceMetadata>) -> Self
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 get_source_metadata(&self) -> &Option<SourceMetadata>
pub fn get_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, input: bool) -> Self
pub fn analyze_rule_group(self, input: bool) -> Self
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 set_analyze_rule_group(self, input: Option<bool>) -> Self
pub fn set_analyze_rule_group(self, input: Option<bool>) -> Self
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 get_analyze_rule_group(&self) -> &Option<bool>
pub fn get_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, input: SummaryConfiguration) -> Self
pub fn summary_configuration(self, input: SummaryConfiguration) -> Self
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
Sourcepub fn set_summary_configuration(
self,
input: Option<SummaryConfiguration>,
) -> Self
pub fn set_summary_configuration( self, input: Option<SummaryConfiguration>, ) -> Self
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
Sourcepub fn get_summary_configuration(&self) -> &Option<SummaryConfiguration>
pub fn get_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
Sourcepub fn build(self) -> Result<CreateRuleGroupInput, BuildError>
pub fn build(self) -> Result<CreateRuleGroupInput, BuildError>
Consumes the builder and constructs a CreateRuleGroupInput
.
Source§impl CreateRuleGroupInputBuilder
impl CreateRuleGroupInputBuilder
Sourcepub async fn send_with(
self,
client: &Client,
) -> Result<CreateRuleGroupOutput, SdkError<CreateRuleGroupError, HttpResponse>>
pub async fn send_with( self, client: &Client, ) -> Result<CreateRuleGroupOutput, SdkError<CreateRuleGroupError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
Source§impl Clone for CreateRuleGroupInputBuilder
impl Clone for CreateRuleGroupInputBuilder
Source§fn clone(&self) -> CreateRuleGroupInputBuilder
fn clone(&self) -> CreateRuleGroupInputBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CreateRuleGroupInputBuilder
impl Debug for CreateRuleGroupInputBuilder
Source§impl Default for CreateRuleGroupInputBuilder
impl Default for CreateRuleGroupInputBuilder
Source§fn default() -> CreateRuleGroupInputBuilder
fn default() -> CreateRuleGroupInputBuilder
impl StructuralPartialEq for CreateRuleGroupInputBuilder
Auto Trait Implementations§
impl Freeze for CreateRuleGroupInputBuilder
impl RefUnwindSafe for CreateRuleGroupInputBuilder
impl Send for CreateRuleGroupInputBuilder
impl Sync for CreateRuleGroupInputBuilder
impl Unpin for CreateRuleGroupInputBuilder
impl UnwindSafe for CreateRuleGroupInputBuilder
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);