SavingsPlansOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

BillingManagementClient's

<xref:savings_plans> attribute.

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
SavingsPlanUpdateRequest or <xref:JSON> or IO[bytes]

Request body for patching a savings plan order alias. Is one of the following types: SavingsPlanUpdateRequest, JSON, IO[bytes] Required.

Returns

Type Description

An instance of LROPoller that returns SavingsPlanModel. The SavingsPlanModel is compatible with MutableMapping

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.

Keyword-Only Parameters

Name Description
expand
str

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

Default value: None

Returns

Type Description

SavingsPlanModel. The SavingsPlanModel is compatible with MutableMapping

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) -> ItemPaged[SavingsPlanModel]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

Keyword-Only Parameters

Name Description
filter
str

The filter query option allows clients to filter a collection of resources that are addressed by a request URL. Default value is None.

Default value: None
order_by
str

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

Default value: None
skiptoken

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

Default value: None
take

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

Default value: None
selected_state
str

The selected provisioning state. Default value is None.

Default value: None
refresh_summary
str

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

Default value: None

Returns

Type Description

An iterator like instance of SavingsPlanModel

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) -> ItemPaged[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 SavingsPlanModel

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 one of the following types: SavingsPlanUpdateValidateRequest, JSON, IO[bytes] Required.

Returns

Type Description

SavingsPlanValidateResponse. The SavingsPlanValidateResponse is compatible with MutableMapping

Exceptions

Type Description