Sdílet prostřednictvím


CustomersOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

BillingManagementClient's

<xref:customers> attribute.

Constructor

CustomersOperations(*args, **kwargs)

Methods

get

Gets a customer by its ID. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

list_by_billing_account

Lists the customers that are billed to a billing account. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

list_by_billing_profile

Lists the customers that are billed to a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

get

Gets a customer by its ID. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

get(billing_account_name: str, customer_name: str, expand: str | None = None, **kwargs: Any) -> Customer

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.

expand
Required
str

May be used to expand enabledAzurePlans and resellers. 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

Customer or the result of cls(response)

Exceptions

Type Description

list_by_billing_account

Lists the customers that are billed to a billing account. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

list_by_billing_account(billing_account_name: str, search: str | None = None, filter: str | None = None, **kwargs: Any) -> Iterable[Customer]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

search
Required
str

Used for searching customers by their name. Any customer with name containing the search text will be included in the response. Default value is None.

filter
Required
str

May be used to filter the list of customers. 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 Customer or the result of cls(response)

Exceptions

Type Description

list_by_billing_profile

Lists the customers that are billed to a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

list_by_billing_profile(billing_account_name: str, billing_profile_name: str, search: str | None = None, filter: str | None = None, **kwargs: Any) -> Iterable[Customer]

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.

search
Required
str

Used for searching customers by their name. Any customer with name containing the search text will be included in the response. Default value is None.

filter
Required
str

May be used to filter the list of customers. 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 Customer 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'>