Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR monitor/resource-manager] [Monitor] Fixing issue with metrics api query parameter name (#2575) #2087

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer):
self.config = config

def list(
self, resource_uri, timespan=None, interval=None, metric=None, aggregation=None, top=None, orderby=None, filter=None, result_type=None, metricnamespace=None, custom_headers=None, raw=False, **operation_config):
self, resource_uri, timespan=None, interval=None, metricnames=None, aggregation=None, top=None, orderby=None, filter=None, result_type=None, metricnamespace=None, custom_headers=None, raw=False, **operation_config):
"""**Lists the metric values for a resource**.

:param resource_uri: The identifier of the resource.
Expand All @@ -47,8 +47,9 @@ def list(
:type timespan: str
:param interval: The interval (i.e. timegrain) of the query.
:type interval: timedelta
:param metric: The name of the metric to retrieve.
:type metric: str
:param metricnames: The names of the metrics (comma separated) to
retrieve.
:type metricnames: str
:param aggregation: The list of aggregation types (comma separated) to
retrieve.
:type aggregation: str
Expand Down Expand Up @@ -103,8 +104,8 @@ def list(
query_parameters['timespan'] = self._serialize.query("timespan", timespan, 'str')
if interval is not None:
query_parameters['interval'] = self._serialize.query("interval", interval, 'duration')
if metric is not None:
query_parameters['metric'] = self._serialize.query("metric", metric, 'str')
if metricnames is not None:
query_parameters['metricnames'] = self._serialize.query("metricnames", metricnames, 'str')
if aggregation is not None:
query_parameters['aggregation'] = self._serialize.query("aggregation", aggregation, 'str')
if top is not None:
Expand Down