Struct aws_sdk_ec2::types::IpPermission
source · #[non_exhaustive]pub struct IpPermission {
pub from_port: Option<i32>,
pub ip_protocol: Option<String>,
pub ip_ranges: Option<Vec<IpRange>>,
pub ipv6_ranges: Option<Vec<Ipv6Range>>,
pub prefix_list_ids: Option<Vec<PrefixListId>>,
pub to_port: Option<i32>,
pub user_id_group_pairs: Option<Vec<UserIdGroupPair>>,
}
Expand description
Describes a set of permissions for a security group rule.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.from_port: Option<i32>
If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.
ip_protocol: Option<String>
The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or number (see Protocol Numbers).
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.
ip_ranges: Option<Vec<IpRange>>
The IPv4 ranges.
ipv6_ranges: Option<Vec<Ipv6Range>>
The IPv6 ranges.
prefix_list_ids: Option<Vec<PrefixListId>>
The prefix list IDs.
to_port: Option<i32>
If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.
user_id_group_pairs: Option<Vec<UserIdGroupPair>>
The security group and Amazon Web Services account ID pairs.
Implementations§
source§impl IpPermission
impl IpPermission
sourcepub fn from_port(&self) -> Option<i32>
pub fn from_port(&self) -> Option<i32>
If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 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).
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]>
The IPv6 ranges.
sourcepub fn prefix_list_ids(&self) -> Option<&[PrefixListId]>
pub fn prefix_list_ids(&self) -> Option<&[PrefixListId]>
The prefix list IDs.
sourcepub fn to_port(&self) -> Option<i32>
pub fn to_port(&self) -> Option<i32>
If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 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() -> IpPermissionBuilder
pub fn builder() -> IpPermissionBuilder
Creates a new builder-style object to manufacture IpPermission
.
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 moresource§impl Debug for IpPermission
impl Debug for IpPermission
source§impl PartialEq<IpPermission> for IpPermission
impl PartialEq<IpPermission> for IpPermission
source§fn eq(&self, other: &IpPermission) -> bool
fn eq(&self, other: &IpPermission) -> bool
self
and other
values to be equal, and is used
by ==
.