Struct AgentlessScanningAPI

Source
pub struct AgentlessScanningAPI { /* private fields */ }
Expand description

Datadog Agentless Scanning provides visibility into risks and vulnerabilities within your hosts, running containers, and serverless functions—all without requiring teams to install Agents on every host or where Agents cannot be installed. Agentless offers also Sensitive Data Scanning capabilities on your storage. Go to https://www.datadoghq.com/blog/agentless-scanning/ to learn more.

Implementations§

Source§

impl AgentlessScanningAPI

Source

pub fn new() -> Self

Source

pub fn with_config(config: Configuration) -> Self

Examples found in repository?
examples/v2_agentless-scanning_ListAwsScanOptions.rs (line 8)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AgentlessScanningAPI::with_config(configuration);
9    let resp = api.list_aws_scan_options().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
More examples
Hide additional examples
examples/v2_agentless-scanning_ListAwsOnDemandTasks.rs (line 8)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AgentlessScanningAPI::with_config(configuration);
9    let resp = api.list_aws_on_demand_tasks().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
examples/v2_agentless-scanning_DeleteAwsScanOptions.rs (line 8)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AgentlessScanningAPI::with_config(configuration);
9    let resp = api.delete_aws_scan_options("account_id".to_string()).await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
examples/v2_agentless-scanning_GetAwsOnDemandTask.rs (line 8)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AgentlessScanningAPI::with_config(configuration);
9    let resp = api
10        .get_aws_on_demand_task("63d6b4f5-e5d0-4d90-824a-9580f05f026a".to_string())
11        .await;
12    if let Ok(value) = resp {
13        println!("{:#?}", value);
14    } else {
15        println!("{:#?}", resp.unwrap_err());
16    }
17}
examples/v2_agentless-scanning_CreateAwsScanOptions.rs (line 18)
11async fn main() {
12    let body = AwsScanOptionsCreateRequest::new(AwsScanOptionsCreateData::new(
13        AwsScanOptionsCreateAttributes::new(true, false, true, true),
14        "000000000003".to_string(),
15        AwsScanOptionsType::AWS_SCAN_OPTIONS,
16    ));
17    let configuration = datadog::Configuration::new();
18    let api = AgentlessScanningAPI::with_config(configuration);
19    let resp = api.create_aws_scan_options(body).await;
20    if let Ok(value) = resp {
21        println!("{:#?}", value);
22    } else {
23        println!("{:#?}", resp.unwrap_err());
24    }
25}
examples/v2_agentless-scanning_CreateAwsOnDemandTask.rs (line 19)
11async fn main() {
12    let body = AwsOnDemandCreateRequest::new(AwsOnDemandCreateData::new(
13        AwsOnDemandCreateAttributes::new(
14            "arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test".to_string(),
15        ),
16        AwsOnDemandType::AWS_RESOURCE,
17    ));
18    let configuration = datadog::Configuration::new();
19    let api = AgentlessScanningAPI::with_config(configuration);
20    let resp = api.create_aws_on_demand_task(body).await;
21    if let Ok(value) = resp {
22        println!("{:#?}", value);
23    } else {
24        println!("{:#?}", resp.unwrap_err());
25    }
26}
Source

pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self

Source

pub async fn create_aws_on_demand_task( &self, body: AwsOnDemandCreateRequest, ) -> Result<AwsOnDemandResponse, Error<CreateAwsOnDemandTaskError>>

Trigger the scan of an AWS resource with a high priority. Agentless scanning must be activated for the AWS account containing the resource to scan.

Examples found in repository?
examples/v2_agentless-scanning_CreateAwsOnDemandTask.rs (line 20)
11async fn main() {
12    let body = AwsOnDemandCreateRequest::new(AwsOnDemandCreateData::new(
13        AwsOnDemandCreateAttributes::new(
14            "arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test".to_string(),
15        ),
16        AwsOnDemandType::AWS_RESOURCE,
17    ));
18    let configuration = datadog::Configuration::new();
19    let api = AgentlessScanningAPI::with_config(configuration);
20    let resp = api.create_aws_on_demand_task(body).await;
21    if let Ok(value) = resp {
22        println!("{:#?}", value);
23    } else {
24        println!("{:#?}", resp.unwrap_err());
25    }
26}
Source

pub async fn create_aws_on_demand_task_with_http_info( &self, body: AwsOnDemandCreateRequest, ) -> Result<ResponseContent<AwsOnDemandResponse>, Error<CreateAwsOnDemandTaskError>>

Trigger the scan of an AWS resource with a high priority. Agentless scanning must be activated for the AWS account containing the resource to scan.

Source

pub async fn create_aws_scan_options( &self, body: AwsScanOptionsCreateRequest, ) -> Result<AwsScanOptionsResponse, Error<CreateAwsScanOptionsError>>

Activate Agentless scan options for an AWS account.

Examples found in repository?
examples/v2_agentless-scanning_CreateAwsScanOptions.rs (line 19)
11async fn main() {
12    let body = AwsScanOptionsCreateRequest::new(AwsScanOptionsCreateData::new(
13        AwsScanOptionsCreateAttributes::new(true, false, true, true),
14        "000000000003".to_string(),
15        AwsScanOptionsType::AWS_SCAN_OPTIONS,
16    ));
17    let configuration = datadog::Configuration::new();
18    let api = AgentlessScanningAPI::with_config(configuration);
19    let resp = api.create_aws_scan_options(body).await;
20    if let Ok(value) = resp {
21        println!("{:#?}", value);
22    } else {
23        println!("{:#?}", resp.unwrap_err());
24    }
25}
Source

