Skip to main content

billing_subscriptions_aliases

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

Overview

Namebilling_subscriptions_aliases
TypeResource
Idazure.billing.billing_subscriptions_aliases

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.
autoRenewstringIndicates whether auto renewal is turned on or off for a product. Known values are: "Off" and "On". (Off, On)
beneficiaryobjectThe beneficiary of the billing subscription.
beneficiaryTenantIdstringThe provisioning tenant of the subscription.
billingFrequencystringThe billing frequency in ISO8601 format of product in the subscription. Example: P1M, P3M, P1Y.
billingPoliciesobjectDictionary of billing policies associated with the subscription.
billingProfileDisplayNamestringThe name of the billing profile.
billingProfileIdstringThe fully qualified ID that uniquely identifies a billing profile.
billingProfileNamestringThe ID that uniquely identifies a billing profile.
billingSubscriptionIdstringThe ID of the billing subscription with the subscription alias.
consumptionCostCenterstringThe cost center applied to the subscription. This field is only available for consumption subscriptions of Microsoft Customer Agreement or Enterprise Agreement Type billing accounts.
customerDisplayNamestringThe name of the customer.
customerIdstringThe fully qualified ID that uniquely identifies a customer.
customerNamestringThe ID that uniquely identifies a customer.
displayNamestringThe name of the billing subscription.
enrollmentAccountDisplayNamestringThe enrollment Account name associated with the subscription. This field is available only for the Enterprise Agreement Type billing accounts.
enrollmentAccountIdstringThe enrollment Account ID associated with the subscription. This field is available only for the Enterprise Agreement Type billing accounts.
enrollmentAccountSubscriptionDetailsobjectEnrollment Account Subscription details. This field is available only for the Enterprise Agreement Type billing accounts.
invoiceSectionDisplayNamestringThe name of the invoice section.
invoiceSectionIdstringThe fully qualified ID that uniquely identifies an invoice section.
invoiceSectionNamestringThe ID that uniquely identifies an invoice section.
lastMonthChargesobjectThe last month's charges. This field is only available for usage based subscriptions of Microsoft Customer Agreement billing accounts.
monthToDateChargesobjectThe current month to date charges. This field is only available for usage based subscriptions of Microsoft Customer Agreement billing accounts.
nextBillingCycleDetailsobjectNext billing cycle details of the subscription.
offerIdstringThe offer ID for the subscription. This field is only available for the Microsoft Online Services Program billing accounts or billing accounts with agreement type Enterprise Agreement.
operationStatusstringThe status of an operation on the subscription. When None, there is no ongoing operation. When LockedForUpdate, write operations will be blocked on the Billing Subscription. Other is the default value and you may need to refer to the latest API version for more details. Known values are: "Other", "None", and "LockedForUpdate". (Other, None, LockedForUpdate)
productCategorystringThe category of the product for which the subscription is purchased. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, Software, UsageBased, Other.
productTypestringType of the product for which the subscription is purchased.
productTypeIdstringId of the product for which the subscription is purchased.
provisioningStatestringThe provisioning state of the resource during a long-running operation. Known values are: "Succeeded", "Canceled", "Failed", "New", "Pending", "Provisioning", "PendingBilling", "ConfirmedBilling", "Creating", "Created", and "Expired". (Succeeded, Canceled, Failed, New, Pending, Provisioning, PendingBilling, ConfirmedBilling, Creating, Created, Expired)
provisioningTenantIdstringThe tenant in which the subscription is provisioned.
purchaseDatestring (date-time)Purchase date of the product in UTC time.
quantityintegerThe quantity of licenses or fulfillment units for the subscription.
renewalTermDetailsobjectDetails for the next renewal term of a subscription.
resellerobjectReseller for this subscription. The fields is not available for Microsoft Partner Agreement billing accounts.
resourceUristringUnique identifier of the linked resource.
skuDescriptionstringThe SKU description of the product for which the subscription is purchased. This field is is only available for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement.
skuIdstringThe SKU ID of the product for which the subscription is purchased. This field is is only available for Microsoft Customer Agreement billing accounts.
statusstringThe status of the subscription. This field is not available for Enterprise Agreement billing accounts. Known values are: "Other", "Unknown", "Active", "Disabled", "Deleted", "Warned", "Expiring", "Expired", "AutoRenew", "Cancelled", "Suspended", and "Failed". (Other, Unknown, Active, Disabled, Deleted, Warned, Expiring, Expired, AutoRenew, Cancelled, Suspended, Failed)
subscriptionIdstringThe ID of the subscription.
suspensionReasonDetailsarrayThe suspension details for a subscription. This field is not available for Enterprise Agreement billing accounts.
suspensionReasonsarrayThe suspension reason for a subscription. This field is not available for Enterprise Agreement billing accounts.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
systemOverridesobjectSystem imposed policies that regulate behavior of the subscription.
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 < > % & \ ? /.
termDurationstringThe duration in ISO8601 format for which you can use the subscription. Example: P1M, P3M, P1Y.
termEndDatestring (date-time)End date of the term in UTC time.
termStartDatestring (date-time)Start date of the term in UTC time.
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_name, alias_nameGets a subscription by its alias ID. The operation is supported for seat based billing subscriptions.
list_by_billing_accountselectbilling_account_nameincludeDeleted, filter, orderBy, top, skip, count, searchLists the subscription aliases for a billing account. The operation is supported for seat based billing subscriptions.
create_or_updateinsertbilling_account_name, alias_nameCreates or updates a billing subscription by its alias ID. The operation is supported for seat based billing subscriptions.
create_or_updatereplacebilling_account_name, alias_nameCreates or updates a billing subscription by its alias ID. The operation is supported for seat based billing subscriptions.

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
alias_namestringThe ID that uniquely identifies a subscription alias. Required.
billing_account_namestringThe ID that uniquely identifies a billing account. Required.
countbooleanThe count query option allows clients to request a count of the matching resources included with the resources in the response. Default value is None.
filterstringThe filter query option allows clients to filter a collection of resources that are addressed by a request URL. Default value is None.
includeDeletedbooleanCan be used to get deleted billing subscriptions. Default value is False.
orderBystringThe orderby query option allows clients to request resources in a particular order. Default value is None.
skipintegerThe skip query option requests the number of items in the queried collection that are to be skipped and not included in the result. Default value is None.
topintegerThe 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. Default value is None.

