Manage your Datadog Confluent Cloud integration accounts and account resources directly through the Datadog API. See the Confluent Cloud page for more information.
Update a Confluent resource with the provided resource id for the account associated with the provided account ID.
This endpoint requires the manage_integrations permission.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Update resource in Confluent account returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ConfluentCloudApi(configuration);constparams: v2.ConfluentCloudApiUpdateConfluentResourceRequest={body:{data:{attributes:{enableCustomMetrics: false,resourceType:"kafka",tags:["myTag","myTag2:myValue"],},id:"resource-id-123",type:"confluent-cloud-resources",},},accountId:"account_id",resourceId:"resource_id",};apiInstance.updateConfluentResource(params).then((data: v2.ConfluentResourceResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
Get a Confluent resource with the provided resource id for the account associated with the provided account ID.
This endpoint requires the integrations_read permission.
"""
Get resource from Confluent account returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.confluent_cloud_apiimportConfluentCloudApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=ConfluentCloudApi(api_client)response=api_instance.get_confluent_resource(account_id="account_id",resource_id="resource_id",)print(response)
# Get resource from Confluent account returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::ConfluentCloudAPI.newpapi_instance.get_confluent_resource("account_id","resource_id")
// Get resource from Confluent account returns "OK" response
packagemainimport("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.NewConfluentCloudApi(apiClient)resp,r,err:=api.GetConfluentResource(ctx,"account_id","resource_id")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `ConfluentCloudApi.GetConfluentResource`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `ConfluentCloudApi.GetConfluentResource`:\n%s\n",responseContent)}
// Get resource from Confluent account returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_confluent_cloud::ConfluentCloudAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=ConfluentCloudAPI::with_config(configuration);letresp=api.get_confluent_resource("account_id".to_string(),"resource_id".to_string()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Get resource from Confluent account returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ConfluentCloudApi(configuration);constparams: v2.ConfluentCloudApiGetConfluentResourceRequest={accountId:"account_id",resourceId:"resource_id",};apiInstance.getConfluentResource(params).then((data: v2.ConfluentResourceResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
Delete a Confluent resource with the provided resource id for the account associated with the provided account ID.
This endpoint requires the manage_integrations permission.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete resource from Confluent account returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ConfluentCloudApi(configuration);constparams: v2.ConfluentCloudApiDeleteConfluentResourceRequest={accountId:"account_id",resourceId:"resource_id",};apiInstance.deleteConfluentResource(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Add resource to Confluent account returns "OK" response
packagemainimport("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 "confluent_account" in the system
ConfluentAccountDataID:=os.Getenv("CONFLUENT_ACCOUNT_DATA_ID")body:=datadogV2.ConfluentResourceRequest{Data:datadogV2.ConfluentResourceRequestData{Attributes:datadogV2.ConfluentResourceRequestAttributes{ResourceType:"kafka",Tags:[]string{"myTag","myTag2:myValue",},EnableCustomMetrics:datadog.PtrBool(false),},Id:"exampleconfluentcloud",Type:datadogV2.CONFLUENTRESOURCETYPE_CONFLUENT_CLOUD_RESOURCES,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewConfluentCloudApi(apiClient)resp,r,err:=api.CreateConfluentResource(ctx,ConfluentAccountDataID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `ConfluentCloudApi.CreateConfluentResource`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `ConfluentCloudApi.CreateConfluentResource`:\n%s\n",responseContent)}
// Add resource to Confluent account returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.ConfluentCloudApi;importcom.datadog.api.client.v2.model.ConfluentResourceRequest;importcom.datadog.api.client.v2.model.ConfluentResourceRequestAttributes;importcom.datadog.api.client.v2.model.ConfluentResourceRequestData;importcom.datadog.api.client.v2.model.ConfluentResourceResponse;importcom.datadog.api.client.v2.model.ConfluentResourceType;importjava.util.Arrays;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();ConfluentCloudApiapiInstance=newConfluentCloudApi(defaultClient);// there is a valid "confluent_account" in the systemStringCONFLUENT_ACCOUNT_DATA_ID=System.getenv("CONFLUENT_ACCOUNT_DATA_ID");ConfluentResourceRequestbody=newConfluentResourceRequest().data(newConfluentResourceRequestData().attributes(newConfluentResourceRequestAttributes().resourceType("kafka").tags(Arrays.asList("myTag","myTag2:myValue")).enableCustomMetrics(false)).id("exampleconfluentcloud").type(ConfluentResourceType.CONFLUENT_CLOUD_RESOURCES));try{ConfluentResourceResponseresult=apiInstance.createConfluentResource(CONFLUENT_ACCOUNT_DATA_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling ConfluentCloudApi#createConfluentResource");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Add resource to Confluent account returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.confluent_cloud_apiimportConfluentCloudApifromdatadog_api_client.v2.model.confluent_resource_requestimportConfluentResourceRequestfromdatadog_api_client.v2.model.confluent_resource_request_attributesimportConfluentResourceRequestAttributesfromdatadog_api_client.v2.model.confluent_resource_request_dataimportConfluentResourceRequestDatafromdatadog_api_client.v2.model.confluent_resource_typeimportConfluentResourceType# there is a valid "confluent_account" in the systemCONFLUENT_ACCOUNT_DATA_ID=environ["CONFLUENT_ACCOUNT_DATA_ID"]body=ConfluentResourceRequest(data=ConfluentResourceRequestData(attributes=ConfluentResourceRequestAttributes(resource_type="kafka",tags=["myTag","myTag2:myValue",],enable_custom_metrics=False,),id="exampleconfluentcloud",type=ConfluentResourceType.CONFLUENT_CLOUD_RESOURCES,),)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=ConfluentCloudApi(api_client)response=api_instance.create_confluent_resource(account_id=CONFLUENT_ACCOUNT_DATA_ID,body=body)print(response)
# Add resource to Confluent account returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::ConfluentCloudAPI.new# there is a valid "confluent_account" in the systemCONFLUENT_ACCOUNT_DATA_ID=ENV["CONFLUENT_ACCOUNT_DATA_ID"]body=DatadogAPIClient::V2::ConfluentResourceRequest.new({data:DatadogAPIClient::V2::ConfluentResourceRequestData.new({attributes:DatadogAPIClient::V2::ConfluentResourceRequestAttributes.new({resource_type:"kafka",tags:["myTag","myTag2:myValue",],enable_custom_metrics:false,}),id:"exampleconfluentcloud",type:DatadogAPIClient::V2::ConfluentResourceType::CONFLUENT_CLOUD_RESOURCES,}),})papi_instance.create_confluent_resource(CONFLUENT_ACCOUNT_DATA_ID,body)
// Add resource to Confluent account returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_confluent_cloud::ConfluentCloudAPI;usedatadog_api_client::datadogV2::model::ConfluentResourceRequest;usedatadog_api_client::datadogV2::model::ConfluentResourceRequestAttributes;usedatadog_api_client::datadogV2::model::ConfluentResourceRequestData;usedatadog_api_client::datadogV2::model::ConfluentResourceType;#[tokio::main]asyncfnmain(){// there is a valid "confluent_account" in the system
letconfluent_account_data_id=std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap();letbody=ConfluentResourceRequest::new(ConfluentResourceRequestData::new(ConfluentResourceRequestAttributes::new("kafka".to_string()).enable_custom_metrics(false).tags(vec!["myTag".to_string(),"myTag2:myValue".to_string()]),"exampleconfluentcloud".to_string(),ConfluentResourceType::CONFLUENT_CLOUD_RESOURCES,));letconfiguration=datadog::Configuration::new();letapi=ConfluentCloudAPI::with_config(configuration);letresp=api.create_confluent_resource(confluent_account_data_id.clone(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Add resource to Confluent account returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ConfluentCloudApi(configuration);// there is a valid "confluent_account" in the system
constCONFLUENT_ACCOUNT_DATA_ID=process.env.CONFLUENT_ACCOUNT_DATA_IDasstring;constparams: v2.ConfluentCloudApiCreateConfluentResourceRequest={body:{data:{attributes:{resourceType:"kafka",tags:["myTag","myTag2:myValue"],enableCustomMetrics: false,},id:"exampleconfluentcloud",type:"confluent-cloud-resources",},},accountId: CONFLUENT_ACCOUNT_DATA_ID,};apiInstance.createConfluentResource(params).then((data: v2.ConfluentResourceResponse)=>{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.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* List Confluent Account resources returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ConfluentCloudApi(configuration);constparams: v2.ConfluentCloudApiListConfluentResourceRequest={accountId:"account_id",};apiInstance.listConfluentResource(params).then((data: v2.ConfluentResourcesResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Update Confluent account returns "OK" response
packagemainimport("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 "confluent_account" in the system
ConfluentAccountDataAttributesAPIKey:=os.Getenv("CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY")ConfluentAccountDataID:=os.Getenv("CONFLUENT_ACCOUNT_DATA_ID")body:=datadogV2.ConfluentAccountUpdateRequest{Data:datadogV2.ConfluentAccountUpdateRequestData{Attributes:datadogV2.ConfluentAccountUpdateRequestAttributes{ApiKey:ConfluentAccountDataAttributesAPIKey,ApiSecret:"update-secret",Tags:[]string{"updated_tag:val",},},Type:datadogV2.CONFLUENTACCOUNTTYPE_CONFLUENT_CLOUD_ACCOUNTS,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewConfluentCloudApi(apiClient)resp,r,err:=api.UpdateConfluentAccount(ctx,ConfluentAccountDataID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `ConfluentCloudApi.UpdateConfluentAccount`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `ConfluentCloudApi.UpdateConfluentAccount`:\n%s\n",responseContent)}
// Update Confluent account returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.ConfluentCloudApi;importcom.datadog.api.client.v2.model.ConfluentAccountResponse;importcom.datadog.api.client.v2.model.ConfluentAccountType;importcom.datadog.api.client.v2.model.ConfluentAccountUpdateRequest;importcom.datadog.api.client.v2.model.ConfluentAccountUpdateRequestAttributes;importcom.datadog.api.client.v2.model.ConfluentAccountUpdateRequestData;importjava.util.Collections;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();ConfluentCloudApiapiInstance=newConfluentCloudApi(defaultClient);// there is a valid "confluent_account" in the systemStringCONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY=System.getenv("CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY");StringCONFLUENT_ACCOUNT_DATA_ID=System.getenv("CONFLUENT_ACCOUNT_DATA_ID");ConfluentAccountUpdateRequestbody=newConfluentAccountUpdateRequest().data(newConfluentAccountUpdateRequestData().attributes(newConfluentAccountUpdateRequestAttributes().apiKey(CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY).apiSecret("update-secret").tags(Collections.singletonList("updated_tag:val"))).type(ConfluentAccountType.CONFLUENT_CLOUD_ACCOUNTS));try{ConfluentAccountResponseresult=apiInstance.updateConfluentAccount(CONFLUENT_ACCOUNT_DATA_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling ConfluentCloudApi#updateConfluentAccount");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Update Confluent account returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.confluent_cloud_apiimportConfluentCloudApifromdatadog_api_client.v2.model.confluent_account_typeimportConfluentAccountTypefromdatadog_api_client.v2.model.confluent_account_update_requestimportConfluentAccountUpdateRequestfromdatadog_api_client.v2.model.confluent_account_update_request_attributesimport(ConfluentAccountUpdateRequestAttributes,)fromdatadog_api_client.v2.model.confluent_account_update_request_dataimportConfluentAccountUpdateRequestData# there is a valid "confluent_account" in the systemCONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY=environ["CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY"]CONFLUENT_ACCOUNT_DATA_ID=environ["CONFLUENT_ACCOUNT_DATA_ID"]body=ConfluentAccountUpdateRequest(data=ConfluentAccountUpdateRequestData(attributes=ConfluentAccountUpdateRequestAttributes(api_key=CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY,api_secret="update-secret",tags=["updated_tag:val",],),type=ConfluentAccountType.CONFLUENT_CLOUD_ACCOUNTS,),)configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=ConfluentCloudApi(api_client)response=api_instance.update_confluent_account(account_id=CONFLUENT_ACCOUNT_DATA_ID,body=body)print(response)
# Update Confluent account returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::ConfluentCloudAPI.new# there is a valid "confluent_account" in the systemCONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY=ENV["CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY"]CONFLUENT_ACCOUNT_DATA_ID=ENV["CONFLUENT_ACCOUNT_DATA_ID"]body=DatadogAPIClient::V2::ConfluentAccountUpdateRequest.new({data:DatadogAPIClient::V2::ConfluentAccountUpdateRequestData.new({attributes:DatadogAPIClient::V2::ConfluentAccountUpdateRequestAttributes.new({api_key:CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY,api_secret:"update-secret",tags:["updated_tag:val",],}),type:DatadogAPIClient::V2::ConfluentAccountType::CONFLUENT_CLOUD_ACCOUNTS,}),})papi_instance.update_confluent_account(CONFLUENT_ACCOUNT_DATA_ID,body)
// Update Confluent account returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_confluent_cloud::ConfluentCloudAPI;usedatadog_api_client::datadogV2::model::ConfluentAccountType;usedatadog_api_client::datadogV2::model::ConfluentAccountUpdateRequest;usedatadog_api_client::datadogV2::model::ConfluentAccountUpdateRequestAttributes;usedatadog_api_client::datadogV2::model::ConfluentAccountUpdateRequestData;#[tokio::main]asyncfnmain(){// there is a valid "confluent_account" in the system
letconfluent_account_data_attributes_api_key=std::env::var("CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY").unwrap();letconfluent_account_data_id=std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap();letbody=ConfluentAccountUpdateRequest::new(ConfluentAccountUpdateRequestData::new(ConfluentAccountUpdateRequestAttributes::new(confluent_account_data_attributes_api_key.clone(),"update-secret".to_string(),).tags(vec!["updated_tag:val".to_string()]),ConfluentAccountType::CONFLUENT_CLOUD_ACCOUNTS,));letconfiguration=datadog::Configuration::new();letapi=ConfluentCloudAPI::with_config(configuration);letresp=api.update_confluent_account(confluent_account_data_id.clone(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Update Confluent account returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ConfluentCloudApi(configuration);// there is a valid "confluent_account" in the system
constCONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY=process.env.CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEYasstring;constCONFLUENT_ACCOUNT_DATA_ID=process.env.CONFLUENT_ACCOUNT_DATA_IDasstring;constparams: v2.ConfluentCloudApiUpdateConfluentAccountRequest={body:{data:{attributes:{apiKey: CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY,apiSecret:"update-secret",tags:["updated_tag:val"],},type:"confluent-cloud-accounts",},},accountId: CONFLUENT_ACCOUNT_DATA_ID,};apiInstance.updateConfluentAccount(params).then((data: v2.ConfluentAccountResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Get Confluent account returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.confluent_cloud_apiimportConfluentCloudApi# there is a valid "confluent_account" in the systemCONFLUENT_ACCOUNT_DATA_ID=environ["CONFLUENT_ACCOUNT_DATA_ID"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=ConfluentCloudApi(api_client)response=api_instance.get_confluent_account(account_id=CONFLUENT_ACCOUNT_DATA_ID,)print(response)
# Get Confluent account returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::ConfluentCloudAPI.new# there is a valid "confluent_account" in the systemCONFLUENT_ACCOUNT_DATA_ID=ENV["CONFLUENT_ACCOUNT_DATA_ID"]papi_instance.get_confluent_account(CONFLUENT_ACCOUNT_DATA_ID)
// Get Confluent account returns "OK" response
packagemainimport("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 "confluent_account" in the system
ConfluentAccountDataID:=os.Getenv("CONFLUENT_ACCOUNT_DATA_ID")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewConfluentCloudApi(apiClient)resp,r,err:=api.GetConfluentAccount(ctx,ConfluentAccountDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `ConfluentCloudApi.GetConfluentAccount`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `ConfluentCloudApi.GetConfluentAccount`:\n%s\n",responseContent)}
// Get Confluent account returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.ConfluentCloudApi;importcom.datadog.api.client.v2.model.ConfluentAccountResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();ConfluentCloudApiapiInstance=newConfluentCloudApi(defaultClient);// there is a valid "confluent_account" in the systemStringCONFLUENT_ACCOUNT_DATA_ID=System.getenv("CONFLUENT_ACCOUNT_DATA_ID");try{ConfluentAccountResponseresult=apiInstance.getConfluentAccount(CONFLUENT_ACCOUNT_DATA_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling ConfluentCloudApi#getConfluentAccount");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get Confluent account returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_confluent_cloud::ConfluentCloudAPI;#[tokio::main]asyncfnmain(){// there is a valid "confluent_account" in the system
letconfluent_account_data_id=std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap();letconfiguration=datadog::Configuration::new();letapi=ConfluentCloudAPI::with_config(configuration);letresp=api.get_confluent_account(confluent_account_data_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Get Confluent account returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ConfluentCloudApi(configuration);// there is a valid "confluent_account" in the system
constCONFLUENT_ACCOUNT_DATA_ID=process.env.CONFLUENT_ACCOUNT_DATA_IDasstring;constparams: v2.ConfluentCloudApiGetConfluentAccountRequest={accountId: CONFLUENT_ACCOUNT_DATA_ID,};apiInstance.getConfluentAccount(params).then((data: v2.ConfluentAccountResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Delete Confluent account returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.confluent_cloud_apiimportConfluentCloudApi# there is a valid "confluent_account" in the systemCONFLUENT_ACCOUNT_DATA_ID=environ["CONFLUENT_ACCOUNT_DATA_ID"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=ConfluentCloudApi(api_client)api_instance.delete_confluent_account(account_id=CONFLUENT_ACCOUNT_DATA_ID,)
# Delete Confluent account returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::ConfluentCloudAPI.new# there is a valid "confluent_account" in the systemCONFLUENT_ACCOUNT_DATA_ID=ENV["CONFLUENT_ACCOUNT_DATA_ID"]api_instance.delete_confluent_account(CONFLUENT_ACCOUNT_DATA_ID)
// Delete Confluent account returns "OK" response
packagemainimport("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 "confluent_account" in the system
ConfluentAccountDataID:=os.Getenv("CONFLUENT_ACCOUNT_DATA_ID")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewConfluentCloudApi(apiClient)r,err:=api.DeleteConfluentAccount(ctx,ConfluentAccountDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `ConfluentCloudApi.DeleteConfluentAccount`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}}
// Delete Confluent account returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.ConfluentCloudApi;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();ConfluentCloudApiapiInstance=newConfluentCloudApi(defaultClient);// there is a valid "confluent_account" in the systemStringCONFLUENT_ACCOUNT_DATA_ID=System.getenv("CONFLUENT_ACCOUNT_DATA_ID");try{apiInstance.deleteConfluentAccount(CONFLUENT_ACCOUNT_DATA_ID);}catch(ApiExceptione){System.err.println("Exception when calling ConfluentCloudApi#deleteConfluentAccount");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Delete Confluent account returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_confluent_cloud::ConfluentCloudAPI;#[tokio::main]asyncfnmain(){// there is a valid "confluent_account" in the system
letconfluent_account_data_id=std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap();letconfiguration=datadog::Configuration::new();letapi=ConfluentCloudAPI::with_config(configuration);letresp=api.delete_confluent_account(confluent_account_data_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete Confluent account returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ConfluentCloudApi(configuration);// there is a valid "confluent_account" in the system
constCONFLUENT_ACCOUNT_DATA_ID=process.env.CONFLUENT_ACCOUNT_DATA_IDasstring;constparams: v2.ConfluentCloudApiDeleteConfluentAccountRequest={accountId: CONFLUENT_ACCOUNT_DATA_ID,};apiInstance.deleteConfluentAccount(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.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Add Confluent account returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ConfluentCloudApi(configuration);constparams: v2.ConfluentCloudApiCreateConfluentAccountRequest={body:{data:{attributes:{apiKey:"TESTAPIKEY123",apiSecret:"test-api-secret-123",resources:[{enableCustomMetrics: false,id:"resource-id-123",resourceType:"kafka",tags:["myTag","myTag2:myValue"],},],tags:["myTag","myTag2:myValue"],},type:"confluent-cloud-accounts",},},};apiInstance.createConfluentAccount(params).then((data: v2.ConfluentAccountResponse)=>{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.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* List Confluent accounts returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.ConfluentCloudApi(configuration);apiInstance.listConfluentAccount().then((data: v2.ConfluentAccountsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));