Response object which includes a single metric’s volume.
Expand All
Champ
Type
Description
data
<oneOf>
Possible response objects for a metric's volume.
<type=distinct_metric_volumes>
object
Object for a single metric's distinct volume.
attributes
object
Object containing the definition of a metric's distinct volume.
distinct_volume
int64
Distinct volume for the given metric.
id
string
The metric name for this resource.
type
enum
The metric distinct volume type.
Allowed enum values: distinct_metric_volumes
default: distinct_metric_volumes
<type=metric_volumes>
object
Object for a single metric's ingested and indexed volume.
attributes
object
Object containing the definition of a metric's ingested and indexed volume.
indexed_volume
int64
Estimated average hourly number of indexed time series for the given metric over the last hour. For organizations on Metric Name Pricing, this represents the estimated sum of indexed data points over the last hour.
ingested_volume
int64
Estimated average hourly number of ingested time series for the given metric over the last hour. This value is 0 for metrics not configured with Metrics Without Limits. For organizations on Metric Name Pricing, this represents the estimated sum of ingested data points over the last hour.
id
string
The metric name for this resource.
type
enum
The metric ingested and indexed volume type.
Allowed enum values: metric_volumes
"""
List distinct metric volumes by metric name returns "Success" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.metrics_apiimportMetricsApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=MetricsApi(api_client)response=api_instance.list_volumes_by_metric_name(metric_name="static_test_metric_donotdelete",)print(response)
# List distinct metric volumes by metric name returns "Success" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::MetricsAPI.newpapi_instance.list_volumes_by_metric_name("static_test_metric_donotdelete")
// List distinct metric volumes by metric name returns "Success" responsepackagemainimport("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.NewMetricsApi(apiClient)resp,r,err:=api.ListVolumesByMetricName(ctx,"static_test_metric_donotdelete",*datadogV2.NewListVolumesByMetricNameOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `MetricsApi.ListVolumesByMetricName`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `MetricsApi.ListVolumesByMetricName`:\n%s\n",responseContent)}
// List distinct metric volumes by metric name returns "Success" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.MetricsApi;importcom.datadog.api.client.v2.model.MetricVolumesResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();MetricsApiapiInstance=newMetricsApi(defaultClient);try{MetricVolumesResponseresult=apiInstance.listVolumesByMetricName("static_test_metric_donotdelete");System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling MetricsApi#listVolumesByMetricName");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// List distinct metric volumes by metric name returns "Success" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_metrics::ListVolumesByMetricNameOptionalParams;usedatadog_api_client::datadogV2::api_metrics::MetricsAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=MetricsAPI::with_config(configuration);letresp=api.list_volumes_by_metric_name("static_test_metric_donotdelete".to_string(),ListVolumesByMetricNameOptionalParams::default(),).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
/**
* List distinct metric volumes by metric name returns "Success" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.MetricsApi(configuration);constparams: v2.MetricsApiListVolumesByMetricNameRequest={metricName:"static_test_metric_donotdelete",};apiInstance.listVolumesByMetricName(params).then((data: v2.MetricVolumesResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));