"""
Delete deployment gate returns "No Content" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.deployment_gates_apiimportDeploymentGatesApi# there is a valid "deployment_gate" in the systemDEPLOYMENT_GATE_DATA_ID=environ["DEPLOYMENT_GATE_DATA_ID"]configuration=Configuration()configuration.unstable_operations["delete_deployment_gate"]=TruewithApiClient(configuration)asapi_client:api_instance=DeploymentGatesApi(api_client)api_instance.delete_deployment_gate(id=DEPLOYMENT_GATE_DATA_ID,)
# Delete deployment gate returns "No Content" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.delete_deployment_gate".to_sym]=trueendapi_instance=DatadogAPIClient::V2::DeploymentGatesAPI.new# there is a valid "deployment_gate" in the systemDEPLOYMENT_GATE_DATA_ID=ENV["DEPLOYMENT_GATE_DATA_ID"]api_instance.delete_deployment_gate(DEPLOYMENT_GATE_DATA_ID)
// Delete deployment gate 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 "deployment_gate" in the systemDeploymentGateDataID:=os.Getenv("DEPLOYMENT_GATE_DATA_ID")ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.DeleteDeploymentGate",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewDeploymentGatesApi(apiClient)r,err:=api.DeleteDeploymentGate(ctx,DeploymentGateDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `DeploymentGatesApi.DeleteDeploymentGate`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}}
// Delete deployment gate returns "No Content" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.DeploymentGatesApi;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.deleteDeploymentGate",true);DeploymentGatesApiapiInstance=newDeploymentGatesApi(defaultClient);// there is a valid "deployment_gate" in the systemStringDEPLOYMENT_GATE_DATA_ID=System.getenv("DEPLOYMENT_GATE_DATA_ID");try{apiInstance.deleteDeploymentGate(DEPLOYMENT_GATE_DATA_ID);}catch(ApiExceptione){System.err.println("Exception when calling DeploymentGatesApi#deleteDeploymentGate");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Delete deployment gate returns "No Content" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_deployment_gates::DeploymentGatesAPI;#[tokio::main]asyncfnmain(){// there is a valid "deployment_gate" in the system
letdeployment_gate_data_id=std::env::var("DEPLOYMENT_GATE_DATA_ID").unwrap();letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.DeleteDeploymentGate",true);letapi=DeploymentGatesAPI::with_config(configuration);letresp=api.delete_deployment_gate(deployment_gate_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.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Delete deployment gate returns "No Content" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.deleteDeploymentGate"]=true;constapiInstance=newv2.DeploymentGatesApi(configuration);// there is a valid "deployment_gate" in the system
constDEPLOYMENT_GATE_DATA_ID=process.env.DEPLOYMENT_GATE_DATA_IDasstring;constparams: v2.DeploymentGatesApiDeleteDeploymentGateRequest={id: DEPLOYMENT_GATE_DATA_ID,};apiInstance.deleteDeploymentGate(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));