SELECT examples

Gets a subscription by its alias ID. The operation is supported for seat based billing subscriptions.

SELECT
id,
name,
autoRenew,
beneficiary,
beneficiaryTenantId,
billingFrequency,
billingPolicies,
billingProfileDisplayName,
billingProfileId,
billingProfileName,
billingSubscriptionId,
consumptionCostCenter,
customerDisplayName,
customerId,
customerName,
displayName,
enrollmentAccountDisplayName,
enrollmentAccountId,
enrollmentAccountSubscriptionDetails,
invoiceSectionDisplayName,
invoiceSectionId,
invoiceSectionName,
lastMonthCharges,
monthToDateCharges,
nextBillingCycleDetails,
offerId,
operationStatus,
productCategory,
productType,
productTypeId,
provisioningState,
provisioningTenantId,
purchaseDate,
quantity,
renewalTermDetails,
reseller,
resourceUri,
skuDescription,
skuId,
status,
subscriptionId,
suspensionReasonDetails,
suspensionReasons,
systemData,
systemOverrides,
tags,
termDuration,
termEndDate,
termStartDate,
type
FROM azure.billing.billing_subscriptions_aliases
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND alias_name = '{{ alias_name }}' -- required
;

INSERT examples

Creates or updates a billing subscription by its alias ID. The operation is supported for seat based billing subscriptions.

INSERT INTO azure.billing.billing_subscriptions_aliases (
properties,
tags,
billing_account_name,
alias_name
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ billing_account_name }}',
'{{ alias_name }}'
RETURNING
id,
name,
properties,
systemData,
tags,
type
;

REPLACE examples

Creates or updates a billing subscription by its alias ID. The operation is supported for seat based billing subscriptions.

REPLACE azure.billing.billing_subscriptions_aliases
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
billing_account_name = '{{ billing_account_name }}' --required
AND alias_name = '{{ alias_name }}' --required
RETURNING
id,
name,
properties,
systemData,
tags,
type;