Struct ListVulnerableAssetsOptionalParams

Source
#[non_exhaustive]
pub struct ListVulnerableAssetsOptionalParams {
Show 17 fields pub page_token: Option<String>, pub page_number: Option<i64>, pub filter_name: Option<String>, pub filter_type: Option<AssetType>, pub filter_version_first: Option<String>, pub filter_version_last: Option<String>, pub filter_repository_url: Option<String>, pub filter_risks_in_production: Option<bool>, pub filter_risks_under_attack: Option<bool>, pub filter_risks_is_publicly_accessible: Option<bool>, pub filter_risks_has_privileged_access: Option<bool>, pub filter_risks_has_access_to_sensitive_data: Option<bool>, pub filter_environments: Option<String>, pub filter_teams: Option<String>, pub filter_arch: Option<String>, pub filter_operating_system_name: Option<String>, pub filter_operating_system_version: Option<String>,
}
Expand description

ListVulnerableAssetsOptionalParams is a struct for passing parameters to the method SecurityMonitoringAPI::list_vulnerable_assets

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§page_token: Option<String>

Its value must come from the links section of the response of the first request. Do not manually edit it.

§page_number: Option<i64>

The page number to be retrieved. It should be equal or greater than 1

§filter_name: Option<String>

Filter by name.

§filter_type: Option<AssetType>

Filter by type.

§filter_version_first: Option<String>

Filter by the first version of the asset since it has been vulnerable.

§filter_version_last: Option<String>

Filter by the last detected version of the asset.

§filter_repository_url: Option<String>

Filter by the repository url associated to the asset.

§filter_risks_in_production: Option<bool>

Filter whether the asset is in production or not.

§filter_risks_under_attack: Option<bool>

Filter whether the asset (Service) is under attack or not.

§filter_risks_is_publicly_accessible: Option<bool>

Filter whether the asset (Host) is publicly accessible or not.

§filter_risks_has_privileged_access: Option<bool>

Filter whether the asset (Host) has privileged access or not.

§filter_risks_has_access_to_sensitive_data: Option<bool>

Filter whether the asset (Host) has access to sensitive data or not.

§filter_environments: Option<String>

Filter by environment.

§filter_teams: Option<String>

Filter by teams.

§filter_arch: Option<String>

Filter by architecture.

§filter_operating_system_name: Option<String>

Filter by operating system name.

§filter_operating_system_version: Option<String>

Filter by operating system version.

Implementations§

Source§

impl ListVulnerableAssetsOptionalParams

Source

pub fn page_token(self, value: String) -> Self

Its value must come from the links section of the response of the first request. Do not manually edit it.

Source

pub fn page_number(self, value: i64) -> Self

The page number to be retrieved. It should be equal or greater than 1

Source

pub fn filter_name(self, value: String) -> Self

Filter by name.

Source

pub fn filter_type(self, value: AssetType) -> Self

Filter by type.

Examples found in repository?
examples/v2_security-monitoring_ListVulnerableAssets.rs (line 15)
8async fn main() {
9    let mut configuration = datadog::Configuration::new();
10    configuration.set_unstable_operation_enabled("v2.ListVulnerableAssets", true);
11    let api = SecurityMonitoringAPI::with_config(configuration);
12    let resp = api
13        .list_vulnerable_assets(
14            ListVulnerableAssetsOptionalParams::default()
15                .filter_type(AssetType::HOST)
16                .filter_repository_url("github.com/datadog/dd-go".to_string())
17                .filter_risks_in_production(true),
18        )
19        .await;
20    if let Ok(value) = resp {
21        println!("{:#?}", value);
22    } else {
23        println!("{:#?}", resp.unwrap_err());
24    }
25}
Source

pub fn filter_version_first(self, value: String) -> Self

Filter by the first version of the asset since it has been vulnerable.

Source

pub fn filter_version_last(self, value: String) -> Self

Filter by the last detected version of the asset.

Source

pub fn filter_repository_url(self, value: String) -> Self

Filter by the repository url associated to the asset.

Examples found in repository?
examples/v2_security-monitoring_ListVulnerableAssets.rs (line 16)
8async fn main() {
9    let mut configuration = datadog::Configuration::new();
10    configuration.set_unstable_operation_enabled("v2.ListVulnerableAssets", true);
11    let api = SecurityMonitoringAPI::with_config(configuration);
12    let resp = api
13        .list_vulnerable_assets(
14            ListVulnerableAssetsOptionalParams::default()
15                .filter_type(AssetType::HOST)
16                .filter_repository_url("github.com/datadog/dd-go".to_string())
17                .filter_risks_in_production(true),
18        )
19        .await;
20    if let Ok(value) = resp {
21        println!("{:#?}", value);
22    } else {
23        println!("{:#?}", resp.unwrap_err());
24    }
25}
Source

pub fn filter_risks_in_production(self, value: bool) -> Self

Filter whether the asset is in production or not.

Examples found in repository?
examples/v2_security-monitoring_ListVulnerableAssets.rs (line 17)
8async fn main() {
9    let mut configuration = datadog::Configuration::new();
10    configuration.set_unstable_operation_enabled("v2.ListVulnerableAssets", true);
11    let api = SecurityMonitoringAPI::with_config(configuration);
12    let resp = api
13        .list_vulnerable_assets(
14            ListVulnerableAssetsOptionalParams::default()
15                .filter_type(AssetType::HOST)
16                .filter_repository_url("github.com/datadog/dd-go".to_string())
17                .filter_risks_in_production(true),
18        )
19        .await;
20    if let Ok(value) = resp {
21        println!("{:#?}", value);
22    } else {
23        println!("{:#?}", resp.unwrap_err());
24    }
25}
Source

pub fn filter_risks_under_attack(self, value: bool) -> Self

Filter whether the asset (Service) is under attack or not.

Source

pub fn filter_risks_is_publicly_accessible(self, value: bool) -> Self

Filter whether the asset (Host) is publicly accessible or not.

Source

pub fn filter_risks_has_privileged_access(self, value: bool) -> Self

Filter whether the asset (Host) has privileged access or not.

Source

pub fn filter_risks_has_access_to_sensitive_data(self, value: bool) -> Self

Filter whether the asset (Host) has access to sensitive data or not.

Source

pub fn filter_environments(self, value: String) -> Self

Filter by environment.

Source

pub fn filter_teams(self, value: String) -> Self

Filter by teams.

Source

pub fn filter_arch(self, value: String) -> Self

Filter by architecture.

Source

pub fn filter_operating_system_name(self, value: String) -> Self

Filter by operating system name.

Source

pub fn filter_operating_system_version(self, value: String) -> Self

Filter by operating system version.

Trait Implementations§

Source§

impl Clone for ListVulnerableAssetsOptionalParams

Source§

fn clone(&self) -> ListVulnerableAssetsOptionalParams

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ListVulnerableAssetsOptionalParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ListVulnerableAssetsOptionalParams

Source§

fn default() -> ListVulnerableAssetsOptionalParams

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,