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_billing_profile
- list_by_customer
- get
- list_by_billing_account
The list of products. It contains a list of available product summaries in reverse chronological order by purchase date.
Name | Datatype | Description |
---|---|---|
properties | object | A product. |
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 < > % & \ ? / |
The list of products. It contains a list of available product summaries in reverse chronological order by purchase date.
Name | Datatype | Description |
---|---|---|
properties | object | A product. |
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 < > % & \ ? / |
A product.
Name | Datatype | Description |
---|---|---|
properties | object | A product. |
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 < > % & \ ? / |
The list of products. It contains a list of available product summaries in reverse chronological order by purchase date.
Name | Datatype | Description |
---|---|---|
properties | object | A product. |
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
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_by_billing_profile | select | billingAccountName , billingProfileName | 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 | billingAccountName , customerName | 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. |
get | select | billingAccountName , productName | Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. | |
list_by_billing_account | select | billingAccountName | 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 | billingAccountName , productName | 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 | billingAccountName , productName , 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 | billingAccountName , productName , 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 |
---|---|---|
billingAccountName | string | The ID that uniquely identifies a billing account. |
billingProfileName | string | The ID that uniquely identifies a billing profile. |
customerName | string | The ID that uniquely identifies a customer. |
productName | string | The ID that uniquely identifies a product. |
count | boolean | The count query option allows clients to request a count of the matching resources included with the resources in the response. |
filter | string | The filter query option allows clients to filter a collection of resources that are addressed by a request URL. |
orderBy | string | The orderby query option allows clients to request resources in a particular order. |
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. |
skip | integer (int64) | The skip query option requests the number of items in the queried collection that are to be skipped and not included in the result. |
top | integer (int64) | 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. |
SELECT
examples
- list_by_billing_profile
- list_by_customer
- get
- list_by_billing_account
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
properties,
tags
FROM azure.billing.products
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND billingProfileName = '{{ billingProfileName }}' -- 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
properties,
tags
FROM azure.billing.products
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND customerName = '{{ customerName }}' -- 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
properties,
tags
FROM azure.billing.products
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND productName = '{{ productName }}' -- required
;
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
properties,
tags
FROM azure.billing.products
WHERE billingAccountName = '{{ billingAccountName }}' -- 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
data__tags = '{{ tags }}',
data__properties = '{{ properties }}'
WHERE
billingAccountName = '{{ billingAccountName }}' --required
AND productName = '{{ productName }}' --required
RETURNING
properties,
tags;
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
@billingAccountName='{{ billingAccountName }}' --required,
@productName='{{ productName }}' --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
@billingAccountName='{{ billingAccountName }}' --required,
@productName='{{ productName }}' --required
@@json=
'{
"destinationInvoiceSectionId": "{{ destinationInvoiceSectionId }}"
}'
;