Skip to main content

transactions

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

Overview

Nametransactions
TypeResource
Idazure.billing.transactions

Fields

The following fields are returned by SELECT queries:

The list of transactions.

NameDatatypeDescription
propertiesobjectA transaction.
tagsobjectDictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? /

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_customerselectbillingAccountName, billingProfileName, customerName, periodStartDate, periodEndDate, typefilter, orderBy, top, skip, count, searchLists the billed or unbilled transactions by customer id for given start date and end date. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are listed under pending invoice Id and do not include tax. Tax is added to the amount once an invoice is generated.
list_by_billing_profileselectbillingAccountName, billingProfileName, periodStartDate, periodEndDate, typefilter, orderBy, top, skip, count, searchLists the billed or unbilled transactions by billing profile name for given start and end date. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are listed under pending invoice Id and do not include tax. Tax is added to the amount once an invoice is generated.
transactions_download_by_invoiceexecbillingAccountName, invoiceNameGets a URL to download the transactions document for an invoice. The operation is supported for billing accounts with agreement type Enterprise Agreement.

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
billingAccountNamestringThe ID that uniquely identifies a billing account.
billingProfileNamestringThe ID that uniquely identifies a billing profile.
customerNamestringThe ID that uniquely identifies a customer.
invoiceNamestringThe ID that uniquely identifies an invoice.
periodEndDatestring (date)The end date to fetch the transactions. The date should be specified in MM-DD-YYYY format.
periodStartDatestring (date)The start date to fetch the transactions. The date should be specified in MM-DD-YYYY format.
typestringThe type of transaction.
countbooleanThe count query option allows clients to request a count of the matching resources included with the resources in the response.
filterstringThe filter query option allows clients to filter a collection of resources that are addressed by a request URL.
orderBystringThe orderby query option allows clients to request resources in a particular order.
skipinteger (int64)The skip query option requests the number of items in the queried collection that are to be skipped and not included in the result.
topinteger (int64)The top query option requests the number of items in the queried collection to be included in the result. The maximum supported value for top is 50.

SELECT examples

Lists the billed or unbilled transactions by customer id for given start date and end date. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are listed under pending invoice Id and do not include tax. Tax is added to the amount once an invoice is generated.

SELECT
properties,
tags
FROM azure.billing.transactions
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND billingProfileName = '{{ billingProfileName }}' -- required
AND customerName = '{{ customerName }}' -- required
AND periodStartDate = '{{ periodStartDate }}' -- required
AND periodEndDate = '{{ periodEndDate }}' -- required
AND type = '{{ type }}' -- required
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND count = '{{ count }}'
AND search = '{{ search }}'
;

Lifecycle Methods

Gets a URL to download the transactions document for an invoice. The operation is supported for billing accounts with agreement type Enterprise Agreement.

EXEC azure.billing.transactions.transactions_download_by_invoice 
@billingAccountName='{{ billingAccountName }}' --required,
@invoiceName='{{ invoiceName }}' --required
;