charges
Creates, updates, deletes, gets or lists a charges resource.
Overview
| Name | charges |
| Type | Resource |
| Id | azure.consumption.charges |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
eTag | string | eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. |
kind | string | Specifies the kind of charge summary. Required. Known values are: "legacy" and "modern". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | scope | startDate, endDate, $filter, $apply | Lists the charges based for the defined scope. |
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.
| Name | Datatype | Description |
|---|---|---|
scope | string | The fully qualified Azure Resource manager identifier of the resource. Required. |
$apply | string | May be used to group charges for billingAccount scope by properties/billingProfileId, properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by properties/invoiceSectionId. Default value is None. |
$filter | string | May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time). 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 (:). Default value is None. |
endDate | string | End date. Default value is None. |
startDate | string | Start date. Default value is None. |
SELECT examples
- list
Lists the charges based for the defined scope.
SELECT
id,
name,
eTag,
kind,
systemData,
type
FROM azure.consumption.charges
WHERE scope = '{{ scope }}' -- required
AND startDate = '{{ startDate }}'
AND endDate = '{{ endDate }}'
AND $filter = '{{ $filter }}'
AND $apply = '{{ $apply }}'
;