price_sheet
Creates, updates, deletes, gets or lists a price_sheet resource.
Overview
| Name | price_sheet |
| Type | Resource |
| Id | azure.consumption.price_sheet |
Fields
The following fields are returned by SELECT queries:
- get_by_billing_period
- get
| 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. |
download | object | Pricesheet download details. |
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. |
nextLink | string | The link (url) to the next page of results. |
pricesheets | array | Price sheet. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| 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. |
download | object | Pricesheet download details. |
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. |
nextLink | string | The link (url) to the next page of results. |
pricesheets | array | Price sheet. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
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 |
|---|---|---|---|---|
get_by_billing_period | select | billing_period_name, subscription_id | $expand, $skiptoken, $top | Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. |
get | select | subscription_id | $expand, $skiptoken, $top | Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. |
download_by_billing_account_period | exec | billing_account_id, billing_period_name | Generates the pricesheet for the provided billing period asynchronously based on the enrollment id. |
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 |
|---|---|---|
billing_account_id | string | BillingAccount ID. Required. |
billing_period_name | string | Billing Period Name. Required. |
subscription_id | string | |
$expand | string | May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. Default value is None. |
$skiptoken | string | 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. |
$top | integer | May be used to limit the number of results to the top N results. Default value is None. |
SELECT examples
- get_by_billing_period
- get
Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later.
SELECT
id,
name,
download,
etag,
nextLink,
pricesheets,
systemData,
tags,
type
FROM azure.consumption.price_sheet
WHERE billing_period_name = '{{ billing_period_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
AND $skiptoken = '{{ $skiptoken }}'
AND $top = '{{ $top }}'
;
Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
SELECT
id,
name,
download,
etag,
nextLink,
pricesheets,
systemData,
tags,
type
FROM azure.consumption.price_sheet
WHERE subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
AND $skiptoken = '{{ $skiptoken }}'
AND $top = '{{ $top }}'
;
Lifecycle Methods
- download_by_billing_account_period
Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
EXEC azure.consumption.price_sheet.download_by_billing_account_period
@billing_account_id='{{ billing_account_id }}' --required,
@billing_period_name='{{ billing_period_name }}' --required
;