pub struct SecurityGroupRule {
pub name: String,
pub direction: i32,
pub protocol: i32,
pub first_port: i32,
pub last_port: i32,
pub cidr_block: String,
pub peer_security_group: String,
pub same_group: bool,
pub description: String,
}Expand description
A security group rule: the traffic it allows in one direction, to or from
one peer. Set exactly one of cidr_block, peer_security_group and
same_group.
Fields§
§name: StringThe rule’s resource name.
direction: i32Which traffic the rule applies to.
protocol: i32The traffic the rule allows.
first_port: i32The first port the rule matches, for security_group_rule::Protocol::Tcp and security_group_rule::Protocol::Udp. Each set of
ports has one spelling, and the rule reads back in it: first_port 0
and last_port 0 match every port, a last_port of 0 the single port
first_port, and a first_port below last_port the range between
them. Any other spelling of a set is refused with INVALID_ARGUMENT
naming the one to use: first_port 22 and last_port 22 is
first_port 22 and last_port 0, and 0 or 1 to 65535 is 0 and 0.
last_port: i32The last port the rule matches, above first_port; 0 for the single
port first_port, or with first_port 0 for every port.
cidr_block: StringThe peer as an address range: where admitted traffic comes from, or where sent traffic goes to.
peer_security_group: StringThe peer as another security group of the same VPC: its members’
addresses. The rule’s own group is refused here with
INVALID_ARGUMENT: it is same_group.
same_group: boolThe peer as the rule’s own group’s members.
description: StringWhat the rule is for.
Implementations§
Source§impl SecurityGroupRule
impl SecurityGroupRule
Sourcepub fn direction(&self) -> Direction
pub fn direction(&self) -> Direction
Returns the enum value of direction, or the default if the field is set to an invalid enum value.
Sourcepub fn set_direction(&mut self, value: Direction)
pub fn set_direction(&mut self, value: Direction)
Sets direction to the provided enum value.
Sourcepub fn protocol(&self) -> Protocol
pub fn protocol(&self) -> Protocol
Returns the enum value of protocol, or the default if the field is set to an invalid enum value.
Sourcepub fn set_protocol(&mut self, value: Protocol)
pub fn set_protocol(&mut self, value: Protocol)
Sets protocol to the provided enum value.
Trait Implementations§
Source§impl Clone for SecurityGroupRule
impl Clone for SecurityGroupRule
Source§impl Debug for SecurityGroupRule
impl Debug for SecurityGroupRule
Source§impl Default for SecurityGroupRule
impl Default for SecurityGroupRule
Source§impl<'de> Deserialize<'de> for SecurityGroupRule
impl<'de> Deserialize<'de> for SecurityGroupRule
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
impl Eq for SecurityGroupRule
Source§impl Hash for SecurityGroupRule
impl Hash for SecurityGroupRule
Source§impl Message for SecurityGroupRule
impl Message for SecurityGroupRule
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for SecurityGroupRule
impl PartialEq for SecurityGroupRule
Source§impl Serialize for SecurityGroupRule
impl Serialize for SecurityGroupRule
impl StructuralPartialEq for SecurityGroupRule
Auto Trait Implementations§
impl Forget for SecurityGroupRule
impl Freeze for SecurityGroupRule
impl RefUnwindSafe for SecurityGroupRule
impl Send for SecurityGroupRule
impl Sync for SecurityGroupRule
impl Unpin for SecurityGroupRule
impl UnsafeUnpin for SecurityGroupRule
impl UnwindSafe for SecurityGroupRule
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.