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.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* List AWS scan options returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);apiInstance.listAwsScanOptions().then((data: v2.AwsScanOptionsListResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
"""
Get AWS scan options returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.agentless_scanning_apiimportAgentlessScanningApi# there is a valid "aws_scan_options" in the systemAWS_SCAN_OPTIONS_ID=environ["AWS_SCAN_OPTIONS_ID"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=AgentlessScanningApi(api_client)response=api_instance.get_aws_scan_options(account_id=AWS_SCAN_OPTIONS_ID,)print(response)
# Get AWS scan options returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::AgentlessScanningAPI.new# there is a valid "aws_scan_options" in the systemAWS_SCAN_OPTIONS_ID=ENV["AWS_SCAN_OPTIONS_ID"]papi_instance.get_aws_scan_options(AWS_SCAN_OPTIONS_ID)
// Get AWS scan options returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){// there is a valid "aws_scan_options" in the systemAwsScanOptionsID:=os.Getenv("AWS_SCAN_OPTIONS_ID")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAgentlessScanningApi(apiClient)resp,r,err:=api.GetAwsScanOptions(ctx,AwsScanOptionsID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AgentlessScanningApi.GetAwsScanOptions`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AgentlessScanningApi.GetAwsScanOptions`:\n%s\n",responseContent)}
// Get AWS scan options returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.AgentlessScanningApi;importcom.datadog.api.client.v2.model.AwsScanOptionsResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();AgentlessScanningApiapiInstance=newAgentlessScanningApi(defaultClient);// there is a valid "aws_scan_options" in the systemStringAWS_SCAN_OPTIONS_ID=System.getenv("AWS_SCAN_OPTIONS_ID");try{AwsScanOptionsResponseresult=apiInstance.getAwsScanOptions(AWS_SCAN_OPTIONS_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling AgentlessScanningApi#getAwsScanOptions");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get AWS scan options returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_agentless_scanning::AgentlessScanningAPI;#[tokio::main]asyncfnmain(){// there is a valid "aws_scan_options" in the system
letaws_scan_options_id=std::env::var("AWS_SCAN_OPTIONS_ID").unwrap();letconfiguration=datadog::Configuration::new();letapi=AgentlessScanningAPI::with_config(configuration);letresp=api.get_aws_scan_options(aws_scan_options_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get AWS scan options returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);// there is a valid "aws_scan_options" in the system
constAWS_SCAN_OPTIONS_ID=process.env.AWS_SCAN_OPTIONS_IDasstring;constparams: v2.AgentlessScanningApiGetAwsScanOptionsRequest={accountId: AWS_SCAN_OPTIONS_ID,};apiInstance.getAwsScanOptions(params).then((data: v2.AwsScanOptionsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Update AWS scan options returns "No Content" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);constparams: v2.AgentlessScanningApiUpdateAwsScanOptionsRequest={body:{data:{type:"aws_scan_options",id:"000000000002",attributes:{vulnHostOs: true,vulnContainersOs: true,lambda: false,},},},accountId:"000000000002",};apiInstance.updateAwsScanOptions(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Delete AWS scan options returns "No Content" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);constparams: v2.AgentlessScanningApiDeleteAwsScanOptionsRequest={accountId:"account_id",};apiInstance.deleteAwsScanOptions(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* List Azure scan options returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);apiInstance.listAzureScanOptions().then((data: v2.AzureScanOptionsArray)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Create Azure scan options returns "Created" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);constparams: v2.AgentlessScanningApiCreateAzureScanOptionsRequest={body:{data:{attributes:{vulnContainersOs: true,vulnHostOs: true,},id:"12345678-90ab-cdef-1234-567890abcdef",type:"azure_scan_options",},},};apiInstance.createAzureScanOptions(params).then((data: v2.AzureScanOptions)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get Azure scan options returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);constparams: v2.AgentlessScanningApiGetAzureScanOptionsRequest={subscriptionId:"12345678-90ab-cdef-1234-567890abcdef",};apiInstance.getAzureScanOptions(params).then((data: v2.AzureScanOptions)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Update Azure scan options returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);constparams: v2.AgentlessScanningApiUpdateAzureScanOptionsRequest={body:{data:{id:"12345678-90ab-cdef-1234-567890abcdef",type:"azure_scan_options",},},subscriptionId:"12345678-90ab-cdef-1234-567890abcdef",};apiInstance.updateAzureScanOptions(params).then((data: v2.AzureScanOptions)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Delete Azure scan options returns "No Content" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);constparams: v2.AgentlessScanningApiDeleteAzureScanOptionsRequest={subscriptionId:"12345678-90ab-cdef-1234-567890abcdef",};apiInstance.deleteAzureScanOptions(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* List GCP scan options returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);apiInstance.listGcpScanOptions().then((data: v2.GcpScanOptionsArray)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get GCP scan options returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);constparams: v2.AgentlessScanningApiGetGcpScanOptionsRequest={projectId:"api-spec-test",};apiInstance.getGcpScanOptions(params).then((data: v2.GcpScanOptions)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Update GCP scan options returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);constparams: v2.AgentlessScanningApiUpdateGcpScanOptionsRequest={body:{data:{id:"api-spec-test",type:"gcp_scan_options",attributes:{vulnContainersOs: false,},},},projectId:"api-spec-test",};apiInstance.updateGcpScanOptions(params).then((data: v2.GcpScanOptions)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Delete GCP scan options returns "No Content" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);constparams: v2.AgentlessScanningApiDeleteGcpScanOptionsRequest={projectId:"company-project-id",};apiInstance.deleteGcpScanOptions(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
Response object that includes a list of AWS on demand tasks.
Expand All
항목
유형
설명
data
[object]
A list of on demand tasks.
attributes
object
Attributes for the AWS on demand task.
arn
string
The arn of the resource to scan.
assigned_at
string
Specifies the assignment timestamp if the task has been already assigned to a scanner.
created_at
string
The task submission timestamp.
status
string
Indicates the status of the task.
QUEUED: the task has been submitted successfully and the resource has not been assigned to a scanner yet.
ASSIGNED: the task has been assigned.
ABORTED: the scan has been aborted after a period of time due to technical reasons, such as resource not found, insufficient permissions, or the absence of a configured scanner.
id
string
The UUID of the task.
type
enum
The type of the on demand task. The value should always be aws_resource.
Allowed enum values: aws_resource
"""
List AWS on demand tasks returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.agentless_scanning_apiimportAgentlessScanningApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=AgentlessScanningApi(api_client)response=api_instance.list_aws_on_demand_tasks()print(response)
# List AWS on demand tasks returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::AgentlessScanningAPI.newpapi_instance.list_aws_on_demand_tasks()
// List AWS on demand tasks returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAgentlessScanningApi(apiClient)resp,r,err:=api.ListAwsOnDemandTasks(ctx)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AgentlessScanningApi.ListAwsOnDemandTasks`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AgentlessScanningApi.ListAwsOnDemandTasks`:\n%s\n",responseContent)}
// List AWS on demand tasks returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_agentless_scanning::AgentlessScanningAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=AgentlessScanningAPI::with_config(configuration);letresp=api.list_aws_on_demand_tasks().await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* List AWS on demand tasks returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);apiInstance.listAwsOnDemandTasks().then((data: v2.AwsOnDemandListResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
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.
This endpoint requires the security_monitoring_findings_write permission.
OAuth apps require the org_management authorization scope to access this endpoint.
Response object that includes an AWS on demand task.
Expand All
항목
유형
설명
data
object
Single AWS on demand task.
attributes
object
Attributes for the AWS on demand task.
arn
string
The arn of the resource to scan.
assigned_at
string
Specifies the assignment timestamp if the task has been already assigned to a scanner.
created_at
string
The task submission timestamp.
status
string
Indicates the status of the task.
QUEUED: the task has been submitted successfully and the resource has not been assigned to a scanner yet.
ASSIGNED: the task has been assigned.
ABORTED: the scan has been aborted after a period of time due to technical reasons, such as resource not found, insufficient permissions, or the absence of a configured scanner.
id
string
The UUID of the task.
type
enum
The type of the on demand task. The value should always be aws_resource.
Allowed enum values: aws_resource
// Create AWS on demand task returns "AWS on demand task created successfully." responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){body:=datadogV2.AwsOnDemandCreateRequest{Data:datadogV2.AwsOnDemandCreateData{Attributes:datadogV2.AwsOnDemandCreateAttributes{Arn:"arn:aws:lambda:us-west-2:123456789012:function:my-function",},Type:datadogV2.AWSONDEMANDTYPE_AWS_RESOURCE,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAgentlessScanningApi(apiClient)resp,r,err:=api.CreateAwsOnDemandTask(ctx,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AgentlessScanningApi.CreateAwsOnDemandTask`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AgentlessScanningApi.CreateAwsOnDemandTask`:\n%s\n",responseContent)}
"""
Create AWS on demand task returns "AWS on demand task created successfully." response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.agentless_scanning_apiimportAgentlessScanningApifromdatadog_api_client.v2.model.aws_on_demand_create_attributesimportAwsOnDemandCreateAttributesfromdatadog_api_client.v2.model.aws_on_demand_create_dataimportAwsOnDemandCreateDatafromdatadog_api_client.v2.model.aws_on_demand_create_requestimportAwsOnDemandCreateRequestfromdatadog_api_client.v2.model.aws_on_demand_typeimportAwsOnDemandTypebody=AwsOnDemandCreateRequest(data=AwsOnDemandCreateData(attributes=AwsOnDemandCreateAttributes(arn="arn:aws:lambda:us-west-2:123456789012:function:my-function",),type=AwsOnDemandType.AWS_RESOURCE,),)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=AgentlessScanningApi(api_client)response=api_instance.create_aws_on_demand_task(body=body)print(response)
# Create AWS on demand task returns "AWS on demand task created successfully." responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::AgentlessScanningAPI.newbody=DatadogAPIClient::V2::AwsOnDemandCreateRequest.new({data:DatadogAPIClient::V2::AwsOnDemandCreateData.new({attributes:DatadogAPIClient::V2::AwsOnDemandCreateAttributes.new({arn:"arn:aws:lambda:us-west-2:123456789012:function:my-function",}),type:DatadogAPIClient::V2::AwsOnDemandType::AWS_RESOURCE,}),})papi_instance.create_aws_on_demand_task(body)
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Create AWS on demand task returns "AWS on demand task created successfully." response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);constparams: v2.AgentlessScanningApiCreateAwsOnDemandTaskRequest={body:{data:{attributes:{arn:"arn:aws:lambda:us-west-2:123456789012:function:my-function",},type:"aws_resource",},},};apiInstance.createAwsOnDemandTask(params).then((data: v2.AwsOnDemandResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
Response object that includes an AWS on demand task.
Expand All
항목
유형
설명
data
object
Single AWS on demand task.
attributes
object
Attributes for the AWS on demand task.
arn
string
The arn of the resource to scan.
assigned_at
string
Specifies the assignment timestamp if the task has been already assigned to a scanner.
created_at
string
The task submission timestamp.
status
string
Indicates the status of the task.
QUEUED: the task has been submitted successfully and the resource has not been assigned to a scanner yet.
ASSIGNED: the task has been assigned.
ABORTED: the scan has been aborted after a period of time due to technical reasons, such as resource not found, insufficient permissions, or the absence of a configured scanner.
id
string
The UUID of the task.
type
enum
The type of the on demand task. The value should always be aws_resource.
Allowed enum values: aws_resource
"""
Get AWS on demand task returns "OK." response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.agentless_scanning_apiimportAgentlessScanningApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=AgentlessScanningApi(api_client)response=api_instance.get_aws_on_demand_task(task_id="63d6b4f5-e5d0-4d90-824a-9580f05f026a",)print(response)
# Get AWS on demand task returns "OK." responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::AgentlessScanningAPI.newpapi_instance.get_aws_on_demand_task("63d6b4f5-e5d0-4d90-824a-9580f05f026a")
// Get AWS on demand task returns "OK." responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAgentlessScanningApi(apiClient)resp,r,err:=api.GetAwsOnDemandTask(ctx,"63d6b4f5-e5d0-4d90-824a-9580f05f026a")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AgentlessScanningApi.GetAwsOnDemandTask`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AgentlessScanningApi.GetAwsOnDemandTask`:\n%s\n",responseContent)}
// Get AWS on demand task returns "OK." response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_agentless_scanning::AgentlessScanningAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=AgentlessScanningAPI::with_config(configuration);letresp=api.get_aws_on_demand_task("63d6b4f5-e5d0-4d90-824a-9580f05f026a".to_string()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get AWS on demand task returns "OK." response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.AgentlessScanningApi(configuration);constparams: v2.AgentlessScanningApiGetAwsOnDemandTaskRequest={taskId:"63d6b4f5-e5d0-4d90-824a-9580f05f026a",};apiInstance.getAwsOnDemandTask(params).then((data: v2.AwsOnDemandResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));