Skip to main content

price_sheet

Creates, updates, deletes, gets or lists a price_sheet resource.

Overview

Nameprice_sheet
TypeResource
Idazure.consumption.price_sheet

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
downloadobjectPricesheet download details.
etagstringeTag 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.
nextLinkstringThe link (url) to the next page of results.
pricesheetsarrayPrice sheet.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_billing_periodselectbilling_period_name, subscription_id$expand, $skiptoken, $topGet 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.
getselectsubscription_id$expand, $skiptoken, $topGets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
download_by_billing_account_periodexecbilling_account_id, billing_period_nameGenerates 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.

NameDatatypeDescription
billing_account_idstringBillingAccount ID. Required.
billing_period_namestringBilling Period Name. Required.
subscription_idstring
$expandstringMay 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.
$skiptokenstringSkiptoken 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.
$topintegerMay be used to limit the number of results to the top N results. Default value is None.

SELECT examples

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 }}'
;

Lifecycle Methods

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
;