Struct aws_sdk_ec2::model::NetworkAclEntry
source · #[non_exhaustive]pub struct NetworkAclEntry { /* private fields */ }
Expand description
Describes an entry in a network ACL.
Implementations§
source§impl NetworkAclEntry
impl NetworkAclEntry
sourcepub fn cidr_block(&self) -> Option<&str>
pub fn cidr_block(&self) -> Option<&str>
The IPv4 network range to allow or deny, in CIDR notation.
sourcepub fn egress(&self) -> Option<bool>
pub fn egress(&self) -> Option<bool>
Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).
sourcepub fn icmp_type_code(&self) -> Option<&IcmpTypeCode>
pub fn icmp_type_code(&self) -> Option<&IcmpTypeCode>
ICMP protocol: The ICMP type and code.
sourcepub fn ipv6_cidr_block(&self) -> Option<&str>
pub fn ipv6_cidr_block(&self) -> Option<&str>
The IPv6 network range to allow or deny, in CIDR notation.
sourcepub fn port_range(&self) -> Option<&PortRange>
pub fn port_range(&self) -> Option<&PortRange>
TCP or UDP protocols: The range of ports the rule applies to.
sourcepub fn protocol(&self) -> Option<&str>
pub fn protocol(&self) -> Option<&str>
The protocol number. A value of "-1" means all protocols.
sourcepub fn rule_action(&self) -> Option<&RuleAction>
pub fn rule_action(&self) -> Option<&RuleAction>
Indicates whether to allow or deny the traffic that matches the rule.
sourcepub fn rule_number(&self) -> Option<i32>
pub fn rule_number(&self) -> Option<i32>
The rule number for the entry. ACL entries are processed in ascending order by rule number.
source§impl NetworkAclEntry
impl NetworkAclEntry
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture NetworkAclEntry
.
Examples found in repository?
src/xml_deser.rs (line 57037)
57033 57034 57035 57036 57037 57038 57039 57040 57041 57042 57043 57044 57045 57046 57047 57048 57049 57050 57051 57052 57053 57054 57055 57056 57057 57058 57059 57060 57061 57062 57063 57064 57065 57066 57067 57068 57069 57070 57071 57072 57073 57074 57075 57076 57077 57078 57079 57080 57081 57082 57083 57084 57085 57086 57087 57088 57089 57090 57091 57092 57093 57094 57095 57096 57097 57098 57099 57100 57101 57102 57103 57104 57105 57106 57107 57108 57109 57110 57111 57112 57113 57114 57115 57116 57117 57118 57119 57120 57121 57122 57123 57124 57125 57126 57127 57128 57129 57130 57131 57132 57133 57134 57135 57136 57137 57138 57139 57140 57141 57142 57143 57144 57145 57146 57147
pub fn deser_structure_crate_model_network_acl_entry(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkAclEntry, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkAclEntry::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidrBlock") /* CidrBlock com.amazonaws.ec2#NetworkAclEntry$CidrBlock */ => {
let var_2771 =
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_block(var_2771);
}
,
s if s.matches("egress") /* Egress com.amazonaws.ec2#NetworkAclEntry$Egress */ => {
let var_2772 =
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_2772);
}
,
s if s.matches("icmpTypeCode") /* IcmpTypeCode com.amazonaws.ec2#NetworkAclEntry$IcmpTypeCode */ => {
let var_2773 =
Some(
crate::xml_deser::deser_structure_crate_model_icmp_type_code(&mut tag)
?
)
;
builder = builder.set_icmp_type_code(var_2773);
}
,
s if s.matches("ipv6CidrBlock") /* Ipv6CidrBlock com.amazonaws.ec2#NetworkAclEntry$Ipv6CidrBlock */ => {
let var_2774 =
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_ipv6_cidr_block(var_2774);
}
,
s if s.matches("portRange") /* PortRange com.amazonaws.ec2#NetworkAclEntry$PortRange */ => {
let var_2775 =
Some(
crate::xml_deser::deser_structure_crate_model_port_range(&mut tag)
?
)
;
builder = builder.set_port_range(var_2775);
}
,
s if s.matches("protocol") /* Protocol com.amazonaws.ec2#NetworkAclEntry$Protocol */ => {
let var_2776 =
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_2776);
}
,
s if s.matches("ruleAction") /* RuleAction com.amazonaws.ec2#NetworkAclEntry$RuleAction */ => {
let var_2777 =
Some(
Result::<crate::model::RuleAction, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::RuleAction::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_rule_action(var_2777);
}
,
s if s.matches("ruleNumber") /* RuleNumber com.amazonaws.ec2#NetworkAclEntry$RuleNumber */ => {
let var_2778 =
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_2778);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for NetworkAclEntry
impl Clone for NetworkAclEntry
source§fn clone(&self) -> NetworkAclEntry
fn clone(&self) -> NetworkAclEntry
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