#[non_exhaustive]pub struct CustomConfig {
pub predicate: Option<Expr>,
pub custom_output: Option<CustomOutputSpec>,
pub resource_selector: Option<ResourceSelector>,
pub severity: Severity,
pub description: String,
pub recommendation: String,
/* private fields */
}Expand description
Defines the properties in a custom module configuration for Security Health Analytics. Use the custom module configuration to create custom detectors that generate custom findings for resources that you specify.
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.predicate: Option<Expr>Required. The CEL expression to evaluate to produce findings. When the expression evaluates to true against a resource, a finding is generated.
custom_output: Option<CustomOutputSpec>Optional. Custom output properties.
resource_selector: Option<ResourceSelector>Required. The resource types that the custom module operates on. Each custom module can specify up to 5 resource types.
severity: SeverityRequired. The severity to assign to findings generated by the module.
description: StringOptional. Text that describes the vulnerability or misconfiguration that the custom module detects. This explanation is returned with each finding instance to help investigators understand the detected issue. The text must be enclosed in quotation marks.
recommendation: StringOptional. An explanation of the recommended steps that security teams can
take to resolve the detected issue. This explanation is returned with each
finding generated by this module in the nextSteps property of the finding
JSON.
Implementations§
Source§impl CustomConfig
impl CustomConfig
pub fn new() -> Self
Sourcepub fn set_predicate<T>(self, v: T) -> Self
pub fn set_predicate<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_predicate<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_predicate<T>(self, v: Option<T>) -> Self
Sourcepub fn set_custom_output<T>(self, v: T) -> Selfwhere
T: Into<CustomOutputSpec>,
pub fn set_custom_output<T>(self, v: T) -> Selfwhere
T: Into<CustomOutputSpec>,
Sets the value of custom_output.
§Example
use google_cloud_securityposture_v1::model::custom_config::CustomOutputSpec;
let x = CustomConfig::new().set_custom_output(CustomOutputSpec::default()/* use setters */);Sourcepub fn set_or_clear_custom_output<T>(self, v: Option<T>) -> Selfwhere
T: Into<CustomOutputSpec>,
pub fn set_or_clear_custom_output<T>(self, v: Option<T>) -> Selfwhere
T: Into<CustomOutputSpec>,
Sets or clears the value of custom_output.
§Example
use google_cloud_securityposture_v1::model::custom_config::CustomOutputSpec;
let x = CustomConfig::new().set_or_clear_custom_output(Some(CustomOutputSpec::default()/* use setters */));
let x = CustomConfig::new().set_or_clear_custom_output(None::<CustomOutputSpec>);Sourcepub fn set_resource_selector<T>(self, v: T) -> Selfwhere
T: Into<ResourceSelector>,
pub fn set_resource_selector<T>(self, v: T) -> Selfwhere
T: Into<ResourceSelector>,
Sets the value of resource_selector.
§Example
use google_cloud_securityposture_v1::model::custom_config::ResourceSelector;
let x = CustomConfig::new().set_resource_selector(ResourceSelector::default()/* use setters */);Sourcepub fn set_or_clear_resource_selector<T>(self, v: Option<T>) -> Selfwhere
T: Into<ResourceSelector>,
pub fn set_or_clear_resource_selector<T>(self, v: Option<T>) -> Selfwhere
T: Into<ResourceSelector>,
Sets or clears the value of resource_selector.
§Example
use google_cloud_securityposture_v1::model::custom_config::ResourceSelector;
let x = CustomConfig::new().set_or_clear_resource_selector(Some(ResourceSelector::default()/* use setters */));
let x = CustomConfig::new().set_or_clear_resource_selector(None::<ResourceSelector>);Sourcepub fn set_severity<T: Into<Severity>>(self, v: T) -> Self
pub fn set_severity<T: Into<Severity>>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_recommendation<T: Into<String>>(self, v: T) -> Self
pub fn set_recommendation<T: Into<String>>(self, v: T) -> Self
Sets the value of recommendation.
§Example
let x = CustomConfig::new().set_recommendation("example");Trait Implementations§
Source§impl Clone for CustomConfig
impl Clone for CustomConfig
Source§fn clone(&self) -> CustomConfig
fn clone(&self) -> CustomConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more