subscriptions
Creates, updates, deletes, gets or lists a subscriptions
resource.
Overview
Name | subscriptions |
Type | Resource |
Id | azure.billing.subscriptions |
Fields
- vw_subscriptions
- subscriptions
Name | Datatype | Description |
---|---|---|
auto_renew | text | field from the properties object |
beneficiary | text | field from the properties object |
beneficiary_tenant_id | text | field from the properties object |
billingAccountName | text | field from the properties object |
billingProfileName | text | field from the properties object |
billingSubscriptionName | text | field from the properties object |
billing_frequency | text | field from the properties object |
billing_policies | text | field from the properties object |
billing_profile_display_name | text | field from the properties object |
billing_profile_id | text | field from the properties object |
billing_profile_name | text | field from the properties object |
consumption_cost_center | text | field from the properties object |
customer_display_name | text | field from the properties object |
customer_id | text | field from the properties object |
customer_name | text | field from the properties object |
display_name | text | field from the properties object |
enrollment_account_display_name | text | field from the properties object |
enrollment_account_id | text | field from the properties object |
enrollment_account_subscription_details | text | field from the properties object |
invoice_section_display_name | text | field from the properties object |
invoice_section_id | text | field from the properties object |
invoice_section_name | text | field from the properties object |
last_month_charges | text | field from the properties object |
month_to_date_charges | text | field from the properties object |
next_billing_cycle_details | text | field from the properties object |
offer_id | text | field from the properties object |
operation_status | text | field from the properties object |
product_category | text | field from the properties object |
product_type | text | field from the properties object |
product_type_id | text | field from the properties object |
provisioning_state | text | field from the properties object |
provisioning_tenant_id | text | field from the properties object |
purchase_date | text | field from the properties object |
quantity | text | field from the properties object |
renewal_term_details | text | field from the properties object |
reseller | text | field from the properties object |
resource_uri | text | field from the properties object |
sku_description | text | field from the properties object |
sku_id | text | field from the properties object |
status | text | field from the properties object |
subscription_id | text | field from the properties object |
suspension_reason_details | text | field from the properties object |
suspension_reasons | text | field from the properties object |
system_overrides | text | field from the properties object |
tags | text | 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 < > % & \ ? / |
term_duration | text | field from the properties object |
term_end_date | text | field from the properties object |
term_start_date | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | The billing properties of a 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 < > % & \ ? / |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | billingAccountName, billingSubscriptionName | Gets 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_profile | SELECT | billingAccountName, billingProfileName, billingSubscriptionName | Gets a subscription by its billing profile and ID. The operation is supported for billing accounts with agreement type Enterprise Agreement. |
list_by_billing_account | SELECT | billingAccountName | Lists the subscriptions for a billing account. |
list_by_billing_profile | SELECT | billingAccountName, billingProfileName | Lists 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_customer | SELECT | billingAccountName, billingProfileName, customerName | Lists the subscriptions for a customer. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. |
list_by_customer_at_billing_account | SELECT | billingAccountName, customerName | Lists 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_account | SELECT | billingAccountName, enrollmentAccountName | Lists the subscriptions for an enrollment account. The operation is supported for billing accounts with agreement type Enterprise Agreement. |
delete | DELETE | billingAccountName, billingSubscriptionName | Cancels a billing subscription. This operation is supported only for billing accounts of type Microsoft Partner Agreement or Microsoft Customer Agreement. |
update | UPDATE | billingAccountName, billingSubscriptionName | Updates the properties of a billing subscription. |
cancel | EXEC | billingAccountName, billingSubscriptionName, data__cancellationReason | Cancels a usage-based subscription. This operation is supported only for billing accounts of type Microsoft Partner Agreement. |
merge | EXEC | billingAccountName, billingSubscriptionName | Merges the billing subscription provided in the request with a target billing subscription. |
move | EXEC | billingAccountName, billingSubscriptionName | Moves 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. |
split | EXEC | billingAccountName, billingSubscriptionName | Splits a subscription into a new subscription with quantity less than current subscription quantity and not equal to 0. |
validate_move_eligibility | EXEC | billingAccountName, billingSubscriptionName | Validates 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.
- vw_subscriptions
- subscriptions
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 }}';
SELECT
properties,
tags
FROM azure.billing.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 }}';