ProductsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

BillingManagementClient's

<xref:products> attribute.

Inheritance
builtins.object
ProductsOperations

Constructor

ProductsOperations(*args, **kwargs)

Methods

begin_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.

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.

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_eligibility

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.

begin_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.

begin_move(billing_account_name: str, product_name: str, parameters: _models.MoveProductRequest, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.Product]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

product_name
Required
str

The ID that uniquely identifies a product. Required.

parameters
Required

The properties of the product to initiate a transfer. Is either a MoveProductRequest type or a IO[bytes] type. Required.

Returns

Type Description

An instance of LROPoller that returns either Product or the result of cls(response)

Exceptions

Type Description
See also

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
str

The ID that uniquely identifies a billing account. Required.

product_name
Required
str

The ID that uniquely identifies a product. Required.

Returns

Type Description

Product or the result of cls(response)

Exceptions

Type Description
See also

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, order_by: str | None = None, top: int | None = None, skip: int | None = None, count: bool | None = None, search: str | None = None, **kwargs: Any) -> Iterable[Product]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

filter
Required
str

The filter query option allows clients to filter a collection of resources that are addressed by a request URL. Default value is None.

order_by
Required
str

The orderby query option allows clients to request resources in a particular order. Default value is None.

top
Required
int

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.

skip
Required
int

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.

count
Required

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.

search
Required
str

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.

Returns

Type Description

An iterator like instance of either Product or the result of cls(response)

Exceptions

Type Description
See also

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, order_by: str | None = None, top: int | None = None, skip: int | None = None, count: bool | None = None, search: str | None = None, **kwargs: Any) -> Iterable[Product]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

billing_profile_name
Required
str

The ID that uniquely identifies a billing profile. Required.

filter
Required
str

The filter query option allows clients to filter a collection of resources that are addressed by a request URL. Default value is None.

order_by
Required
str

The orderby query option allows clients to request resources in a particular order. Default value is None.

top
Required
int

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.

skip
Required
int

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.

count
Required

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.

search
Required
str

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.

Returns

Type Description

An iterator like instance of either Product or the result of cls(response)

Exceptions

Type Description
See also

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, filter: str | None = None, order_by: str | None = None, top: int | None = None, skip: int | None = None, count: bool | None = None, search: str | None = None, **kwargs: Any) -> Iterable[Product]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

customer_name
Required
str

The ID that uniquely identifies a customer. Required.

filter
Required
str

The filter query option allows clients to filter a collection of resources that are addressed by a request URL. Default value is None.

order_by
Required
str

The orderby query option allows clients to request resources in a particular order. Default value is None.

top
Required
int

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.

skip
Required
int

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.

count
Required

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.

search
Required
str

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.

Returns

Type Description

An iterator like instance of either Product or the result of cls(response)

Exceptions

Type Description
See also

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, order_by: str | None = None, top: int | None = None, skip: int | None = None, count: bool | None = None, search: str | None = None, **kwargs: Any) -> Iterable[Product]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

billing_profile_name
Required
str

The ID that uniquely identifies a billing profile. Required.

invoice_section_name
Required
str

The ID that uniquely identifies an invoice section. Required.

filter
Required
str

The filter query option allows clients to filter a collection of resources that are addressed by a request URL. Default value is None.

order_by
Required
str

The orderby query option allows clients to request resources in a particular order. Default value is None.

top
Required
int

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.

skip
Required
int

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.

count
Required

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.

search
Required
str

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.

Returns

Type Description

An iterator like instance of either Product or the result of cls(response)

Exceptions

Type Description
See also

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.ProductPatch, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Product

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

product_name
Required
str

The ID that uniquely identifies a product. Required.

parameters
Required

A product. Is either a ProductPatch type or a IO[bytes] type. Required.

Returns

Type Description

Product or the result of cls(response)

Exceptions

Type Description
See also

validate_move_eligibility

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_eligibility(billing_account_name: str, product_name: str, parameters: _models.MoveProductRequest, *, content_type: str = 'application/json', **kwargs: Any) -> _models.MoveProductEligibilityResult

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

product_name
Required
str

The ID that uniquely identifies a product. Required.

parameters
Required

The properties of the product to initiate a transfer. Is either a MoveProductRequest type or a IO[bytes] type. Required.

Returns

Type Description

MoveProductEligibilityResult or the result of cls(response)

Exceptions

Type Description
See also

Attributes

models

models = <module 'azure.mgmt.billing.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\billing\\models\\__init__.py'>