Package com.azure.monitor.query.metrics
Class MetricsClient
java.lang.Object
com.azure.monitor.query.metrics.MetricsClient
This class provides synchronous client that contains all the query operations that use batch requests to retrieve
metrics for multiple resources.
-
Method Summary
Modifier and TypeMethodDescriptionReturns all the Azure Monitor metrics requested for the batch of resources.com.azure.core.http.rest.Response
<MetricsQueryResourcesResult> queryResourcesWithResponse
(List<String> resourceIds, List<String> metricsNames, String metricsNamespace, MetricsQueryResourcesOptions options, com.azure.core.util.Context context) Returns all the Azure Monitor metrics requested for the batch of resources.
-
Method Details
-
queryResources
public MetricsQueryResourcesResult queryResources(List<String> resourceIds, List<String> metricsNames, String metricsNamespace) Returns all the Azure Monitor metrics requested for the batch of resources.- Parameters:
resourceIds
- The resource ids for which the metrics is requested.metricsNames
- The names of the metrics to query.metricsNamespace
- The namespace of the metrics to query.- Returns:
- A time-series metrics result for the requested metric names.
-
queryResourcesWithResponse
public com.azure.core.http.rest.Response<MetricsQueryResourcesResult> queryResourcesWithResponse(List<String> resourceIds, List<String> metricsNames, String metricsNamespace, MetricsQueryResourcesOptions options, com.azure.core.util.Context context) Returns all the Azure Monitor metrics requested for the batch of resources.- Parameters:
resourceIds
- The resource ids for which the metrics is requested.metricsNames
- The names of the metrics to query.metricsNamespace
- The namespace of the metrics to query.options
- TheMetricsQueryResourcesOptions
to include for the request.context
- The context to associate with this operation.- Returns:
- A time-series metrics result for the requested metric names.
- Throws:
IllegalArgumentException
- thrown ifresourceIds
,metricsNames
ormetricsNamespace
are empty.NullPointerException
- thrown ifresourceIds
,metricsNames
ormetricsNamespace
are null.
-