accounts
Creates, updates, deletes, gets or lists an accounts
resource.
Overview
Name | accounts |
Type | Resource |
Id | azure.billing.accounts |
Fields
The following fields are returned by SELECT
queries:
- get
- list
A billing account.
Name | Datatype | Description |
---|---|---|
properties | object | A billing account. |
tags | object | Dictionary 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 < > % & \ ? / |
The list of billing accounts.
Name | Datatype | Description |
---|---|---|
properties | object | A billing account. |
tags | object | Dictionary 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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | billingAccountName | Gets a billing account by its ID. | |
list | select | includeAll , includeAllWithoutBillingProfiles , includeDeleted , includePendingAgreement , includeResellee , legalOwnerTID , legalOwnerOID , filter , expand , top , skip , search | Lists the billing accounts that a user has access to. | |
update | update | billingAccountName | Updates the properties of a billing account. Currently, displayName and address can be updated for billing accounts with agreement type Microsoft Customer Agreement. Currently address and notification email address can be updated for billing accounts with agreement type Microsoft Online Services Agreement. Currently, purchase order number can be edited for billing accounts with agreement type Enterprise Agreement. | |
add_payment_terms | exec | billingAccountName | Adds payment terms to all the billing profiles under the billing account. Currently, payment terms can be added only on billing accounts that have Agreement Type as 'Microsoft Customer Agreement' and AccountType as 'Enterprise'. This action needs pre-authorization and only Field Sellers are authorized to add the payment terms and is not a self-serve action. | |
cancel_payment_terms | exec | billingAccountName | Cancels all the payment terms on billing account that falls after the cancellation date in the request. Currently, cancel payment terms is only served by admin actions and is not a self-serve action. | |
confirm_transition | exec | billingAccountName | Gets the transition details for a billing account that has transitioned from agreement type Microsoft Online Services Program to agreement type Microsoft Customer Agreement. | |
validate_payment_terms | exec | billingAccountName | Validates payment terms on a billing account with agreement type 'Microsoft Customer Agreement' and account type 'Enterprise'. |
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 |
---|---|---|
billingAccountName | string | The ID that uniquely identifies a billing account. |
expand | string | Expand is allowed for SoldTo and EnrollmentDetails/PONumber. |
filter | string | The filter query option allows clients to filter a collection of resources that are addressed by a request URL. |
includeAll | boolean | When true, results will include Billing Accounts that the user does not have a direct role assignment on if the user has one of the following AAD roles: Global Administrator, Global Reader, Billing Administrator. |
includeAllWithoutBillingProfiles | boolean | When true, results will include Billing Accounts that are not fully created if the user has one of the following AAD roles: Global Administrator, Global Reader, Billing Administrator. |
includeDeleted | boolean | When true, results will include any billing accounts in a deleted state. |
includePendingAgreement | boolean | Includes billing accounts with agreement pending signature that the user has access to. |
includeResellee | boolean | Includes the customer's billing account of Microsoft Partner Agreement that the user has access to. |
legalOwnerOID | string | Must be combined with legalOwnerTID, results will only include Billing Accounts for whom is legally responsible for the Billing Accounts. Optional. |
legalOwnerTID | string | Must be combined with legalOwnerOID, results will only include Billing Accounts for whom is legally responsible for the Billing Accounts. Optional. |
search | string | The search query option allows clients to request items within a collection matching a free-text search expression. search is only supported for string fields. |
skip | integer (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. |
top | integer (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
- get
- list
Gets a billing account by its ID.
SELECT
properties,
tags
FROM azure.billing.accounts
WHERE billingAccountName = '{{ billingAccountName }}' -- required
;
Lists the billing accounts that a user has access to.
SELECT
properties,
tags
FROM azure.billing.accounts
WHERE includeAll = '{{ includeAll }}'
AND includeAllWithoutBillingProfiles = '{{ includeAllWithoutBillingProfiles }}'
AND includeDeleted = '{{ includeDeleted }}'
AND includePendingAgreement = '{{ includePendingAgreement }}'
AND includeResellee = '{{ includeResellee }}'
AND legalOwnerTID = '{{ legalOwnerTID }}'
AND legalOwnerOID = '{{ legalOwnerOID }}'
AND filter = '{{ filter }}'
AND expand = '{{ expand }}'
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND search = '{{ search }}'
;
UPDATE
examples
- update
Updates the properties of a billing account. Currently, displayName and address can be updated for billing accounts with agreement type Microsoft Customer Agreement. Currently address and notification email address can be updated for billing accounts with agreement type Microsoft Online Services Agreement. Currently, purchase order number can be edited for billing accounts with agreement type Enterprise Agreement.
UPDATE azure.billing.accounts
SET
data__tags = '{{ tags }}',
data__properties = '{{ properties }}'
WHERE
billingAccountName = '{{ billingAccountName }}' --required
RETURNING
properties,
tags;
Lifecycle Methods
- add_payment_terms
- cancel_payment_terms
- confirm_transition
- validate_payment_terms
Adds payment terms to all the billing profiles under the billing account. Currently, payment terms can be added only on billing accounts that have Agreement Type as 'Microsoft Customer Agreement' and AccountType as 'Enterprise'. This action needs pre-authorization and only Field Sellers are authorized to add the payment terms and is not a self-serve action.
EXEC azure.billing.accounts.add_payment_terms
@billingAccountName='{{ billingAccountName }}' --required
;
Cancels all the payment terms on billing account that falls after the cancellation date in the request. Currently, cancel payment terms is only served by admin actions and is not a self-serve action.
EXEC azure.billing.accounts.cancel_payment_terms
@billingAccountName='{{ billingAccountName }}' --required
;
Gets the transition details for a billing account that has transitioned from agreement type Microsoft Online Services Program to agreement type Microsoft Customer Agreement.
EXEC azure.billing.accounts.confirm_transition
@billingAccountName='{{ billingAccountName }}' --required
;
Validates payment terms on a billing account with agreement type 'Microsoft Customer Agreement' and account type 'Enterprise'.
EXEC azure.billing.accounts.validate_payment_terms
@billingAccountName='{{ billingAccountName }}' --required
;