ProductsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:products> attribute.
Constructor
ProductsOperations(*args, **kwargs)
Methods
get |
Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. |
list_by_billing_account |
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. |
list_by_billing_profile |
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 |
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_invoice_section |
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. |
move |
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. |
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. |
validate_move |
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. |
get
Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
get(billing_account_name: str, product_name: str, **kwargs: Any) -> Product
Parameters
Name | Description |
---|---|
billing_account_name
Required
|
The ID that uniquely identifies a billing account. Required. |
product_name
Required
|
The ID that uniquely identifies a product. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
Product or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_billing_account
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.
list_by_billing_account(billing_account_name: str, filter: str | None = None, **kwargs: Any) -> Iterable[Product]
Parameters
Name | Description |
---|---|
billing_account_name
Required
|
The ID that uniquely identifies a billing account. Required. |
filter
Required
|
May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value are separated by a colon (:). Default value is None. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either Product or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_billing_profile
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_billing_profile(billing_account_name: str, billing_profile_name: str, filter: str | None = None, **kwargs: Any) -> Iterable[Product]
Parameters
Name | Description |
---|---|
billing_account_name
Required
|
The ID that uniquely identifies a billing account. Required. |
billing_profile_name
Required
|
The ID that uniquely identifies a billing profile. Required. |
filter
Required
|
May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value are separated by a colon (:). Default value is None. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either Product or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_customer
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_customer(billing_account_name: str, customer_name: str, **kwargs: Any) -> Iterable[Product]
Parameters
Name | Description |
---|---|
billing_account_name
Required
|
The ID that uniquely identifies a billing account. Required. |
customer_name
Required
|
The ID that uniquely identifies a customer. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either Product or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_invoice_section
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.
list_by_invoice_section(billing_account_name: str, billing_profile_name: str, invoice_section_name: str, filter: str | None = None, **kwargs: Any) -> Iterable[Product]
Parameters
Name | Description |
---|---|
billing_account_name
Required
|
The ID that uniquely identifies a billing account. Required. |
billing_profile_name
Required
|
The ID that uniquely identifies a billing profile. Required. |
invoice_section_name
Required
|
The ID that uniquely identifies an invoice section. Required. |
filter
Required
|
May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value are separated by a colon (:). Default value is None. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either Product or the result of cls(response) |
Exceptions
Type | Description |
---|---|
move
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.
move(billing_account_name: str, product_name: str, parameters: _models.TransferProductRequestProperties, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Product | None
Parameters
Name | Description |
---|---|
billing_account_name
Required
|
The ID that uniquely identifies a billing account. Required. |
product_name
Required
|
The ID that uniquely identifies a product. Required. |
parameters
Required
|
Request parameters that are provided to the move product operation. Is either a model type or a IO type. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
content_type
|
Body Parameter content-type. Known values are: 'application/json'. Default value is None. |
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
Product or None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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(billing_account_name: str, product_name: str, parameters: _models.Product, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Product
Parameters
Name | Description |
---|---|
billing_account_name
Required
|
The ID that uniquely identifies a billing account. Required. |
product_name
Required
|
The ID that uniquely identifies a product. Required. |
parameters
Required
|
Request parameters that are provided to the update product operation. Is either a model type or a IO type. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
content_type
|
Body Parameter content-type. Known values are: 'application/json'. Default value is None. |
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
Product or the result of cls(response) |
Exceptions
Type | Description |
---|---|
validate_move
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.
validate_move(billing_account_name: str, product_name: str, parameters: _models.TransferProductRequestProperties, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ValidateProductTransferEligibilityResult
Parameters
Name | Description |
---|---|
billing_account_name
Required
|
The ID that uniquely identifies a billing account. Required. |
product_name
Required
|
The ID that uniquely identifies a product. Required. |
parameters
Required
|
Request parameters that are provided to the validate move eligibility operation. Is either a model type or a IO type. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
content_type
|
Body Parameter content-type. Known values are: 'application/json'. Default value is None. |
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
ValidateProductTransferEligibilityResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.billing.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.10\\x64\\Lib\\site-packages\\azure\\mgmt\\billing\\models\\__init__.py'>
Azure SDK for Python