Skip to main content

price_sheets

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

Overview

Nameprice_sheets
TypeResource
Idazure.consumption.price_sheets

Fields

The following fields are returned by SELECT queries:

OK. The request has succeeded.

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
namestringThe name of the resource
propertiesobjectprice sheet result. It contains the pricesheet associated with billing period (title: Price sheet properties)
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_periodselectsubscriptionId, billingPeriodName$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.
getselectsubscriptionId$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_periodexecbillingAccountId, billingPeriodNameGenerates 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
billingAccountIdstringBillingAccount ID
billingPeriodNamestringBilling Period Name.
subscriptionIdstringAzure Subscription ID.
$expandstringMay be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet.
$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.
$topinteger (int32)May be used to limit the number of results to the top N results.

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,
properties,
type
FROM azure.consumption.price_sheets
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND billingPeriodName = '{{ billingPeriodName }}' -- 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_sheets.download_by_billing_account_period 
@billingAccountId='{{ billingAccountId }}' --required,
@billingPeriodName='{{ billingPeriodName }}' --required
;