MetricsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:metrics> attribute.
- Inheritance
-
builtins.objectMetricsOperations
Constructor
MetricsOperations(*args, **kwargs)
Methods
list |
Lists the metric values for a resource. |
list
Lists the metric values for a resource.
list(resource_uri: str, timespan: str | None = None, interval: timedelta | None = None, metric: str | None = None, aggregation: str | None = None, top: int | None = None, orderby: str | None = None, filter: str | None = None, result_type: str | ResultType | None = None, **kwargs: Any) -> Response
Parameters
Name | Description |
---|---|
resource_uri
Required
|
The identifier of the resource. Required. |
timespan
Required
|
The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. Default value is None. |
interval
Required
|
The interval (i.e. timegrain) of the query. Default value is None. |
metric
Required
|
The name of the metric to retrieve. Default value is None. |
aggregation
Required
|
The list of aggregation types (comma separated) to retrieve. Default value is None. |
top
Required
|
The maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10. Default value is None. |
orderby
Required
|
The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc. Default value is None. |
filter
Required
|
The $filter is used to reduce the set of metric data
returned.:code: |
result_type
Required
|
str or
ResultType
Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
Response or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.monitor.v2017_05_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\monitor\\v2017_05_01_preview\\models\\__init__.py'>
Azure SDK for Python