Get the Cloud Cost Management config for an AWS Account Integration Config using Cost and Usage Report
(CUR) 2.0 by config ID.
This endpoint requires the aws_configuration_read permission.
Arguments
Path Parameters
Name
Type
Description
aws_account_config_id [required]
string
Unique Datadog ID of the AWS Account Integration Config. To get the config ID for an account, use the
List all AWS integrations
endpoint and query by AWS Account ID.
List of data export configurations for Cost and Usage Reports.
bucket_name [required]
string
Name of the S3 bucket where the Cost and Usage Report is stored.
bucket_region [required]
string
AWS region of the S3 bucket.
report_name [required]
string
Name of the Cost and Usage Report.
report_prefix [required]
string
S3 prefix where the Cost and Usage Report is stored.
report_type [required]
string
Type of the Cost and Usage Report. Currently only CUR2.0 is supported.
id
string
Unique Datadog ID of the AWS Account Integration Config.
To get the config ID for an account, use the
List all AWS integrations
endpoint and query by AWS Account ID.
# Path parameters exportaws_account_config_id="CHANGE_ME" # Use a Personal Access Token or Service Access Token exportDD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
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"
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"
// Get AWS CCM config returns "AWS CCM Config object" 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())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.GetAWSAccountCCMConfig",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAWSIntegrationApi(apiClient)resp,r,err:=api.GetAWSAccountCCMConfig(ctx,"aws_account_config_id")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AWSIntegrationApi.GetAWSAccountCCMConfig`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AWSIntegrationApi.GetAWSAccountCCMConfig`:\n%s\n",responseContent)}
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"
// Get AWS CCM config returns "AWS CCM Config object" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.AwsIntegrationApi;importcom.datadog.api.client.v2.model.AWSCcmConfigResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));defaultClient.setUnstableOperationEnabled("v2.getAWSAccountCCMConfig",true);AwsIntegrationApiapiInstance=newAwsIntegrationApi(defaultClient);try{AWSCcmConfigResponseresult=apiInstance.getAWSAccountCCMConfig("aws_account_config_id");System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling AwsIntegrationApi#getAWSAccountCCMConfig");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
/**
* Get AWS CCM config returns "AWS CCM Config object" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});configuration.unstableOperations["v2.getAWSAccountCCMConfig"]=true;constapiInstance=newv2.AWSIntegrationApi(configuration);constparams: v2.AWSIntegrationApiGetAWSAccountCCMConfigRequest={awsAccountConfigId:"aws_account_config_id",};apiInstance.getAWSAccountCCMConfig(params).then((data: v2.AWSCcmConfigResponse)=>{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.