Struct aws_sdk_ec2::model::TrafficMirrorFilterRule
source · #[non_exhaustive]pub struct TrafficMirrorFilterRule { /* private fields */ }
Expand description
Describes the Traffic Mirror rule.
Implementations§
source§impl TrafficMirrorFilterRule
impl TrafficMirrorFilterRule
sourcepub fn traffic_mirror_filter_rule_id(&self) -> Option<&str>
pub fn traffic_mirror_filter_rule_id(&self) -> Option<&str>
The ID of the Traffic Mirror rule.
sourcepub fn traffic_mirror_filter_id(&self) -> Option<&str>
pub fn traffic_mirror_filter_id(&self) -> Option<&str>
The ID of the Traffic Mirror filter that the rule is associated with.
sourcepub fn traffic_direction(&self) -> Option<&TrafficDirection>
pub fn traffic_direction(&self) -> Option<&TrafficDirection>
The traffic direction assigned to the Traffic Mirror rule.
sourcepub fn rule_number(&self) -> Option<i32>
pub fn rule_number(&self) -> Option<i32>
The rule number of the Traffic Mirror rule.
sourcepub fn rule_action(&self) -> Option<&TrafficMirrorRuleAction>
pub fn rule_action(&self) -> Option<&TrafficMirrorRuleAction>
The action assigned to the Traffic Mirror rule.
sourcepub fn destination_port_range(&self) -> Option<&TrafficMirrorPortRange>
pub fn destination_port_range(&self) -> Option<&TrafficMirrorPortRange>
The destination port range assigned to the Traffic Mirror rule.
sourcepub fn source_port_range(&self) -> Option<&TrafficMirrorPortRange>
pub fn source_port_range(&self) -> Option<&TrafficMirrorPortRange>
The source port range assigned to the Traffic Mirror rule.
sourcepub fn destination_cidr_block(&self) -> Option<&str>
pub fn destination_cidr_block(&self) -> Option<&str>
The destination CIDR block assigned to the Traffic Mirror rule.
sourcepub fn source_cidr_block(&self) -> Option<&str>
pub fn source_cidr_block(&self) -> Option<&str>
The source CIDR block assigned to the Traffic Mirror rule.
sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
The description of the Traffic Mirror rule.
source§impl TrafficMirrorFilterRule
impl TrafficMirrorFilterRule
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture TrafficMirrorFilterRule
.
Examples found in repository?
src/xml_deser.rs (line 30174)
30170 30171 30172 30173 30174 30175 30176 30177 30178 30179 30180 30181 30182 30183 30184 30185 30186 30187 30188 30189 30190 30191 30192 30193 30194 30195 30196 30197 30198 30199 30200 30201 30202 30203 30204 30205 30206 30207 30208 30209 30210 30211 30212 30213 30214 30215 30216 30217 30218 30219 30220 30221 30222 30223 30224 30225 30226 30227 30228 30229 30230 30231 30232 30233 30234 30235 30236 30237 30238 30239 30240 30241 30242 30243 30244 30245 30246 30247 30248 30249 30250 30251 30252 30253 30254 30255 30256 30257 30258 30259 30260 30261 30262 30263 30264 30265 30266 30267 30268 30269 30270 30271 30272 30273 30274 30275 30276 30277 30278 30279 30280 30281 30282 30283 30284 30285 30286 30287 30288 30289 30290 30291 30292 30293 30294 30295 30296 30297 30298 30299 30300 30301 30302 30303 30304 30305 30306 30307 30308 30309 30310 30311 30312 30313 30314 30315 30316 30317 30318 30319 30320 30321 30322 30323 30324
pub fn deser_structure_crate_model_traffic_mirror_filter_rule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TrafficMirrorFilterRule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::TrafficMirrorFilterRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorFilterRuleId") /* TrafficMirrorFilterRuleId com.amazonaws.ec2#TrafficMirrorFilterRule$TrafficMirrorFilterRuleId */ => {
let var_1302 =
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_traffic_mirror_filter_rule_id(var_1302);
}
,
s if s.matches("trafficMirrorFilterId") /* TrafficMirrorFilterId com.amazonaws.ec2#TrafficMirrorFilterRule$TrafficMirrorFilterId */ => {
let var_1303 =
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_traffic_mirror_filter_id(var_1303);
}
,
s if s.matches("trafficDirection") /* TrafficDirection com.amazonaws.ec2#TrafficMirrorFilterRule$TrafficDirection */ => {
let var_1304 =
Some(
Result::<crate::model::TrafficDirection, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::TrafficDirection::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_traffic_direction(var_1304);
}
,
s if s.matches("ruleNumber") /* RuleNumber com.amazonaws.ec2#TrafficMirrorFilterRule$RuleNumber */ => {
let var_1305 =
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_1305);
}
,
s if s.matches("ruleAction") /* RuleAction com.amazonaws.ec2#TrafficMirrorFilterRule$RuleAction */ => {
let var_1306 =
Some(
Result::<crate::model::TrafficMirrorRuleAction, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::TrafficMirrorRuleAction::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_rule_action(var_1306);
}
,
s if s.matches("protocol") /* Protocol com.amazonaws.ec2#TrafficMirrorFilterRule$Protocol */ => {
let var_1307 =
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_protocol(var_1307);
}
,
s if s.matches("destinationPortRange") /* DestinationPortRange com.amazonaws.ec2#TrafficMirrorFilterRule$DestinationPortRange */ => {
let var_1308 =
Some(
crate::xml_deser::deser_structure_crate_model_traffic_mirror_port_range(&mut tag)
?
)
;
builder = builder.set_destination_port_range(var_1308);
}
,
s if s.matches("sourcePortRange") /* SourcePortRange com.amazonaws.ec2#TrafficMirrorFilterRule$SourcePortRange */ => {
let var_1309 =
Some(
crate::xml_deser::deser_structure_crate_model_traffic_mirror_port_range(&mut tag)
?
)
;
builder = builder.set_source_port_range(var_1309);
}
,
s if s.matches("destinationCidrBlock") /* DestinationCidrBlock com.amazonaws.ec2#TrafficMirrorFilterRule$DestinationCidrBlock */ => {
let var_1310 =
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_destination_cidr_block(var_1310);
}
,
s if s.matches("sourceCidrBlock") /* SourceCidrBlock com.amazonaws.ec2#TrafficMirrorFilterRule$SourceCidrBlock */ => {
let var_1311 =
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_source_cidr_block(var_1311);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#TrafficMirrorFilterRule$Description */ => {
let var_1312 =
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_description(var_1312);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for TrafficMirrorFilterRule
impl Clone for TrafficMirrorFilterRule
source§fn clone(&self) -> TrafficMirrorFilterRule
fn clone(&self) -> TrafficMirrorFilterRule
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