#[non_exhaustive]pub struct IpPermission {
pub ip_protocol: Option<String>,
pub from_port: Option<i32>,
pub to_port: Option<i32>,
pub user_id_group_pairs: Option<Vec<UserIdGroupPair>>,
pub ip_ranges: Option<Vec<IpRange>>,
pub ipv6_ranges: Option<Vec<Ipv6Range>>,
pub prefix_list_ids: Option<Vec<PrefixListId>>,
}
Expand description
Describes the 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.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.
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 ICMP type or -1 (all ICMP types).
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 ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).
user_id_group_pairs: Option<Vec<UserIdGroupPair>>
The security group and Amazon Web Services account ID pairs.
ip_ranges: Option<Vec<IpRange>>
The IPv4 address ranges.
ipv6_ranges: Option<Vec<Ipv6Range>>
The IPv6 address ranges.
prefix_list_ids: Option<Vec<PrefixListId>>
The prefix list IDs.
Implementations§
Source§impl IpPermission
impl IpPermission
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 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 ICMP type or -1 (all ICMP types).
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 ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).
Sourcepub fn user_id_group_pairs(&self) -> &[UserIdGroupPair]
pub fn user_id_group_pairs(&self) -> &[UserIdGroupPair]
The security group and Amazon Web Services account ID pairs.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .user_id_group_pairs.is_none()
.
Sourcepub fn ip_ranges(&self) -> &[IpRange]
pub fn ip_ranges(&self) -> &[IpRange]
The IPv4 address ranges.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .ip_ranges.is_none()
.
Sourcepub fn ipv6_ranges(&self) -> &[Ipv6Range]
pub fn ipv6_ranges(&self) -> &[Ipv6Range]
The IPv6 address ranges.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .ipv6_ranges.is_none()
.
Sourcepub fn prefix_list_ids(&self) -> &[PrefixListId]
pub fn prefix_list_ids(&self) -> &[PrefixListId]
The prefix list IDs.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .prefix_list_ids.is_none()
.
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 for IpPermission
impl PartialEq for IpPermission
impl StructuralPartialEq for IpPermission
Auto Trait Implementations§
impl Freeze for IpPermission
impl RefUnwindSafe for IpPermission
impl Send for IpPermission
impl Sync for IpPermission
impl Unpin for IpPermission
impl UnwindSafe for IpPermission
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more