Sdílet prostřednictvím


BillingAccountsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

BillingManagementClient's

<xref:billing_accounts> attribute.

Inheritance
builtins.object
BillingAccountsOperations

Constructor

BillingAccountsOperations(*args, **kwargs)

Methods

begin_add_payment_terms

Adds payment terms to all the billing profiles under the billing account. Currently, payment terms can be added only on billing accounts that have Agreement Type as 'Microsoft Customer Agreement' and AccountType as 'Enterprise'. This action needs pre-authorization and only Field Sellers are authorized to add the payment terms and is not a self-serve action.

begin_cancel_payment_terms

Cancels all the payment terms on billing account that falls after the cancellation date in the request. Currently, cancel payment terms is only served by admin actions and is not a self-serve action.

begin_update

Updates the properties of a billing account. Currently, displayName and address can be updated for billing accounts with agreement type Microsoft Customer Agreement. Currently address and notification email address can be updated for billing accounts with agreement type Microsoft Online Services Agreement. Currently, purchase order number can be edited for billing accounts with agreement type Enterprise Agreement.

confirm_transition

Gets the transition details for a billing account that has transitioned from agreement type Microsoft Online Services Program to agreement type Microsoft Customer Agreement.

get

Gets a billing account by its ID.

list

Lists the billing accounts that a user has access to.

list_invoice_sections_by_create_subscription_permission

Lists the invoice sections for which the user has permission to create Azure subscriptions. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

validate_payment_terms

Validates payment terms on a billing account with agreement type 'Microsoft Customer Agreement' and account type 'Enterprise'.

begin_add_payment_terms

Adds payment terms to all the billing profiles under the billing account. Currently, payment terms can be added only on billing accounts that have Agreement Type as 'Microsoft Customer Agreement' and AccountType as 'Enterprise'. This action needs pre-authorization and only Field Sellers are authorized to add the payment terms and is not a self-serve action.

async begin_add_payment_terms(billing_account_name: str, parameters: List[_models.PaymentTerm], *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.BillingAccount]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

parameters
Required

The properties of payment term. Is either a [PaymentTerm] type or a IO[bytes] type. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns either BillingAccount or the result of cls(response)

Exceptions

Type Description
See also

begin_cancel_payment_terms

Cancels all the payment terms on billing account that falls after the cancellation date in the request. Currently, cancel payment terms is only served by admin actions and is not a self-serve action.

async begin_cancel_payment_terms(billing_account_name: str, parameters: datetime, **kwargs: Any) -> AsyncLROPoller[BillingAccount]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

parameters
Required

Date after which any payment terms that needs to be cancelled. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns either BillingAccount or the result of cls(response)

Exceptions

Type Description
See also

begin_update

Updates the properties of a billing account. Currently, displayName and address can be updated for billing accounts with agreement type Microsoft Customer Agreement. Currently address and notification email address can be updated for billing accounts with agreement type Microsoft Online Services Agreement. Currently, purchase order number can be edited for billing accounts with agreement type Enterprise Agreement.

async begin_update(billing_account_name: str, parameters: _models.BillingAccountPatch, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.BillingAccount]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

parameters
Required

A billing account. Is either a BillingAccountPatch type or a IO[bytes] type. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns either BillingAccount or the result of cls(response)

Exceptions

Type Description
See also

confirm_transition

Gets the transition details for a billing account that has transitioned from agreement type Microsoft Online Services Program to agreement type Microsoft Customer Agreement.

async confirm_transition(billing_account_name: str, **kwargs: Any) -> TransitionDetails

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

Returns

Type Description

TransitionDetails or the result of cls(response)

Exceptions

Type Description
See also

get

Gets a billing account by its ID.

async get(billing_account_name: str, **kwargs: Any) -> BillingAccount

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

Returns

Type Description

BillingAccount or the result of cls(response)

Exceptions

Type Description
See also

list

Lists the billing accounts that a user has access to.

list(include_all: bool = False, include_all_without_billing_profiles: bool = False, include_deleted: bool = False, include_pending_agreement: bool = False, include_resellee: bool = False, legal_owner_tid: str | None = None, legal_owner_oid: str | None = None, filter: str | None = None, expand: str | None = None, top: int | None = None, skip: int | None = None, search: str | None = None, **kwargs: Any) -> AsyncIterable[BillingAccount]

Parameters

Name Description
include_all
Required

When true, results will include Billing Accounts that the user does not have a direct role assignment on if the user has one of the following AAD roles: Global Administrator, Global Reader, Billing Administrator. Default value is False.

include_all_without_billing_profiles
Required

When true, results will include Billing Accounts that are not fully created if the user has one of the following AAD roles: Global Administrator, Global Reader, Billing Administrator. Default value is False.

include_deleted
Required

When true, results will include any billing accounts in a deleted state. Default value is False.

include_pending_agreement
Required

Includes billing accounts with agreement pending signature that the user has access to. Default value is False.

include_resellee
Required

Includes the customer's billing account of Microsoft Partner Agreement that the user has access to. Default value is False.

legal_owner_tid
Required
str

Must be combined with legalOwnerOID, results will only include Billing Accounts for whom is legally responsible for the Billing Accounts. Optional. Default value is None.

legal_owner_oid
Required
str

Must be combined with legalOwnerTID, results will only include Billing Accounts for whom is legally responsible for the Billing Accounts. Optional. Default value is None.

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.

expand
Required
str

Expand is allowed for SoldTo and EnrollmentDetails/PONumber. 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.

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 BillingAccount or the result of cls(response)

Exceptions

Type Description
See also

list_invoice_sections_by_create_subscription_permission

Lists the invoice sections for which the user has permission to create Azure subscriptions. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

list_invoice_sections_by_create_subscription_permission(billing_account_name: str, filter: str | None = None, **kwargs: Any) -> AsyncIterable[InvoiceSectionWithCreateSubPermission]

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.

Returns

Type Description

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

Exceptions

Type Description
See also

validate_payment_terms

Validates payment terms on a billing account with agreement type 'Microsoft Customer Agreement' and account type 'Enterprise'.

async validate_payment_terms(billing_account_name: str, parameters: List[_models.PaymentTerm], *, content_type: str = 'application/json', **kwargs: Any) -> _models.PaymentTermsEligibilityResult

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

parameters
Required

The properties of payment term. Is either a [PaymentTerm] type or a IO[bytes] type. Required.

Returns

Type Description

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