billing_subscriptions_aliases
Creates, updates, deletes, gets or lists a billing_subscriptions_aliases resource.
Overview
| Name | billing_subscriptions_aliases |
| Type | Resource |
| Id | azure.billing.billing_subscriptions_aliases |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_billing_account
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
autoRenew | string | Indicates whether auto renewal is turned on or off for a product. Known values are: "Off" and "On". (Off, On) |
beneficiary | object | The beneficiary of the billing subscription. |
beneficiaryTenantId | string | The provisioning tenant of the subscription. |
billingFrequency | string | The billing frequency in ISO8601 format of product in the subscription. Example: P1M, P3M, P1Y. |
billingPolicies | object | Dictionary of billing policies associated with the subscription. |
billingProfileDisplayName | string | The name of the billing profile. |
billingProfileId | string | The fully qualified ID that uniquely identifies a billing profile. |
billingProfileName | string | The ID that uniquely identifies a billing profile. |
billingSubscriptionId | string | The ID of the billing subscription with the subscription alias. |
consumptionCostCenter | string | The cost center applied to the subscription. This field is only available for consumption subscriptions of Microsoft Customer Agreement or Enterprise Agreement Type billing accounts. |
customerDisplayName | string | The name of the customer. |
customerId | string | The fully qualified ID that uniquely identifies a customer. |
customerName | string | The ID that uniquely identifies a customer. |
displayName | string | The name of the billing subscription. |
enrollmentAccountDisplayName | string | The enrollment Account name associated with the subscription. This field is available only for the Enterprise Agreement Type billing accounts. |
enrollmentAccountId | string | The enrollment Account ID associated with the subscription. This field is available only for the Enterprise Agreement Type billing accounts. |
enrollmentAccountSubscriptionDetails | object | Enrollment Account Subscription details. This field is available only for the Enterprise Agreement Type billing accounts. |
invoiceSectionDisplayName | string | The name of the invoice section. |
invoiceSectionId | string | The fully qualified ID that uniquely identifies an invoice section. |
invoiceSectionName | string | The ID that uniquely identifies an invoice section. |
lastMonthCharges | object | The last month's charges. This field is only available for usage based subscriptions of Microsoft Customer Agreement billing accounts. |
monthToDateCharges | object | The current month to date charges. This field is only available for usage based subscriptions of Microsoft Customer Agreement billing accounts. |
nextBillingCycleDetails | object | Next billing cycle details of the subscription. |
offerId | string | The 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. |
operationStatus | string | The 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) |
productCategory | string | The category of the product for which the subscription is purchased. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, Software, UsageBased, Other. |
productType | string | Type of the product for which the subscription is purchased. |
productTypeId | string | Id of the product for which the subscription is purchased. |
provisioningState | string | The 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) |
provisioningTenantId | string | The tenant in which the subscription is provisioned. |
purchaseDate | string (date-time) | Purchase date of the product in UTC time. |
quantity | integer | The quantity of licenses or fulfillment units for the subscription. |
renewalTermDetails | object | Details for the next renewal term of a subscription. |
reseller | object | Reseller for this subscription. The fields is not available for Microsoft Partner Agreement billing accounts. |
resourceUri | string | Unique identifier of the linked resource. |
skuDescription | string | The 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. |
skuId | string | The SKU ID of the product for which the subscription is purchased. This field is is only available for Microsoft Customer Agreement billing accounts. |
status | string | The 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) |
subscriptionId | string | The ID of the subscription. |
suspensionReasonDetails | array | The suspension details for a subscription. This field is not available for Enterprise Agreement billing accounts. |
suspensionReasons | array | The suspension reason for a subscription. This field is not available for Enterprise Agreement billing accounts. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
systemOverrides | object | System imposed policies that regulate behavior of the subscription. |
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 < > % & \ ? /. |
termDuration | string | The duration in ISO8601 format for which you can use the subscription. Example: P1M, P3M, P1Y. |
termEndDate | string (date-time) | End date of the term in UTC time. |
termStartDate | string (date-time) | Start date of the term in UTC time. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
autoRenew | string | Indicates whether auto renewal is turned on or off for a product. Known values are: "Off" and "On". (Off, On) |
beneficiary | object | The beneficiary of the billing subscription. |
beneficiaryTenantId | string | The provisioning tenant of the subscription. |
billingFrequency | string | The billing frequency in ISO8601 format of product in the subscription. Example: P1M, P3M, P1Y. |
billingPolicies | object | Dictionary of billing policies associated with the subscription. |
billingProfileDisplayName | string | The name of the billing profile. |
billingProfileId | string | The fully qualified ID that uniquely identifies a billing profile. |
billingProfileName | string | The ID that uniquely identifies a billing profile. |
billingSubscriptionId | string | The ID of the billing subscription with the subscription alias. |
consumptionCostCenter | string | The cost center applied to the subscription. This field is only available for consumption subscriptions of Microsoft Customer Agreement or Enterprise Agreement Type billing accounts. |
customerDisplayName | string | The name of the customer. |
customerId | string | The fully qualified ID that uniquely identifies a customer. |
customerName | string | The ID that uniquely identifies a customer. |
displayName | string | The name of the billing subscription. |
enrollmentAccountDisplayName | string | The enrollment Account name associated with the subscription. This field is available only for the Enterprise Agreement Type billing accounts. |
enrollmentAccountId | string | The enrollment Account ID associated with the subscription. This field is available only for the Enterprise Agreement Type billing accounts. |
enrollmentAccountSubscriptionDetails | object | Enrollment Account Subscription details. This field is available only for the Enterprise Agreement Type billing accounts. |
invoiceSectionDisplayName | string | The name of the invoice section. |
invoiceSectionId | string | The fully qualified ID that uniquely identifies an invoice section. |
invoiceSectionName | string | The ID that uniquely identifies an invoice section. |
lastMonthCharges | object | The last month's charges. This field is only available for usage based subscriptions of Microsoft Customer Agreement billing accounts. |
monthToDateCharges | object | The current month to date charges. This field is only available for usage based subscriptions of Microsoft Customer Agreement billing accounts. |
nextBillingCycleDetails | object | Next billing cycle details of the subscription. |
offerId | string | The 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. |
operationStatus | string | The 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) |
productCategory | string | The category of the product for which the subscription is purchased. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, Software, UsageBased, Other. |
productType | string | Type of the product for which the subscription is purchased. |
productTypeId | string | Id of the product for which the subscription is purchased. |
provisioningState | string | The 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) |
provisioningTenantId | string | The tenant in which the subscription is provisioned. |
purchaseDate | string (date-time) | Purchase date of the product in UTC time. |
quantity | integer | The quantity of licenses or fulfillment units for the subscription. |
renewalTermDetails | object | Details for the next renewal term of a subscription. |
reseller | object | Reseller for this subscription. The fields is not available for Microsoft Partner Agreement billing accounts. |
resourceUri | string | Unique identifier of the linked resource. |
skuDescription | string | The 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. |
skuId | string | The SKU ID of the product for which the subscription is purchased. This field is is only available for Microsoft Customer Agreement billing accounts. |
status | string | The 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) |
subscriptionId | string | The ID of the subscription. |
suspensionReasonDetails | array | The suspension details for a subscription. This field is not available for Enterprise Agreement billing accounts. |
suspensionReasons | array | The suspension reason for a subscription. This field is not available for Enterprise Agreement billing accounts. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
systemOverrides | object | System imposed policies that regulate behavior of the subscription. |
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 < > % & \ ? /. |
termDuration | string | The duration in ISO8601 format for which you can use the subscription. Example: P1M, P3M, P1Y. |
termEndDate | string (date-time) | End date of the term in UTC time. |
termStartDate | string (date-time) | Start date of the term in UTC time. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account_name, alias_name | Gets a subscription by its alias ID. The operation is supported for seat based billing subscriptions. | |
list_by_billing_account | select | billing_account_name | includeDeleted, filter, orderBy, top, skip, count, search | Lists the subscription aliases for a billing account. The operation is supported for seat based billing subscriptions. |
create_or_update | insert | billing_account_name, alias_name | Creates or updates a billing subscription by its alias ID. The operation is supported for seat based billing subscriptions. | |
create_or_update | replace | billing_account_name, alias_name | Creates 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.
| Name | Datatype | Description |
|---|---|---|
alias_name | string | The ID that uniquely identifies a subscription alias. Required. |
billing_account_name | string | The ID that uniquely identifies a billing account. Required. |
count | boolean | The count query option allows clients to request a count of the matching resources included with the resources in the response. Default value is None. |
filter | string | The filter query option allows clients to filter a collection of resources that are addressed by a request URL. Default value is None. |
includeDeleted | boolean | Can be used to get deleted billing subscriptions. Default value is False. |
orderBy | string | The orderby query option allows clients to request resources in a particular order. Default value is None. |
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. Default value is None. |
skip | integer | The 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. |
top | integer | 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. Default value is None. |
SELECT examples
- get
- list_by_billing_account
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
;
Lists the subscription aliases for a billing account. 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 includeDeleted = '{{ includeDeleted }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND count = '{{ count }}'
AND search = '{{ search }}'
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: billing_subscriptions_aliases
props:
- name: billing_account_name
value: "{{ billing_account_name }}"
description: Required parameter for the billing_subscriptions_aliases resource.
- name: alias_name
value: "{{ alias_name }}"
description: Required parameter for the billing_subscriptions_aliases resource.
- name: properties
description: |
The properties of a(n) BillingSubscriptionAlias.
value:
autoRenew: "{{ autoRenew }}"
beneficiaryTenantId: "{{ beneficiaryTenantId }}"
beneficiary:
tenantId: "{{ tenantId }}"
objectId: "{{ objectId }}"
billingFrequency: "{{ billingFrequency }}"
billingProfileId: "{{ billingProfileId }}"
billingPolicies: "{{ billingPolicies }}"
billingProfileDisplayName: "{{ billingProfileDisplayName }}"
billingProfileName: "{{ billingProfileName }}"
consumptionCostCenter: "{{ consumptionCostCenter }}"
customerId: "{{ customerId }}"
customerDisplayName: "{{ customerDisplayName }}"
customerName: "{{ customerName }}"
displayName: "{{ displayName }}"
enrollmentAccountId: "{{ enrollmentAccountId }}"
enrollmentAccountDisplayName: "{{ enrollmentAccountDisplayName }}"
enrollmentAccountSubscriptionDetails:
enrollmentAccountStartDate: "{{ enrollmentAccountStartDate }}"
subscriptionEnrollmentAccountStatus: "{{ subscriptionEnrollmentAccountStatus }}"
invoiceSectionId: "{{ invoiceSectionId }}"
invoiceSectionDisplayName: "{{ invoiceSectionDisplayName }}"
invoiceSectionName: "{{ invoiceSectionName }}"
lastMonthCharges:
currency: "{{ currency }}"
value: {{ value }}
monthToDateCharges:
currency: "{{ currency }}"
value: {{ value }}
nextBillingCycleDetails:
billingFrequency: "{{ billingFrequency }}"
offerId: "{{ offerId }}"
productCategory: "{{ productCategory }}"
productType: "{{ productType }}"
productTypeId: "{{ productTypeId }}"
purchaseDate: "{{ purchaseDate }}"
quantity: {{ quantity }}
reseller:
resellerId: "{{ resellerId }}"
description: "{{ description }}"
renewalTermDetails:
billingFrequency: "{{ billingFrequency }}"
productId: "{{ productId }}"
productTypeId: "{{ productTypeId }}"
skuId: "{{ skuId }}"
termDuration: "{{ termDuration }}"
quantity: {{ quantity }}
termEndDate: "{{ termEndDate }}"
skuId: "{{ skuId }}"
skuDescription: "{{ skuDescription }}"
systemOverrides:
cancellation: "{{ cancellation }}"
cancellationAllowedEndDate: "{{ cancellationAllowedEndDate }}"
resourceUri: "{{ resourceUri }}"
termDuration: "{{ termDuration }}"
termStartDate: "{{ termStartDate }}"
termEndDate: "{{ termEndDate }}"
provisioningTenantId: "{{ provisioningTenantId }}"
status: "{{ status }}"
operationStatus: "{{ operationStatus }}"
provisioningState: "{{ provisioningState }}"
subscriptionId: "{{ subscriptionId }}"
suspensionReasons:
- "{{ suspensionReasons }}"
suspensionReasonDetails:
- effectiveDate: "{{ effectiveDate }}"
reason: "{{ reason }}"
billingSubscriptionId: "{{ billingSubscriptionId }}"
- name: tags
value: "{{ tags }}"
description: |
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 < > % & ? /.
REPLACE examples
- create_or_update
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;