"""
Delete a custom variable returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.webhooks_integration_apiimportWebhooksIntegrationApi# there is a valid "webhook_custom_variable" in the systemWEBHOOK_CUSTOM_VARIABLE_NAME=environ["WEBHOOK_CUSTOM_VARIABLE_NAME"]configuration=Configuration()withApiClient(configuration)asapi_client:api_instance=WebhooksIntegrationApi(api_client)api_instance.delete_webhooks_integration_custom_variable(custom_variable_name=WEBHOOK_CUSTOM_VARIABLE_NAME,)
# Delete a custom variable returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::WebhooksIntegrationAPI.new# there is a valid "webhook_custom_variable" in the systemWEBHOOK_CUSTOM_VARIABLE_NAME=ENV["WEBHOOK_CUSTOM_VARIABLE_NAME"]papi_instance.delete_webhooks_integration_custom_variable(WEBHOOK_CUSTOM_VARIABLE_NAME)
// Delete a custom variable returns "OK" responsepackagemainimport("context""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV1")funcmain(){// there is a valid "webhook_custom_variable" in the systemWebhookCustomVariableName:=os.Getenv("WEBHOOK_CUSTOM_VARIABLE_NAME")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewWebhooksIntegrationApi(apiClient)r,err:=api.DeleteWebhooksIntegrationCustomVariable(ctx,WebhookCustomVariableName)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `WebhooksIntegrationApi.DeleteWebhooksIntegrationCustomVariable`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}}
// Delete a custom variable returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v1.api.WebhooksIntegrationApi;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();WebhooksIntegrationApiapiInstance=newWebhooksIntegrationApi(defaultClient);// there is a valid "webhook_custom_variable" in the systemStringWEBHOOK_CUSTOM_VARIABLE_NAME=System.getenv("WEBHOOK_CUSTOM_VARIABLE_NAME");try{apiInstance.deleteWebhooksIntegrationCustomVariable(WEBHOOK_CUSTOM_VARIABLE_NAME);}catch(ApiExceptione){System.err.println("Exception when calling WebhooksIntegrationApi#deleteWebhooksIntegrationCustomVariable");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Delete a custom variable returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_webhooks_integration::WebhooksIntegrationAPI;#[tokio::main]asyncfnmain(){// there is a valid "webhook_custom_variable" in the system
letwebhook_custom_variable_name=std::env::var("WEBHOOK_CUSTOM_VARIABLE_NAME").unwrap();letconfiguration=datadog::Configuration::new();letapi=WebhooksIntegrationAPI::with_config(configuration);letresp=api.delete_webhooks_integration_custom_variable(webhook_custom_variable_name.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.comus2.ddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete a custom variable returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.WebhooksIntegrationApi(configuration);// there is a valid "webhook_custom_variable" in the system
constWEBHOOK_CUSTOM_VARIABLE_NAME=process.env.WEBHOOK_CUSTOM_VARIABLE_NAMEasstring;constparams: v1.WebhooksIntegrationApiDeleteWebhooksIntegrationCustomVariableRequest={customVariableName: WEBHOOK_CUSTOM_VARIABLE_NAME,};apiInstance.deleteWebhooksIntegrationCustomVariable(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));