Skip to main content

credits

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

Overview

Namecredits
TypeResource
Idazure.consumption.credits

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.
balanceSummaryobjectSummary of balances associated with this credit summary.
billingCurrencystringThe billing currency.
creditCurrencystringThe credit currency.
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.
expiredCreditobjectExpired credit.
isEstimatedBalancebooleanIf true, the listed details are based on an estimation and it will be subjected to change.
pendingCreditAdjustmentsobjectPending credit adjustments.
pendingEligibleChargesobjectPending eligible charges.
resellerobjectCredit's reseller.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectA list of Tag.
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
getselectbilling_account_id, billing_profile_idThe credit summary by billingAccountId and billingProfileId.

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_profile_idstringAzure Billing Profile ID. Required.

SELECT examples

The credit summary by billingAccountId and billingProfileId.

SELECT
id,
name,
balanceSummary,
billingCurrency,
creditCurrency,
eTag,
expiredCredit,
isEstimatedBalance,
pendingCreditAdjustments,
pendingEligibleCharges,
reseller,
systemData,
tags,
type
FROM azure.consumption.credits
WHERE billing_account_id = '{{ billing_account_id }}' -- required
AND billing_profile_id = '{{ billing_profile_id }}' -- required
;