Dela via


ProductsOperations Class

ProductsOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
ProductsOperations

Constructor

ProductsOperations(client, config, serializer, deserializer)

Parameters

Name Description
client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

Name Description
models

Alias to model classes used in this operation group.

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.

async get(billing_account_name: str, product_name: str, **kwargs) -> Product

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account.

product_name
Required
str

The ID that uniquely identifies a product.

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) -> AsyncIterable[ProductsListResult]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account.

filter
str

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: 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 ProductsListResult 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) -> AsyncIterable[ProductsListResult]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account.

billing_profile_name
Required
str

The ID that uniquely identifies a billing profile.

filter
str

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: 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 ProductsListResult 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) -> AsyncIterable[ProductsListResult]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account.

customer_name
Required
str

The ID that uniquely identifies a customer.

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 ProductsListResult 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) -> AsyncIterable[ProductsListResult]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account.

billing_profile_name
Required
str

The ID that uniquely identifies a billing profile.

invoice_section_name
Required
str

The ID that uniquely identifies an invoice section.

filter
str

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: 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 ProductsListResult 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.

async move(billing_account_name: str, product_name: str, parameters: TransferProductRequestProperties, **kwargs) -> Product | None

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account.

product_name
Required
str

The ID that uniquely identifies a product.

parameters
Required

Request parameters that are provided to the move product operation.

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

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.

async update(billing_account_name: str, product_name: str, parameters: Product, **kwargs) -> Product

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account.

product_name
Required
str

The ID that uniquely identifies a product.

parameters
Required

Request parameters that are provided to the update product operation.

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

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.

async validate_move(billing_account_name: str, product_name: str, parameters: TransferProductRequestProperties, **kwargs) -> ValidateProductTransferEligibilityResult

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account.

product_name
Required
str

The ID that uniquely identifies a product.

parameters
Required

Request parameters that are provided to the validate move eligibility operation.

Keyword-Only Parameters

Name Description
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.9\\x64\\Lib\\site-packages\\azure\\mgmt\\billing\\models\\__init__.py'>