Struct aws_sdk_ec2::model::IpPermission
source · #[non_exhaustive]pub struct IpPermission { /* private fields */ }
Expand description
Describes a set of permissions for a security group rule.
Implementations§
source§impl IpPermission
impl IpPermission
sourcepub fn from_port(&self) -> Option<i32>
pub fn from_port(&self) -> Option<i32>
The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1
indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
sourcepub fn ip_protocol(&self) -> Option<&str>
pub fn ip_protocol(&self) -> Option<&str>
The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or number (see Protocol Numbers).
[VPC only] Use -1
to specify all protocols. When authorizing security group rules, specifying -1
or a protocol number other than tcp
, udp
, icmp
, or icmpv6
allows traffic on all ports, regardless of any port range you specify. For tcp
, udp
, and icmp
, you must specify a port range. For icmpv6
, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.
sourcepub fn ipv6_ranges(&self) -> Option<&[Ipv6Range]>
pub fn ipv6_ranges(&self) -> Option<&[Ipv6Range]>
[VPC only] The IPv6 ranges.
sourcepub fn prefix_list_ids(&self) -> Option<&[PrefixListId]>
pub fn prefix_list_ids(&self) -> Option<&[PrefixListId]>
[VPC only] The prefix list IDs.
sourcepub fn to_port(&self) -> Option<i32>
pub fn to_port(&self) -> Option<i32>
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.
sourcepub fn user_id_group_pairs(&self) -> Option<&[UserIdGroupPair]>
pub fn user_id_group_pairs(&self) -> Option<&[UserIdGroupPair]>
The security group and Amazon Web Services account ID pairs.
source§impl IpPermission
impl IpPermission
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture IpPermission
.
Examples found in repository?
54941 54942 54943 54944 54945 54946 54947 54948 54949 54950 54951 54952 54953 54954 54955 54956 54957 54958 54959 54960 54961 54962 54963 54964 54965 54966 54967 54968 54969 54970 54971 54972 54973 54974 54975 54976 54977 54978 54979 54980 54981 54982 54983 54984 54985 54986 54987 54988 54989 54990 54991 54992 54993 54994 54995 54996 54997 54998 54999 55000 55001 55002 55003 55004 55005 55006 55007 55008 55009 55010 55011 55012 55013 55014 55015 55016 55017 55018 55019 55020 55021 55022 55023 55024 55025 55026 55027 55028 55029 55030 55031 55032 55033 55034 55035
pub fn deser_structure_crate_model_ip_permission(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IpPermission, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::IpPermission::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fromPort") /* FromPort com.amazonaws.ec2#IpPermission$FromPort */ => {
let var_2646 =
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_2646);
}
,
s if s.matches("ipProtocol") /* IpProtocol com.amazonaws.ec2#IpPermission$IpProtocol */ => {
let var_2647 =
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_2647);
}
,
s if s.matches("ipRanges") /* IpRanges com.amazonaws.ec2#IpPermission$IpRanges */ => {
let var_2648 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_ip_range_list(&mut tag)
?
)
;
builder = builder.set_ip_ranges(var_2648);
}
,
s if s.matches("ipv6Ranges") /* Ipv6Ranges com.amazonaws.ec2#IpPermission$Ipv6Ranges */ => {
let var_2649 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_ipv6_range_list(&mut tag)
?
)
;
builder = builder.set_ipv6_ranges(var_2649);
}
,
s if s.matches("prefixListIds") /* PrefixListIds com.amazonaws.ec2#IpPermission$PrefixListIds */ => {
let var_2650 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_prefix_list_id_list(&mut tag)
?
)
;
builder = builder.set_prefix_list_ids(var_2650);
}
,
s if s.matches("toPort") /* ToPort com.amazonaws.ec2#IpPermission$ToPort */ => {
let var_2651 =
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_2651);
}
,
s if s.matches("groups") /* UserIdGroupPairs com.amazonaws.ec2#IpPermission$UserIdGroupPairs */ => {
let var_2652 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_user_id_group_pair_list(&mut tag)
?
)
;
builder = builder.set_user_id_group_pairs(var_2652);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for IpPermission
impl Clone for IpPermission
source§fn clone(&self) -> IpPermission
fn clone(&self) -> IpPermission
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more