Sdílet prostřednictvím


PoliciesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

BillingManagementClient's

<xref:policies> attribute.

Constructor

PoliciesOperations(*args, **kwargs)

Methods

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.

update

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

update_customer

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

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) -> Policy

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.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

Policy or the result of cls(response)

Exceptions

Type Description

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

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

CustomerPolicy or the result of cls(response)

Exceptions

Type Description

update

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

update(billing_account_name: str, billing_profile_name: str, parameters: _models.Policy, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Policy

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
Policy or IO

Request parameters that are provided to the update policies operation. Is either a model type or a IO type. Required.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

A custom type or function that will be passed the direct response

Returns

Type Description

Policy or the result of cls(response)

Exceptions

Type Description

update_customer

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

update_customer(billing_account_name: str, customer_name: str, parameters: _models.CustomerPolicy, *, content_type: str = 'application/json', **kwargs: Any) -> _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

Request parameters that are provided to the update policies operation. Is either a model type or a IO type. Required.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

A custom type or function that will be passed the direct response

Returns

Type Description

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