Skip to main content

pool_usage_metrics

Creates, updates, deletes, gets or lists a pool_usage_metrics resource.

Overview

Namepool_usage_metrics
TypeResource
Idazure.batch_dataplane.pool_usage_metrics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
endTimestring (date-time)The end time of the aggregation interval covered by this entry. Required.
poolIdstringThe ID of the Pool whose metrics are aggregated in this entry. Required.
startTimestring (date-time)The start time of the aggregation interval covered by this entry. Required.
totalCoreHoursnumberThe total core hours used in the Pool during this aggregation interval. Required.
vmSizestringThe size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes _). Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_pool_usage_metricsselectendpointtimeOut, ocp-date, maxresults, startTime, endtime, $filterLists the usage metrics, aggregated by Pool across individual time intervals, for the specified Account. If you do not specify a $filter clause including a poolId, the response includes all Pools that existed in the Account in the time range of the returned aggregation intervals. If you do not specify a $filter clause including a startTime or endTime these filters default to the start and end times of the last aggregation interval currently available; that is, only the last aggregation interval is returned.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
$filterstringAn OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics _. Default value is None.
endtimestring (date-time)The latest time from which to include metrics. This must be at least two hours before the current time. If not specified this defaults to the end time of the last aggregation interval currently available. Default value is None.
maxresultsintegerThe maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None.
ocp-datestringThe time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None.
startTimestring (date-time)The earliest time from which to include metrics. This must be at least two and a half hours before the current time. If not specified this defaults to the start time of the last aggregation interval currently available. Default value is None.
timeOutintegerThe maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None.

SELECT examples

Lists the usage metrics, aggregated by Pool across individual time intervals, for the specified Account. If you do not specify a $filter clause including a poolId, the response includes all Pools that existed in the Account in the time range of the returned aggregation intervals. If you do not specify a $filter clause including a startTime or endTime these filters default to the start and end times of the last aggregation interval currently available; that is, only the last aggregation interval is returned.

SELECT
endTime,
poolId,
startTime,
totalCoreHours,
vmSize
FROM azure.batch_dataplane.pool_usage_metrics
WHERE endpoint = '{{ endpoint }}' -- required
AND timeOut = '{{ timeOut }}'
AND ocp-date = '{{ ocp-date }}'
AND maxresults = '{{ maxresults }}'
AND startTime = '{{ startTime }}'
AND endtime = '{{ endtime }}'
AND $filter = '{{ $filter }}'
;