#[non_exhaustive]pub struct IpRules {
pub direction: Direction,
pub source_ip_ranges: Vec<String>,
pub destination_ip_ranges: Vec<String>,
pub exposed_services: Vec<String>,
pub rules: Option<Rules>,
/* private fields */
}Expand description
IP rules associated with the finding.
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.direction: DirectionThe direction that the rule is applicable to, one of ingress or egress.
source_ip_ranges: Vec<String>If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.
destination_ip_ranges: Vec<String>If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.
exposed_services: Vec<String>Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.
rules: Option<Rules>The list of allow rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
Implementations§
Source§impl IpRules
impl IpRules
Sourcepub fn set_direction<T: Into<Direction>>(self, v: T) -> Self
pub fn set_direction<T: Into<Direction>>(self, v: T) -> Self
Sourcepub fn set_source_ip_ranges<T, V>(self, v: T) -> Self
pub fn set_source_ip_ranges<T, V>(self, v: T) -> Self
Sets the value of source_ip_ranges.
§Example
let x = IpRules::new().set_source_ip_ranges(["a", "b", "c"]);Sourcepub fn set_destination_ip_ranges<T, V>(self, v: T) -> Self
pub fn set_destination_ip_ranges<T, V>(self, v: T) -> Self
Sets the value of destination_ip_ranges.
§Example
let x = IpRules::new().set_destination_ip_ranges(["a", "b", "c"]);Sourcepub fn set_exposed_services<T, V>(self, v: T) -> Self
pub fn set_exposed_services<T, V>(self, v: T) -> Self
Sets the value of exposed_services.
§Example
let x = IpRules::new().set_exposed_services(["a", "b", "c"]);Sourcepub fn allowed(&self) -> Option<&Box<Allowed>>
pub fn allowed(&self) -> Option<&Box<Allowed>>
The value of rules
if it holds a Allowed, None if the field is not set or
holds a different branch.
Sourcepub fn set_allowed<T: Into<Box<Allowed>>>(self, v: T) -> Self
pub fn set_allowed<T: Into<Box<Allowed>>>(self, v: T) -> Self
Sets the value of rules
to hold a Allowed.
Note that all the setters affecting rules are
mutually exclusive.
§Example
use google_cloud_securitycenter_v2::model::Allowed;
let x = IpRules::new().set_allowed(Allowed::default()/* use setters */);
assert!(x.allowed().is_some());
assert!(x.denied().is_none());Sourcepub fn denied(&self) -> Option<&Box<Denied>>
pub fn denied(&self) -> Option<&Box<Denied>>
The value of rules
if it holds a Denied, None if the field is not set or
holds a different branch.
Sourcepub fn set_denied<T: Into<Box<Denied>>>(self, v: T) -> Self
pub fn set_denied<T: Into<Box<Denied>>>(self, v: T) -> Self
Sets the value of rules
to hold a Denied.
Note that all the setters affecting rules are
mutually exclusive.
§Example
use google_cloud_securitycenter_v2::model::Denied;
let x = IpRules::new().set_denied(Denied::default()/* use setters */);
assert!(x.denied().is_some());
assert!(x.allowed().is_none());Trait Implementations§
impl StructuralPartialEq for IpRules
Auto Trait Implementations§
impl Freeze for IpRules
impl RefUnwindSafe for IpRules
impl Send for IpRules
impl Sync for IpRules
impl Unpin for IpRules
impl UnsafeUnpin for IpRules
impl UnwindSafe for IpRules
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request