Skip to main content

subscriptions

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

Overview

Namesubscriptions
TypeResource
Idazure.billing.subscriptions

Fields

NameDatatypeDescription
auto_renewtextfield from the properties object
beneficiarytextfield from the properties object
beneficiary_tenant_idtextfield from the properties object
billingAccountNametextfield from the properties object
billingProfileNametextfield from the properties object
billingSubscriptionNametextfield from the properties object
billing_frequencytextfield from the properties object
billing_policiestextfield from the properties object
billing_profile_display_nametextfield from the properties object
billing_profile_idtextfield from the properties object
billing_profile_nametextfield from the properties object
consumption_cost_centertextfield from the properties object
customer_display_nametextfield from the properties object
customer_idtextfield from the properties object
customer_nametextfield from the properties object
display_nametextfield from the properties object
enrollment_account_display_nametextfield from the properties object
enrollment_account_idtextfield from the properties object
enrollment_account_subscription_detailstextfield from the properties object
invoice_section_display_nametextfield from the properties object
invoice_section_idtextfield from the properties object
invoice_section_nametextfield from the properties object
last_month_chargestextfield from the properties object
month_to_date_chargestextfield from the properties object
next_billing_cycle_detailstextfield from the properties object
offer_idtextfield from the properties object
operation_statustextfield from the properties object
product_categorytextfield from the properties object
product_typetextfield from the properties object
product_type_idtextfield from the properties object
provisioning_statetextfield from the properties object
provisioning_tenant_idtextfield from the properties object
purchase_datetextfield from the properties object
quantitytextfield from the properties object
renewal_term_detailstextfield from the properties object
resellertextfield from the properties object
resource_uritextfield from the properties object
sku_descriptiontextfield from the properties object
sku_idtextfield from the properties object
statustextfield from the properties object
subscription_idtextfield from the properties object
suspension_reason_detailstextfield from the properties object
suspension_reasonstextfield from the properties object
system_overridestextfield from the properties object
tagstextDictionary 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 < > % & \ ? /
term_durationtextfield from the properties object
term_end_datetextfield from the properties object
term_start_datetextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTbillingAccountName, billingSubscriptionNameGets a subscription by its ID. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement, Microsoft Partner Agreement, and Enterprise Agreement.
get_by_billing_profileSELECTbillingAccountName, billingProfileName, billingSubscriptionNameGets a subscription by its billing profile and ID. The operation is supported for billing accounts with agreement type Enterprise Agreement.
list_by_billing_accountSELECTbillingAccountNameLists the subscriptions for a billing account.
list_by_billing_profileSELECTbillingAccountName, billingProfileNameLists the subscriptions that are billed to a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
list_by_customerSELECTbillingAccountName, billingProfileName, customerNameLists the subscriptions for a customer. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.
list_by_customer_at_billing_accountSELECTbillingAccountName, customerNameLists the subscriptions for a customer at billing account level. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.
list_by_enrollment_accountSELECTbillingAccountName, enrollmentAccountNameLists the subscriptions for an enrollment account. The operation is supported for billing accounts with agreement type Enterprise Agreement.
deleteDELETEbillingAccountName, billingSubscriptionNameCancels a billing subscription. This operation is supported only for billing accounts of type Microsoft Partner Agreement or Microsoft Customer Agreement.
updateUPDATEbillingAccountName, billingSubscriptionNameUpdates the properties of a billing subscription.
cancelEXECbillingAccountName, billingSubscriptionName, data__cancellationReasonCancels a usage-based subscription. This operation is supported only for billing accounts of type Microsoft Partner Agreement.
mergeEXECbillingAccountName, billingSubscriptionNameMerges the billing subscription provided in the request with a target billing subscription.
moveEXECbillingAccountName, billingSubscriptionNameMoves charges for a subscription to a new invoice section. The new invoice section must belong to the same billing profile as the existing invoice section. This operation is supported for billing accounts with agreement type Microsoft Customer Agreement.
splitEXECbillingAccountName, billingSubscriptionNameSplits a subscription into a new subscription with quantity less than current subscription quantity and not equal to 0.
validate_move_eligibilityEXECbillingAccountName, billingSubscriptionNameValidates if charges for a subscription can be moved to a new invoice section. This operation is supported for billing accounts with agreement type Microsoft Customer Agreement.

SELECT examples

Lists the subscriptions for a billing account.

SELECT
auto_renew,
beneficiary,
beneficiary_tenant_id,
billingAccountName,
billingProfileName,
billingSubscriptionName,
billing_frequency,
billing_policies,
billing_profile_display_name,
billing_profile_id,
billing_profile_name,
consumption_cost_center,
customer_display_name,
customer_id,
customer_name,
display_name,
enrollment_account_display_name,
enrollment_account_id,
enrollment_account_subscription_details,
invoice_section_display_name,
invoice_section_id,
invoice_section_name,
last_month_charges,
month_to_date_charges,
next_billing_cycle_details,
offer_id,
operation_status,
product_category,
product_type,
product_type_id,
provisioning_state,
provisioning_tenant_id,
purchase_date,
quantity,
renewal_term_details,
reseller,
resource_uri,
sku_description,
sku_id,
status,
subscription_id,
suspension_reason_details,
suspension_reasons,
system_overrides,
tags,
term_duration,
term_end_date,
term_start_date
FROM azure.billing.vw_subscriptions
WHERE billingAccountName = '{{ billingAccountName }}';

UPDATE example

Updates a subscriptions resource.

/*+ update */
UPDATE azure.billing.subscriptions
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
billingAccountName = '{{ billingAccountName }}'
AND billingSubscriptionName = '{{ billingSubscriptionName }}';

DELETE example

Deletes the specified subscriptions resource.

/*+ delete */
DELETE FROM azure.billing.subscriptions
WHERE billingAccountName = '{{ billingAccountName }}'
AND billingSubscriptionName = '{{ billingSubscriptionName }}';