products
Creates, updates, deletes, gets or lists a products resource.
Overview
| Name | products |
| Type | Resource |
| Id | azure.billing.products |
Fields
The following fields are returned by SELECT queries:
- list_by_invoice_section
- get
- list_by_billing_profile
- list_by_customer
- 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) |
availabilityId | string | The availability of the product. |
billingFrequency | string | The frequency at which the product will be billed. |
billingProfileDisplayName | string | The name of the billing profile to which the product is billed. |
billingProfileId | string | The ID of the billing profile to which the product is billed. |
customerDisplayName | string | The name of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner Agreement billing account. |
customerId | string | The ID of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner Agreement billing account. |
displayName | string | The display name of the product. |
endDate | string | The date when the product will be renewed or canceled. |
invoiceSectionDisplayName | string | The name of the invoice section to which the product is billed. |
invoiceSectionId | string | The ID of the invoice section to which the product is billed. |
lastCharge | object | The last month charges. |
lastChargeDate | string | The date of the last charge. |
productType | string | The description of the type of product. |
productTypeId | string | The ID of the type of product. |
purchaseDate | string | The date when the product was purchased. |
quantity | integer | The quantity purchased for the product. |
reseller | object | Reseller for this product. The fields is not available for Microsoft Partner Agreement products. |
skuDescription | string | The sku description of the product. |
skuId | string | The sku ID of the product. |
status | string | The status of the product. Known values are: "Other", "Active", "Disabled", "Deleted", "PastDue", "Expiring", "Expired", "AutoRenew", "Canceled", and "Suspended". (Other, Active, Disabled, Deleted, PastDue, Expiring, Expired, AutoRenew, Canceled, Suspended) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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 < > % & \ ? /. |
tenantId | string | The id of the tenant in which the product is used. |
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) |
availabilityId | string | The availability of the product. |
billingFrequency | string | The frequency at which the product will be billed. |
billingProfileDisplayName | string | The name of the billing profile to which the product is billed. |
billingProfileId | string | The ID of the billing profile to which the product is billed. |
customerDisplayName | string | The name of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner Agreement billing account. |
customerId | string | The ID of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner Agreement billing account. |
displayName | string | The display name of the product. |
endDate | string | The date when the product will be renewed or canceled. |
invoiceSectionDisplayName | string | The name of the invoice section to which the product is billed. |
invoiceSectionId | string | The ID of the invoice section to which the product is billed. |
lastCharge | object | The last month charges. |
lastChargeDate | string | The date of the last charge. |
productType | string | The description of the type of product. |
productTypeId | string | The ID of the type of product. |
purchaseDate | string | The date when the product was purchased. |
quantity | integer | The quantity purchased for the product. |
reseller | object | Reseller for this product. The fields is not available for Microsoft Partner Agreement products. |
skuDescription | string | The sku description of the product. |
skuId | string | The sku ID of the product. |
status | string | The status of the product. Known values are: "Other", "Active", "Disabled", "Deleted", "PastDue", "Expiring", "Expired", "AutoRenew", "Canceled", and "Suspended". (Other, Active, Disabled, Deleted, PastDue, Expiring, Expired, AutoRenew, Canceled, Suspended) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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 < > % & \ ? /. |
tenantId | string | The id of the tenant in which the product is used. |
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) |
availabilityId | string | The availability of the product. |
billingFrequency | string | The frequency at which the product will be billed. |
billingProfileDisplayName | string | The name of the billing profile to which the product is billed. |
billingProfileId | string | The ID of the billing profile to which the product is billed. |
customerDisplayName | string | The name of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner Agreement billing account. |
customerId | string | The ID of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner Agreement billing account. |
displayName | string | The display name of the product. |
endDate | string | The date when the product will be renewed or canceled. |
invoiceSectionDisplayName | string | The name of the invoice section to which the product is billed. |
invoiceSectionId | string | The ID of the invoice section to which the product is billed. |
lastCharge | object | The last month charges. |
lastChargeDate | string | The date of the last charge. |
productType | string | The description of the type of product. |
productTypeId | string | The ID of the type of product. |
purchaseDate | string | The date when the product was purchased. |
quantity | integer | The quantity purchased for the product. |
reseller | object | Reseller for this product. The fields is not available for Microsoft Partner Agreement products. |
skuDescription | string | The sku description of the product. |
skuId | string | The sku ID of the product. |
status | string | The status of the product. Known values are: "Other", "Active", "Disabled", "Deleted", "PastDue", "Expiring", "Expired", "AutoRenew", "Canceled", and "Suspended". (Other, Active, Disabled, Deleted, PastDue, Expiring, Expired, AutoRenew, Canceled, Suspended) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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 < > % & \ ? /. |
tenantId | string | The id of the tenant in which the product is used. |
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) |
availabilityId | string | The availability of the product. |
billingFrequency | string | The frequency at which the product will be billed. |
billingProfileDisplayName | string | The name of the billing profile to which the product is billed. |
billingProfileId | string | The ID of the billing profile to which the product is billed. |
customerDisplayName | string | The name of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner Agreement billing account. |
customerId | string | The ID of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner Agreement billing account. |
displayName | string | The display name of the product. |
endDate | string | The date when the product will be renewed or canceled. |
invoiceSectionDisplayName | string | The name of the invoice section to which the product is billed. |
invoiceSectionId | string | The ID of the invoice section to which the product is billed. |
lastCharge | object | The last month charges. |
lastChargeDate | string | The date of the last charge. |
productType | string | The description of the type of product. |
productTypeId | string | The ID of the type of product. |
purchaseDate | string | The date when the product was purchased. |
quantity | integer | The quantity purchased for the product. |
reseller | object | Reseller for this product. The fields is not available for Microsoft Partner Agreement products. |
skuDescription | string | The sku description of the product. |
skuId | string | The sku ID of the product. |
status | string | The status of the product. Known values are: "Other", "Active", "Disabled", "Deleted", "PastDue", "Expiring", "Expired", "AutoRenew", "Canceled", and "Suspended". (Other, Active, Disabled, Deleted, PastDue, Expiring, Expired, AutoRenew, Canceled, Suspended) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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 < > % & \ ? /. |
tenantId | string | The id of the tenant in which the product is used. |
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) |
availabilityId | string | The availability of the product. |
billingFrequency | string | The frequency at which the product will be billed. |
billingProfileDisplayName | string | The name of the billing profile to which the product is billed. |
billingProfileId | string | The ID of the billing profile to which the product is billed. |
customerDisplayName | string | The name of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner Agreement billing account. |
customerId | string | The ID of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner Agreement billing account. |
displayName | string | The display name of the product. |
endDate | string | The date when the product will be renewed or canceled. |
invoiceSectionDisplayName | string | The name of the invoice section to which the product is billed. |
invoiceSectionId | string | The ID of the invoice section to which the product is billed. |
lastCharge | object | The last month charges. |
lastChargeDate | string | The date of the last charge. |
productType | string | The description of the type of product. |
productTypeId | string | The ID of the type of product. |
purchaseDate | string | The date when the product was purchased. |
quantity | integer | The quantity purchased for the product. |
reseller | object | Reseller for this product. The fields is not available for Microsoft Partner Agreement products. |
skuDescription | string | The sku description of the product. |
skuId | string | The sku ID of the product. |
status | string | The status of the product. Known values are: "Other", "Active", "Disabled", "Deleted", "PastDue", "Expiring", "Expired", "AutoRenew", "Canceled", and "Suspended". (Other, Active, Disabled, Deleted, PastDue, Expiring, Expired, AutoRenew, Canceled, Suspended) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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 < > % & \ ? /. |
tenantId | string | The id of the tenant in which the product is used. |
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 |
|---|---|---|---|---|
list_by_invoice_section | select | billing_account_name, billing_profile_name, invoice_section_name | filter, orderBy, top, skip, count, search | Lists the products for an invoice section. These don't include products billed based on usage. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. |
get | select | billing_account_name, product_name | Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. | |
list_by_billing_profile | select | billing_account_name, billing_profile_name | filter, orderBy, top, skip, count, search | Lists the products for a billing profile. These don't include products billed based on usage. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. |
list_by_customer | select | billing_account_name, customer_name | filter, orderBy, top, skip, count, search | Lists the products for a customer. These don't include products billed based on usage.The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. |
list_by_billing_account | select | billing_account_name | filter, orderBy, top, skip, count, search | Lists the products for a billing account. These don't include products billed based on usage. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. |
update | update | billing_account_name, product_name | Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. | |
move | exec | billing_account_name, product_name, destinationInvoiceSectionId | Moves a product's charges 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 only for products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft Customer Agreement. | |
validate_move_eligibility | exec | billing_account_name, product_name, destinationInvoiceSectionId | Validates if a product's charges can be moved to a new invoice section. This operation is supported only for products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft Customer Agreement. |
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 |
|---|---|---|
billing_account_name | string | The ID that uniquely identifies a billing account. Required. |
billing_profile_name | string | The ID that uniquely identifies a billing profile. Required. |
customer_name | string | The ID that uniquely identifies a customer. Required. |
invoice_section_name | string | The ID that uniquely identifies an invoice section. Required. |
product_name | string | The ID that uniquely identifies a product. 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. |
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
- list_by_invoice_section
- get
- list_by_billing_profile
- list_by_customer
- list_by_billing_account
Lists the products for an invoice section. These don't include products billed based on usage. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
SELECT
id,
name,
autoRenew,
availabilityId,
billingFrequency,
billingProfileDisplayName,
billingProfileId,
customerDisplayName,
customerId,
displayName,
endDate,
invoiceSectionDisplayName,
invoiceSectionId,
lastCharge,
lastChargeDate,
productType,
productTypeId,
purchaseDate,
quantity,
reseller,
skuDescription,
skuId,
status,
systemData,
tags,
tenantId,
type
FROM azure.billing.products
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND billing_profile_name = '{{ billing_profile_name }}' -- required
AND invoice_section_name = '{{ invoice_section_name }}' -- required
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND count = '{{ count }}'
AND search = '{{ search }}'
;
Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
SELECT
id,
name,
autoRenew,
availabilityId,
billingFrequency,
billingProfileDisplayName,
billingProfileId,
customerDisplayName,
customerId,
displayName,
endDate,
invoiceSectionDisplayName,
invoiceSectionId,
lastCharge,
lastChargeDate,
productType,
productTypeId,
purchaseDate,
quantity,
reseller,
skuDescription,
skuId,
status,
systemData,
tags,
tenantId,
type
FROM azure.billing.products
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND product_name = '{{ product_name }}' -- required
;
Lists the products for a billing profile. These don't include products billed based on usage. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
SELECT
id,
name,
autoRenew,
availabilityId,
billingFrequency,
billingProfileDisplayName,
billingProfileId,
customerDisplayName,
customerId,
displayName,
endDate,
invoiceSectionDisplayName,
invoiceSectionId,
lastCharge,
lastChargeDate,
productType,
productTypeId,
purchaseDate,
quantity,
reseller,
skuDescription,
skuId,
status,
systemData,
tags,
tenantId,
type
FROM azure.billing.products
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND billing_profile_name = '{{ billing_profile_name }}' -- required
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND count = '{{ count }}'
AND search = '{{ search }}'
;
Lists the products for a customer. These don't include products billed based on usage.The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.
SELECT
id,
name,
autoRenew,
availabilityId,
billingFrequency,
billingProfileDisplayName,
billingProfileId,
customerDisplayName,
customerId,
displayName,
endDate,
invoiceSectionDisplayName,
invoiceSectionId,
lastCharge,
lastChargeDate,
productType,
productTypeId,
purchaseDate,
quantity,
reseller,
skuDescription,
skuId,
status,
systemData,
tags,
tenantId,
type
FROM azure.billing.products
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND customer_name = '{{ customer_name }}' -- required
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND count = '{{ count }}'
AND search = '{{ search }}'
;
Lists the products for a billing account. These don't include products billed based on usage. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
SELECT
id,
name,
autoRenew,
availabilityId,
billingFrequency,
billingProfileDisplayName,
billingProfileId,
customerDisplayName,
customerId,
displayName,
endDate,
invoiceSectionDisplayName,
invoiceSectionId,
lastCharge,
lastChargeDate,
productType,
productTypeId,
purchaseDate,
quantity,
reseller,
skuDescription,
skuId,
status,
systemData,
tags,
tenantId,
type
FROM azure.billing.products
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND count = '{{ count }}'
AND search = '{{ search }}'
;
UPDATE examples
- update
Updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
UPDATE azure.billing.products
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
billing_account_name = '{{ billing_account_name }}' --required
AND product_name = '{{ product_name }}' --required
RETURNING
id,
name,
properties,
systemData,
tags,
type;
Lifecycle Methods
- move
- validate_move_eligibility
Moves a product's charges 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 only for products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft Customer Agreement.
EXEC azure.billing.products.move
@billing_account_name='{{ billing_account_name }}' --required,
@product_name='{{ product_name }}' --required
@@json=
'{
"destinationInvoiceSectionId": "{{ destinationInvoiceSectionId }}"
}'
;
Validates if a product's charges can be moved to a new invoice section. This operation is supported only for products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft Customer Agreement.
EXEC azure.billing.products.validate_move_eligibility
@billing_account_name='{{ billing_account_name }}' --required,
@product_name='{{ product_name }}' --required
@@json=
'{
"destinationInvoiceSectionId": "{{ destinationInvoiceSectionId }}"
}'
;