Struct aws_sdk_ec2::model::AnalysisAclRule
source · #[non_exhaustive]pub struct AnalysisAclRule { /* private fields */ }
Expand description
Describes a network access control (ACL) rule.
Implementations§
source§impl AnalysisAclRule
impl AnalysisAclRule
sourcepub fn port_range(&self) -> Option<&PortRange>
pub fn port_range(&self) -> Option<&PortRange>
The range of ports.
sourcepub fn rule_action(&self) -> Option<&str>
pub fn rule_action(&self) -> Option<&str>
Indicates whether to allow or deny traffic that matches the rule.
sourcepub fn rule_number(&self) -> Option<i32>
pub fn rule_number(&self) -> Option<i32>
The rule number.
source§impl AnalysisAclRule
impl AnalysisAclRule
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture AnalysisAclRule
.
Examples found in repository?
src/xml_deser.rs (line 67484)
67480 67481 67482 67483 67484 67485 67486 67487 67488 67489 67490 67491 67492 67493 67494 67495 67496 67497 67498 67499 67500 67501 67502 67503 67504 67505 67506 67507 67508 67509 67510 67511 67512 67513 67514 67515 67516 67517 67518 67519 67520 67521 67522 67523 67524 67525 67526 67527 67528 67529 67530 67531 67532 67533 67534 67535 67536 67537 67538 67539 67540 67541 67542 67543 67544 67545 67546 67547 67548 67549 67550 67551 67552 67553 67554 67555 67556 67557 67558 67559 67560 67561 67562 67563 67564 67565 67566 67567 67568 67569 67570
pub fn deser_structure_crate_model_analysis_acl_rule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalysisAclRule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AnalysisAclRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidr") /* Cidr com.amazonaws.ec2#AnalysisAclRule$Cidr */ => {
let var_3326 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr(var_3326);
}
,
s if s.matches("egress") /* Egress com.amazonaws.ec2#AnalysisAclRule$Egress */ => {
let var_3327 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_egress(var_3327);
}
,
s if s.matches("portRange") /* PortRange com.amazonaws.ec2#AnalysisAclRule$PortRange */ => {
let var_3328 =
Some(
crate::xml_deser::deser_structure_crate_model_port_range(&mut tag)
?
)
;
builder = builder.set_port_range(var_3328);
}
,
s if s.matches("protocol") /* Protocol com.amazonaws.ec2#AnalysisAclRule$Protocol */ => {
let var_3329 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_protocol(var_3329);
}
,
s if s.matches("ruleAction") /* RuleAction com.amazonaws.ec2#AnalysisAclRule$RuleAction */ => {
let var_3330 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_rule_action(var_3330);
}
,
s if s.matches("ruleNumber") /* RuleNumber com.amazonaws.ec2#AnalysisAclRule$RuleNumber */ => {
let var_3331 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_rule_number(var_3331);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for AnalysisAclRule
impl Clone for AnalysisAclRule
source§fn clone(&self) -> AnalysisAclRule
fn clone(&self) -> AnalysisAclRule
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more