#[non_exhaustive]pub struct ScanConfig {Show 13 fields
pub name: String,
pub display_name: String,
pub max_qps: i32,
pub starting_urls: Vec<String>,
pub authentication: Option<Authentication>,
pub user_agent: UserAgent,
pub blacklist_patterns: Vec<String>,
pub schedule: Option<Schedule>,
pub export_to_security_command_center: ExportToSecurityCommandCenter,
pub risk_level: RiskLevel,
pub managed_scan: bool,
pub static_ip_scan: bool,
pub ignore_http_status_errors: bool,
/* private fields */
}Expand description
A ScanConfig resource contains the configurations to launch a scan.
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.name: StringThe resource name of the ScanConfig. The name follows the format of ‘projects/{projectId}/scanConfigs/{scanConfigId}’. The ScanConfig IDs are generated by the system.
display_name: StringRequired. The user provided display name of the ScanConfig.
max_qps: i32The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. If the field is unspecified or its value is set 0, server will default to 15. Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT error.
starting_urls: Vec<String>Required. The starting URLs from which the scanner finds site pages.
authentication: Option<Authentication>The authentication configuration. If specified, service will use the authentication configuration during scanning.
user_agent: UserAgentThe user agent used during scanning.
blacklist_patterns: Vec<String>The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
schedule: Option<Schedule>The schedule of the ScanConfig.
export_to_security_command_center: ExportToSecurityCommandCenterControls export of scan configurations and results to Security Command Center.
risk_level: RiskLevelThe risk level selected for the scan
managed_scan: boolWhether the scan config is managed by Web Security Scanner, output only.
static_ip_scan: boolWhether the scan configuration has enabled static IP address scan feature. If enabled, the scanner will access applications from static IP addresses.
ignore_http_status_errors: boolWhether to keep scanning even if most requests return HTTP error codes.
Implementations§
Source§impl ScanConfig
impl ScanConfig
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_max_qps<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_qps<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_starting_urls<T, V>(self, v: T) -> Self
pub fn set_starting_urls<T, V>(self, v: T) -> Self
Sets the value of starting_urls.
§Example
let x = ScanConfig::new().set_starting_urls(["a", "b", "c"]);Sourcepub fn set_authentication<T>(self, v: T) -> Selfwhere
T: Into<Authentication>,
pub fn set_authentication<T>(self, v: T) -> Selfwhere
T: Into<Authentication>,
Sets the value of authentication.
§Example
use google_cloud_websecurityscanner_v1::model::scan_config::Authentication;
let x = ScanConfig::new().set_authentication(Authentication::default()/* use setters */);Sourcepub fn set_or_clear_authentication<T>(self, v: Option<T>) -> Selfwhere
T: Into<Authentication>,
pub fn set_or_clear_authentication<T>(self, v: Option<T>) -> Selfwhere
T: Into<Authentication>,
Sets or clears the value of authentication.
§Example
use google_cloud_websecurityscanner_v1::model::scan_config::Authentication;
let x = ScanConfig::new().set_or_clear_authentication(Some(Authentication::default()/* use setters */));
let x = ScanConfig::new().set_or_clear_authentication(None::<Authentication>);Sourcepub fn set_user_agent<T: Into<UserAgent>>(self, v: T) -> Self
pub fn set_user_agent<T: Into<UserAgent>>(self, v: T) -> Self
Sets the value of user_agent.
§Example
use google_cloud_websecurityscanner_v1::model::scan_config::UserAgent;
let x0 = ScanConfig::new().set_user_agent(UserAgent::ChromeLinux);
let x1 = ScanConfig::new().set_user_agent(UserAgent::ChromeAndroid);
let x2 = ScanConfig::new().set_user_agent(UserAgent::SafariIphone);Sourcepub fn set_blacklist_patterns<T, V>(self, v: T) -> Self
pub fn set_blacklist_patterns<T, V>(self, v: T) -> Self
Sets the value of blacklist_patterns.
§Example
let x = ScanConfig::new().set_blacklist_patterns(["a", "b", "c"]);Sourcepub fn set_schedule<T>(self, v: T) -> Self
pub fn set_schedule<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_schedule<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_schedule<T>(self, v: Option<T>) -> Self
Sourcepub fn set_export_to_security_command_center<T: Into<ExportToSecurityCommandCenter>>(
self,
v: T,
) -> Self
pub fn set_export_to_security_command_center<T: Into<ExportToSecurityCommandCenter>>( self, v: T, ) -> Self
Sets the value of export_to_security_command_center.
§Example
use google_cloud_websecurityscanner_v1::model::scan_config::ExportToSecurityCommandCenter;
let x0 = ScanConfig::new().set_export_to_security_command_center(ExportToSecurityCommandCenter::Enabled);
let x1 = ScanConfig::new().set_export_to_security_command_center(ExportToSecurityCommandCenter::Disabled);Sourcepub fn set_risk_level<T: Into<RiskLevel>>(self, v: T) -> Self
pub fn set_risk_level<T: Into<RiskLevel>>(self, v: T) -> Self
Sets the value of risk_level.
§Example
use google_cloud_websecurityscanner_v1::model::scan_config::RiskLevel;
let x0 = ScanConfig::new().set_risk_level(RiskLevel::Normal);
let x1 = ScanConfig::new().set_risk_level(RiskLevel::Low);Sourcepub fn set_managed_scan<T: Into<bool>>(self, v: T) -> Self
pub fn set_managed_scan<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_static_ip_scan<T: Into<bool>>(self, v: T) -> Self
pub fn set_static_ip_scan<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_ignore_http_status_errors<T: Into<bool>>(self, v: T) -> Self
pub fn set_ignore_http_status_errors<T: Into<bool>>(self, v: T) -> Self
Sets the value of ignore_http_status_errors.
§Example
let x = ScanConfig::new().set_ignore_http_status_errors(true);Trait Implementations§
Source§impl Clone for ScanConfig
impl Clone for ScanConfig
Source§fn clone(&self) -> ScanConfig
fn clone(&self) -> ScanConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more