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
impl AgentlessScanningAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
More examples
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}
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}
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}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn create_aws_on_demand_task(
&self,
body: AwsOnDemandCreateRequest,
) -> Result<AwsOnDemandResponse, Error<CreateAwsOnDemandTaskError>>
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?
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}
Sourcepub async fn create_aws_on_demand_task_with_http_info(
&self,
body: AwsOnDemandCreateRequest,
) -> Result<ResponseContent<AwsOnDemandResponse>, Error<CreateAwsOnDemandTaskError>>
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.
Sourcepub async fn create_aws_scan_options(
&self,
body: AwsScanOptionsCreateRequest,
) -> Result<AwsScanOptionsResponse, Error<CreateAwsScanOptionsError>>
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?
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}
Sourcepub async fn create_aws_scan_options_with_http_info(
&self,
body: AwsScanOptionsCreateRequest,
) -> Result<ResponseContent<AwsScanOptionsResponse>, Error<CreateAwsScanOptionsError>>
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.
Sourcepub async fn delete_aws_scan_options(
&self,
account_id: String,
) -> Result<(), Error<DeleteAwsScanOptionsError>>
pub async fn delete_aws_scan_options( &self, account_id: String, ) -> Result<(), Error<DeleteAwsScanOptionsError>>
Delete Agentless scan options for an AWS account.
Sourcepub async fn delete_aws_scan_options_with_http_info(
&self,
account_id: String,
) -> Result<ResponseContent<()>, Error<DeleteAwsScanOptionsError>>
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.
Sourcepub async fn get_aws_on_demand_task(
&self,
task_id: String,
) -> Result<AwsOnDemandResponse, Error<GetAwsOnDemandTaskError>>
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?
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}
Sourcepub async fn get_aws_on_demand_task_with_http_info(
&self,
task_id: String,
) -> Result<ResponseContent<AwsOnDemandResponse>, Error<GetAwsOnDemandTaskError>>
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.
Sourcepub async fn list_aws_on_demand_tasks(
&self,
) -> Result<AwsOnDemandListResponse, Error<ListAwsOnDemandTasksError>>
pub async fn list_aws_on_demand_tasks( &self, ) -> Result<AwsOnDemandListResponse, Error<ListAwsOnDemandTasksError>>
Fetches the most recent 1000 AWS on demand tasks.
Sourcepub async fn list_aws_on_demand_tasks_with_http_info(
&self,
) -> Result<ResponseContent<AwsOnDemandListResponse>, Error<ListAwsOnDemandTasksError>>
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.
Sourcepub async fn list_aws_scan_options(
&self,
) -> Result<AwsScanOptionsListResponse, Error<ListAwsScanOptionsError>>
pub async fn list_aws_scan_options( &self, ) -> Result<AwsScanOptionsListResponse, Error<ListAwsScanOptionsError>>
Fetches the scan options configured for AWS accounts.
Sourcepub async fn list_aws_scan_options_with_http_info(
&self,
) -> Result<ResponseContent<AwsScanOptionsListResponse>, Error<ListAwsScanOptionsError>>
pub async fn list_aws_scan_options_with_http_info( &self, ) -> Result<ResponseContent<AwsScanOptionsListResponse>, Error<ListAwsScanOptionsError>>
Fetches the scan options configured for AWS accounts.
Sourcepub async fn update_aws_scan_options(
&self,
account_id: String,
body: AwsScanOptionsUpdateRequest,
) -> Result<(), Error<UpdateAwsScanOptionsError>>
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?
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}
Sourcepub async fn update_aws_scan_options_with_http_info(
&self,
account_id: String,
body: AwsScanOptionsUpdateRequest,
) -> Result<ResponseContent<()>, Error<UpdateAwsScanOptionsError>>
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
impl Clone for AgentlessScanningAPI
Source§fn clone(&self) -> AgentlessScanningAPI
fn clone(&self) -> AgentlessScanningAPI
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more