Deletes a usage quota by its opaque identifier. The quota must belong to the caller’s organization or one of its descendants, and its opaque identifier must belong to the requested quota namespace. Requires the user_access_manage, billing_edit, and org_management permissions.
This endpoint requires
all
of the following permissions:
user_access_manage
billing_edit
org_management
OAuth apps require the user_access_manage, billing_edit, org_management authorization scope to access this endpoint.
Arguments
Path Parameters
Name
Type
Description
quota_namespace [required]
string
The product-specific namespace whose usage quotas are being managed.
id [required]
string
The opaque quota identifier returned by a previous list or create request. Clients must pass this value verbatim.
"""
Delete a usage quota returns "No Content" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.usage_metering_apiimportUsageMeteringApiconfiguration=Configuration()configuration.unstable_operations["delete_quota"]=TruewithApiClient(configuration)asapi_client:api_instance=UsageMeteringApi(api_client)api_instance.delete_quota(quota_namespace="ai_credits",id="MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f",)
# Delete a usage quota returns "No Content" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.delete_quota".to_sym]=trueendapi_instance=DatadogAPIClient::V2::UsageMeteringAPI.newapi_instance.delete_quota("ai_credits","MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f")
// Delete a usage quota returns "No Content" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_usage_metering::UsageMeteringAPI;#[tokio::main]asyncfnmain(){letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.DeleteQuota",true);letapi=UsageMeteringAPI::with_config(configuration);letresp=api.delete_quota("ai_credits".to_string(),"MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f".to_string(),).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="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Delete a usage quota returns "No Content" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.deleteQuota"]=true;constapiInstance=newv2.UsageMeteringApi(configuration);constparams: v2.UsageMeteringApiDeleteQuotaRequest={quotaNamespace:"ai_credits",id:"MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f",};apiInstance.deleteQuota(params).then((data: any)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));