Delete an AWS Account Integration Config by config ID.
This endpoint requires the aws_configurations_manage 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.
# 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>"
"""
Delete an AWS integration returns "No Content" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.aws_integration_apiimportAWSIntegrationApi# there is a valid "aws_account_v2" in the systemAWS_ACCOUNT_V2_DATA_ID=environ["AWS_ACCOUNT_V2_DATA_ID"]configuration=Configuration()configuration.access_token=environ["DD_BEARER_TOKEN"]withApiClient(configuration)asapi_client:api_instance=AWSIntegrationApi(api_client)api_instance.delete_aws_account(aws_account_config_id=AWS_ACCOUNT_V2_DATA_ID,)
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"
# Delete an AWS integration returns "No Content" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]endapi_instance=DatadogAPIClient::V2::AWSIntegrationAPI.new# there is a valid "aws_account_v2" in the systemAWS_ACCOUNT_V2_DATA_ID=ENV["AWS_ACCOUNT_V2_DATA_ID"]api_instance.delete_aws_account(AWS_ACCOUNT_V2_DATA_ID)
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"
// Delete an AWS integration returns "No Content" responsepackagemainimport("context""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_account_v2" in the systemAwsAccountV2DataID:=os.Getenv("AWS_ACCOUNT_V2_DATA_ID")ctx:=datadog.NewDefaultContext(context.Background())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAWSIntegrationApi(apiClient)r,err:=api.DeleteAWSAccount(ctx,AwsAccountV2DataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AWSIntegrationApi.DeleteAWSAccount`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}}
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"
// Delete an AWS integration returns "No Content" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.AwsIntegrationApi;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));AwsIntegrationApiapiInstance=newAwsIntegrationApi(defaultClient);// there is a valid "aws_account_v2" in the systemStringAWS_ACCOUNT_V2_DATA_ID=System.getenv("AWS_ACCOUNT_V2_DATA_ID");try{apiInstance.deleteAWSAccount(AWS_ACCOUNT_V2_DATA_ID);}catch(ApiExceptione){System.err.println("Exception when calling AwsIntegrationApi#deleteAWSAccount");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"
// Delete an AWS integration returns "No Content" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_aws_integration::AWSIntegrationAPI;#[tokio::main]asyncfnmain(){// there is a valid "aws_account_v2" in the system
letaws_account_v2_data_id=std::env::var("AWS_ACCOUNT_V2_DATA_ID").unwrap();letconfiguration=datadog::Configuration::new();letapi=AWSIntegrationAPI::with_config(configuration);letresp=api.delete_aws_account(aws_account_v2_data_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.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete an AWS integration returns "No Content" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});constapiInstance=newv2.AWSIntegrationApi(configuration);// there is a valid "aws_account_v2" in the system
constAWS_ACCOUNT_V2_DATA_ID=process.env.AWS_ACCOUNT_V2_DATA_IDasstring;constparams: v2.AWSIntegrationApiDeleteAWSAccountRequest={awsAccountConfigId: AWS_ACCOUNT_V2_DATA_ID,};apiInstance.deleteAWSAccount(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.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
This endpoint is deprecated - use the V2 endpoints instead. Delete a Datadog-AWS integration matching the specified account_id and role_name parameters.
This endpoint requires the aws_configurations_manage permission.
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"
// Delete an AWS integration returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.AwsIntegrationApi;importcom.datadog.api.client.v1.model.AWSAccountDeleteRequest;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));AwsIntegrationApiapiInstance=newAwsIntegrationApi(defaultClient);AWSAccountDeleteRequestbody=newAWSAccountDeleteRequest().accountId("163662907100").roleName("DatadogAWSIntegrationRole");try{apiInstance.deleteAWSAccount(body);}catch(ApiExceptione){System.err.println("Exception when calling AwsIntegrationApi#deleteAWSAccount");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_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"
// Delete an AWS integration returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_aws_integration::AWSIntegrationAPI;usedatadog_api_client::datadogV1::model::AWSAccountDeleteRequest;#[tokio::main]asyncfnmain(){letbody=AWSAccountDeleteRequest::new().account_id("163662907100".to_string()).role_name("DatadogAWSIntegrationRole".to_string());letconfiguration=datadog::Configuration::new();letapi=AWSIntegrationAPI::with_config(configuration);letresp=api.delete_aws_account(body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
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
/**
* Delete an AWS integration returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});constapiInstance=newv1.AWSIntegrationApi(configuration);constparams: v1.AWSIntegrationApiDeleteAWSAccountRequest={body:{accountId:"163662907100",roleName:"DatadogAWSIntegrationRole",},};apiInstance.deleteAWSAccount(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.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.