PoliciesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

BillingManagementClient's

<xref:policies> attribute.

Inheritance
builtins.object
PoliciesOperations

Constructor

PoliciesOperations(*args, **kwargs)

Methods

begin_create_or_update_by_billing_account

Update the policies for a billing account of Enterprise Agreement type.

begin_create_or_update_by_billing_profile

Updates the policies for a billing profile. This operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

begin_create_or_update_by_customer

Updates the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

begin_create_or_update_by_customer_at_billing_account

Updates the policies for a customer at billing account scope. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

get_by_billing_account

Get the policies for a billing account of Enterprise Agreement type.

get_by_billing_profile

Lists the policies for a billing profile. This operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

get_by_customer

Lists the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

get_by_customer_at_billing_account

Lists the policies for a customer at billing account scope. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

get_by_subscription

Lists the policies that are managed by the Billing Admin for the defined subscriptions. This is supported for Microsoft Online Services Program, Microsoft Customer Agreement and Microsoft Partner Agreement.

begin_create_or_update_by_billing_account

Update the policies for a billing account of Enterprise Agreement type.

begin_create_or_update_by_billing_account(billing_account_name: str, parameters: _models.BillingAccountPolicy, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.BillingAccountPolicy]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

parameters
Required

A policy at billing account scope. Is either a BillingAccountPolicy type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description
See also

begin_create_or_update_by_billing_profile

Updates the policies for a billing profile. This operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

begin_create_or_update_by_billing_profile(billing_account_name: str, billing_profile_name: str, parameters: _models.BillingProfilePolicy, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.BillingProfilePolicy]

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.

parameters
Required

A policy at billing profile scope. Is either a BillingProfilePolicy type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description
See also

begin_create_or_update_by_customer

Updates the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

begin_create_or_update_by_customer(billing_account_name: str, billing_profile_name: str, customer_name: str, parameters: _models.CustomerPolicy, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.CustomerPolicy]

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.

customer_name
Required
str

The ID that uniquely identifies a customer. Required.

parameters
Required

A policy at customer scope. Is either a CustomerPolicy type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description
See also

begin_create_or_update_by_customer_at_billing_account

Updates the policies for a customer at billing account scope. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

begin_create_or_update_by_customer_at_billing_account(billing_account_name: str, customer_name: str, parameters: _models.CustomerPolicy, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.CustomerPolicy]

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.

parameters
Required

A policy at customer scope. Is either a CustomerPolicy type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description
See also

get_by_billing_account

Get the policies for a billing account of Enterprise Agreement type.

get_by_billing_account(billing_account_name: str, **kwargs: Any) -> BillingAccountPolicy

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

Returns

Type Description

BillingAccountPolicy or the result of cls(response)

Exceptions

Type Description
See also

get_by_billing_profile

Lists the policies for a billing profile. This operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

get_by_billing_profile(billing_account_name: str, billing_profile_name: str, **kwargs: Any) -> BillingProfilePolicy

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.

Returns

Type Description

BillingProfilePolicy or the result of cls(response)

Exceptions

Type Description
See also

get_by_customer

Lists the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

get_by_customer(billing_account_name: str, billing_profile_name: str, customer_name: str, policy_name: str | ServiceDefinedResourceName, **kwargs: Any) -> CustomerPolicy

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.

customer_name
Required
str

The ID that uniquely identifies a customer. Required.

policy_name
Required

Service-defined resource names such as 'default' which are reserved resource names. "default" Required.

Returns

Type Description

CustomerPolicy or the result of cls(response)

Exceptions

Type Description
See also

get_by_customer_at_billing_account

Lists the policies for a customer at billing account scope. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.

get_by_customer_at_billing_account(billing_account_name: str, customer_name: str, **kwargs: Any) -> CustomerPolicy

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.

Returns

Type Description

CustomerPolicy or the result of cls(response)

Exceptions

Type Description
See also

get_by_subscription

Lists the policies that are managed by the Billing Admin for the defined subscriptions. This is supported for Microsoft Online Services Program, Microsoft Customer Agreement and Microsoft Partner Agreement.

get_by_subscription(**kwargs: Any) -> SubscriptionPolicy

Returns

Type Description

SubscriptionPolicy 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'>