This endpoint is deprecated. Test if permissions are present to add log-forwarding triggers for the
given services and AWS account. Input is the same as for EnableAWSLogServices.
Done async, so can be repeatedly polled in a non-blocking fashion until
the async request completes.
Returns a status of created when it’s checking if the permissions exists
in the AWS account.
Returns a status of waiting while checking.
Returns a status of checked and ok if the Lambda exists.
Returns a status of error if the Lambda does not exist.
This endpoint requires the aws_configuration_read permission.
Array of services IDs set to enable automatic log collection. Discover the list of available services with the get list of AWS log ready services API endpoint.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"python3"example.py"
# Check permissions for log services returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]endapi_instance=DatadogAPIClient::V1::AWSLogsIntegrationAPI.newbody=DatadogAPIClient::V1::AWSLogsServicesRequest.new({account_id:"1234567",services:["s3","elb","elbv2","cloudfront","redshift","lambda",],})papi_instance.check_aws_logs_services_async(body)
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"rb"example.rb"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"go run"main.go"
// Check permissions for log services returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.AwsLogsIntegrationApi;importcom.datadog.api.client.v1.model.AWSLogsAsyncResponse;importcom.datadog.api.client.v1.model.AWSLogsServicesRequest;importjava.util.Arrays;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));AwsLogsIntegrationApiapiInstance=newAwsLogsIntegrationApi(defaultClient);AWSLogsServicesRequestbody=newAWSLogsServicesRequest().accountId("1234567").services(Arrays.asList("s3","elb","elbv2","cloudfront","redshift","lambda"));try{AWSLogsAsyncResponseresult=apiInstance.checkAWSLogsServicesAsync(body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling AwsLogsIntegrationApi#checkAWSLogsServicesAsync");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"java"Example.java"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Check permissions for log services returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});constapiInstance=newv1.AWSLogsIntegrationApi(configuration);constparams: v1.AWSLogsIntegrationApiCheckAWSLogsServicesAsyncRequest={body:{accountId:"1234567",services:["s3","elb","elbv2","cloudfront","redshift","lambda"],},};apiInstance.checkAWSLogsServicesAsync(params).then((data: v1.AWSLogsAsyncResponse)=>{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.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
Request a personalized demo
Get Started with Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.