pub async fn create_aws_scan_options_with_http_info( &self, body: AwsScanOptionsCreateRequest, ) -> Result<ResponseContent<AwsScanOptionsResponse>, Error<CreateAwsScanOptionsError>>

Activate Agentless scan options for an AWS account.

Source

pub async fn delete_aws_scan_options( &self, account_id: String, ) -> Result<(), Error<DeleteAwsScanOptionsError>>

Delete Agentless scan options for an AWS account.

Examples found in repository?
examples/v2_agentless-scanning_DeleteAwsScanOptions.rs (line 9)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AgentlessScanningAPI::with_config(configuration);
9    let resp = api.delete_aws_scan_options("account_id".to_string()).await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
Source

pub async fn delete_aws_scan_options_with_http_info( &self, account_id: String, ) -> Result<ResponseContent<()>, Error<DeleteAwsScanOptionsError>>

Delete Agentless scan options for an AWS account.

Source

pub async fn get_aws_on_demand_task( &self, task_id: String, ) -> Result<AwsOnDemandResponse, Error<GetAwsOnDemandTaskError>>

Fetch the data of a specific on demand task.

Examples found in repository?
examples/v2_agentless-scanning_GetAwsOnDemandTask.rs (line 10)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AgentlessScanningAPI::with_config(configuration);
9    let resp = api
10        .get_aws_on_demand_task("63d6b4f5-e5d0-4d90-824a-9580f05f026a".to_string())
11        .await;
12    if let Ok(value) = resp {
13        println!("{:#?}", value);
14    } else {
15        println!("{:#?}", resp.unwrap_err());
16    }
17}
Source

pub async fn get_aws_on_demand_task_with_http_info( &self, task_id: String, ) -> Result<ResponseContent<AwsOnDemandResponse>, Error<GetAwsOnDemandTaskError>>

Fetch the data of a specific on demand task.

Source

pub async fn list_aws_on_demand_tasks( &self, ) -> Result<AwsOnDemandListResponse, Error<ListAwsOnDemandTasksError>>

Fetches the most recent 1000 AWS on demand tasks.

Examples found in repository?
examples/v2_agentless-scanning_ListAwsOnDemandTasks.rs (line 9)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AgentlessScanningAPI::with_config(configuration);
9    let resp = api.list_aws_on_demand_tasks().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
Source

pub async fn list_aws_on_demand_tasks_with_http_info( &self, ) -> Result<ResponseContent<AwsOnDemandListResponse>, Error<ListAwsOnDemandTasksError>>

Fetches the most recent 1000 AWS on demand tasks.

Source

pub async fn list_aws_scan_options( &self, ) -> Result<AwsScanOptionsListResponse, Error<ListAwsScanOptionsError>>

Fetches the scan options configured for AWS accounts.

Examples found in repository?
examples/v2_agentless-scanning_ListAwsScanOptions.rs (line 9)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AgentlessScanningAPI::with_config(configuration);
9    let resp = api.list_aws_scan_options().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
Source

pub async fn list_aws_scan_options_with_http_info( &self, ) -> Result<ResponseContent<AwsScanOptionsListResponse>, Error<ListAwsScanOptionsError>>

Fetches the scan options configured for AWS accounts.

Source

pub async fn update_aws_scan_options( &self, account_id: String, body: AwsScanOptionsUpdateRequest, ) -> Result<(), Error<UpdateAwsScanOptionsError>>

Update the Agentless scan options for an activated account.

Examples found in repository?
examples/v2_agentless-scanning_UpdateAwsScanOptions.rs (line 22)
10async fn main() {
11    let body = AwsScanOptionsUpdateRequest::new(AwsScanOptionsUpdateData::new(
12        AwsScanOptionsUpdateAttributes::new()
13            .lambda(false)
14            .vuln_containers_os(true)
15            .vuln_host_os(true),
16        "000000000002".to_string(),
17        AwsScanOptionsType::AWS_SCAN_OPTIONS,
18    ));
19    let configuration = datadog::Configuration::new();
20    let api = AgentlessScanningAPI::with_config(configuration);
21    let resp = api
22        .update_aws_scan_options("000000000002".to_string(), body)
23        .await;
24    if let Ok(value) = resp {
25        println!("{:#?}", value);
26    } else {
27        println!("{:#?}", resp.unwrap_err());
28    }
29}
Source

pub async fn update_aws_scan_options_with_http_info( &self, account_id: String, body: AwsScanOptionsUpdateRequest, ) -> Result<ResponseContent<()>, Error<UpdateAwsScanOptionsError>>

Update the Agentless scan options for an activated account.

Trait Implementations§

Source§

impl Clone for AgentlessScanningAPI

Source§

fn clone(&self) -> AgentlessScanningAPI

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 AgentlessScanningAPI

Source§

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

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

impl Default for AgentlessScanningAPI

Source§

fn default() -> Self

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,