SavingsPlansOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

BillingManagementClient's

<xref:savings_plans> attribute.

Inheritance
builtins.object
SavingsPlansOperations

Constructor

SavingsPlansOperations(*args, **kwargs)

Methods

begin_update_by_billing_account

Update savings plan by billing account.

get_by_billing_account

Get savings plan by billing account.

list_by_billing_account

List savings plans by billing account.

list_by_savings_plan_order

List savings plans in an order by billing account.

validate_update_by_billing_account

Validate savings plan patch by billing account.

begin_update_by_billing_account

Update savings plan by billing account.

begin_update_by_billing_account(billing_account_name: str, savings_plan_order_id: str, savings_plan_id: str, body: _models.SavingsPlanUpdateRequest, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.SavingsPlanModel]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

savings_plan_order_id
Required
str

Order ID of the savings plan. Required.

savings_plan_id
Required
str

ID of the savings plan. Required.

body
Required

Request body for patching a savings plan order alias. Is either a SavingsPlanUpdateRequest type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

get_by_billing_account

Get savings plan by billing account.

get_by_billing_account(billing_account_name: str, savings_plan_order_id: str, savings_plan_id: str, expand: str | None = None, **kwargs: Any) -> SavingsPlanModel

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

savings_plan_order_id
Required
str

Order ID of the savings plan. Required.

savings_plan_id
Required
str

ID of the savings plan. Required.

expand
Required
str

May be used to expand the planInformation. Default value is None.

Returns

Type Description

SavingsPlanModel or the result of cls(response)

Exceptions

Type Description

list_by_billing_account

List savings plans by billing account.

list_by_billing_account(billing_account_name: str, filter: str | None = None, order_by: str | None = None, skiptoken: float | None = None, take: float | None = None, selected_state: str | None = None, refresh_summary: str | None = None, **kwargs: Any) -> Iterable[SavingsPlanModel]

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.

order_by
Required
str

The orderby query option allows clients to request resources in a particular order. Default value is None.

skiptoken
Required

The number of savings plans to skip from the list before returning results. Default value is None.

take
Required

The number of savings plans to return. Default value is None.

selected_state
Required
str

The selected provisioning state. Default value is None.

refresh_summary
Required
str

To indicate whether to refresh the roll up counts of the savings plans group by provisioning states. Default value is None.

Returns

Type Description

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

Exceptions

Type Description

list_by_savings_plan_order

List savings plans in an order by billing account.

list_by_savings_plan_order(billing_account_name: str, savings_plan_order_id: str, **kwargs: Any) -> Iterable[SavingsPlanModel]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

savings_plan_order_id
Required
str

Order ID of the savings plan. Required.

Returns

Type Description

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

Exceptions

Type Description

validate_update_by_billing_account

Validate savings plan patch by billing account.

validate_update_by_billing_account(billing_account_name: str, savings_plan_order_id: str, savings_plan_id: str, body: _models.SavingsPlanUpdateValidateRequest, *, content_type: str = 'application/json', **kwargs: Any) -> _models.SavingsPlanValidateResponse

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

savings_plan_order_id
Required
str

Order ID of the savings plan. Required.

savings_plan_id
Required
str

ID of the savings plan. Required.

body
Required

Request body for patching a savings plan order alias. Is either a SavingsPlanUpdateValidateRequest type or a IO[bytes] type. Required.

Returns

Type Description

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