#[non_exhaustive]
pub struct SecurityGroupRule { /* private fields */ }
Expand description

Describes a security group rule.

Implementations§

The ID of the security group rule.

The ID of the security group.

The ID of the Amazon Web Services account that owns the security group.

Indicates whether the security group rule is an outbound rule.

The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

Use -1 to specify all protocols.

The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

The IPv4 CIDR range.

The IPv6 CIDR range.

The ID of the prefix list.

Describes the security group that is referenced in the rule.

The security group rule description.

The tags applied to the security group rule.

Creates a new builder-style object to manufacture SecurityGroupRule.

Examples found in repository?
src/xml_deser.rs (line 39472)
39468
39469
39470
39471
39472
39473
39474
39475
39476
39477
39478
39479
39480
39481
39482
39483
39484
39485
39486
39487
39488
39489
39490
39491
39492
39493
39494
39495
39496
39497
39498
39499
39500
39501
39502
39503
39504
39505
39506
39507
39508
39509
39510
39511
39512
39513
39514
39515
39516
39517
39518
39519
39520
39521
39522
39523
39524
39525
39526
39527
39528
39529
39530
39531
39532
39533
39534
39535
39536
39537
39538
39539
39540
39541
39542
39543
39544
39545
39546
39547
39548
39549
39550
39551
39552
39553
39554
39555
39556
39557
39558
39559
39560
39561
39562
39563
39564
39565
39566
39567
39568
39569
39570
39571
39572
39573
39574
39575
39576
39577
39578
39579
39580
39581
39582
39583
39584
39585
39586
39587
39588
39589
39590
39591
39592
39593
39594
39595
39596
39597
39598
39599
39600
39601
39602
39603
39604
39605
39606
39607
39608
39609
39610
39611
39612
39613
39614
39615
39616
39617
39618
39619
39620
39621
39622
39623
39624
39625
39626
39627
39628
39629
39630
39631
39632
39633
39634
39635
39636
39637
39638
39639
39640
39641
39642
39643
39644
39645
39646
39647
39648
pub fn deser_structure_crate_model_security_group_rule(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SecurityGroupRule, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::SecurityGroupRule::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("securityGroupRuleId") /* SecurityGroupRuleId com.amazonaws.ec2#SecurityGroupRule$SecurityGroupRuleId */ =>  {
                let var_1672 =
                    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_security_group_rule_id(var_1672);
            }
            ,
            s if s.matches("groupId") /* GroupId com.amazonaws.ec2#SecurityGroupRule$GroupId */ =>  {
                let var_1673 =
                    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_group_id(var_1673);
            }
            ,
            s if s.matches("groupOwnerId") /* GroupOwnerId com.amazonaws.ec2#SecurityGroupRule$GroupOwnerId */ =>  {
                let var_1674 =
                    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_group_owner_id(var_1674);
            }
            ,
            s if s.matches("isEgress") /* IsEgress com.amazonaws.ec2#SecurityGroupRule$IsEgress */ =>  {
                let var_1675 =
                    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_is_egress(var_1675);
            }
            ,
            s if s.matches("ipProtocol") /* IpProtocol com.amazonaws.ec2#SecurityGroupRule$IpProtocol */ =>  {
                let var_1676 =
                    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_ip_protocol(var_1676);
            }
            ,
            s if s.matches("fromPort") /* FromPort com.amazonaws.ec2#SecurityGroupRule$FromPort */ =>  {
                let var_1677 =
                    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_from_port(var_1677);
            }
            ,
            s if s.matches("toPort") /* ToPort com.amazonaws.ec2#SecurityGroupRule$ToPort */ =>  {
                let var_1678 =
                    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_to_port(var_1678);
            }
            ,
            s if s.matches("cidrIpv4") /* CidrIpv4 com.amazonaws.ec2#SecurityGroupRule$CidrIpv4 */ =>  {
                let var_1679 =
                    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_ipv4(var_1679);
            }
            ,
            s if s.matches("cidrIpv6") /* CidrIpv6 com.amazonaws.ec2#SecurityGroupRule$CidrIpv6 */ =>  {
                let var_1680 =
                    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_ipv6(var_1680);
            }
            ,
            s if s.matches("prefixListId") /* PrefixListId com.amazonaws.ec2#SecurityGroupRule$PrefixListId */ =>  {
                let var_1681 =
                    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_prefix_list_id(var_1681);
            }
            ,
            s if s.matches("referencedGroupInfo") /* ReferencedGroupInfo com.amazonaws.ec2#SecurityGroupRule$ReferencedGroupInfo */ =>  {
                let var_1682 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_referenced_security_group(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_referenced_group_info(var_1682);
            }
            ,
            s if s.matches("description") /* Description com.amazonaws.ec2#SecurityGroupRule$Description */ =>  {
                let var_1683 =
                    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_1683);
            }
            ,
            s if s.matches("tagSet") /* Tags com.amazonaws.ec2#SecurityGroupRule$Tags */ =>  {
                let var_1684 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_tags(var_1684);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more