Skip to content
Closed
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 @@ -53,6 +53,8 @@ def list(
skiptoken=None, # type: Optional[str]
top=None, # type: Optional[int]
metric=None, # type: Optional[Union[str, "_models.Metrictype"]]
start_date=None, # type: Optional[str]
end_date=None, # type: Optional[str]
**kwargs # type: Any
):
# type: (...) -> Iterable["_models.UsageDetailsListResult"]
Expand Down Expand Up @@ -99,6 +101,14 @@ def list(
:type top: int
:param metric: Allows to select different type of cost/usage records.
:type metric: str or ~azure.mgmt.consumption.models.Metrictype
:param start_date: May be used to specify the beginning of the interval you want usageDetails from.
If start_date and end_date are not included, then the call will return the usageDetails for
the current billing month. Must be in the format YYYY-MM-DD.
:type start_date: str
:param end_date: May be used to specify the end of the interval you want usageDetails from.
If start_date and end_date are not included, then the call will return the usageDetails for
the current billing month. Must be in the format YYYY-MM-DD.
:type end_date: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either UsageDetailsListResult or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.consumption.models.UsageDetailsListResult]
Expand Down Expand Up @@ -137,6 +147,10 @@ def prepare_request(next_link=None):
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
if metric is not None:
query_parameters['metric'] = self._serialize.query("metric", metric, 'str')
if start_date is not None:
query_parameters['startDate'] = self._serialize.query("startDate", start_date, 'str')
if end_date is not None:
query_parameters['endDate'] = self._serialize.query("endDate", end_date, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
Expand Down