UsageDetailsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:usage_details> attribute.
Constructor
UsageDetailsOperations(*args, **kwargs)
Methods
| list |
Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do not recommend that you take a new dependency on this API. Please use the Cost Details API instead. We will notify customers once a date for retirement has been determined.For Learn more,see Generate Cost Details Report - Create Operation. |
list
Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later.
Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do not recommend that you take a new dependency on this API. Please use the Cost Details API instead. We will notify customers once a date for retirement has been determined.For Learn more,see Generate Cost Details Report - Create Operation.
list(scope: str, *, expand: str | None = None, filter: str | None = None, skiptoken: str | None = None, top: int | None = None, metric: str | Metrictype | None = None, **kwargs: Any) -> ItemPaged[UsageDetail]
Parameters
| Name | Description |
|---|---|
|
scope
Required
|
The fully qualified Azure Resource manager identifier of the resource. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
expand
|
May be used to expand the properties/additionalInfo or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. Default value is None. Default value: None
|
|
filter
|
May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). PublisherType Filter accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type. Default value is None. Default value: None
|
|
skiptoken
|
Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. Default value is None. Default value: None
|
|
top
|
May be used to limit the number of results to the most recent N usageDetails. Default value is None. Default value: None
|
|
metric
|
str or
Metrictype
Allows to select different type of cost/usage records. Known values are: "actualcost", "amortizedcost", and "usage". Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of UsageDetail |
Exceptions
| Type | Description |
|---|---|