# Billing Budgets V1beta1 API - Class Google::Cloud::Billing::Budgets::V1beta1::BudgetAmount (v0.17.0)

0.17.0 (latest) 0.16.1 0.15.0 0.14.1 0.13.0 0.12.1 0.11.2 0.10.0 0.9.0 0.8.0 0.7.0 0.6.5 Reference documentation and code samples for the Billing Budgets V1beta1 API class Google::Cloud::Billing::Budgets::V1beta1::BudgetAmount.

The budgeted amount for each usage period.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #last_period_amount

    def last_period_amount() -> ::Google::Cloud::Billing::Budgets::V1beta1::LastPeriodAmount

**Returns**

- ([::Google::Cloud::Billing::Budgets::V1beta1::LastPeriodAmount](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest/Google-Cloud-Billing-Budgets-V1beta1-LastPeriodAmount)) --- Use the last period's actual spend as the budget for the present period. LastPeriodAmount can only be set when the budget's time period is a [Filter.calendar_period](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest/Google-Cloud-Billing-Budgets-V1beta1-Filter#Google__Cloud__Billing__Budgets__V1beta1__Filter_calendar_period_instance_ "Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period (method)"). It cannot be set in combination with [Filter.custom_period](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest/Google-Cloud-Billing-Budgets-V1beta1-Filter#Google__Cloud__Billing__Budgets__V1beta1__Filter_custom_period_instance_ "Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period (method)").


  Note: The following fields are mutually exclusive: `last_period_amount`, `specified_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #last_period_amount=

    def last_period_amount=(value) -> ::Google::Cloud::Billing::Budgets::V1beta1::LastPeriodAmount

**Parameter**

- **value** ([::Google::Cloud::Billing::Budgets::V1beta1::LastPeriodAmount](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest/Google-Cloud-Billing-Budgets-V1beta1-LastPeriodAmount)) --- Use the last period's actual spend as the budget for the present period. LastPeriodAmount can only be set when the budget's time period is a [Filter.calendar_period](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest/Google-Cloud-Billing-Budgets-V1beta1-Filter#Google__Cloud__Billing__Budgets__V1beta1__Filter_calendar_period_instance_ "Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period (method)"). It cannot be set in combination with [Filter.custom_period](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest/Google-Cloud-Billing-Budgets-V1beta1-Filter#Google__Cloud__Billing__Budgets__V1beta1__Filter_custom_period_instance_ "Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period (method)").


  Note: The following fields are mutually exclusive: `last_period_amount`, `specified_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Billing::Budgets::V1beta1::LastPeriodAmount](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest/Google-Cloud-Billing-Budgets-V1beta1-LastPeriodAmount)) --- Use the last period's actual spend as the budget for the present period. LastPeriodAmount can only be set when the budget's time period is a [Filter.calendar_period](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest/Google-Cloud-Billing-Budgets-V1beta1-Filter#Google__Cloud__Billing__Budgets__V1beta1__Filter_calendar_period_instance_ "Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period (method)"). It cannot be set in combination with [Filter.custom_period](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest/Google-Cloud-Billing-Budgets-V1beta1-Filter#Google__Cloud__Billing__Budgets__V1beta1__Filter_custom_period_instance_ "Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period (method)").


  Note: The following fields are mutually exclusive: `last_period_amount`, `specified_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #specified_amount

    def specified_amount() -> ::Google::Type::Money

**Returns**

- ([::Google::Type::Money](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest/Google-Type-Money)) --- A specified amount to use as the budget. `currency_code` is optional. If specified when creating a budget, it must match the currency of the billing account. If specified when updating a budget, it must match the currency_code of the existing budget. The `currency_code` is provided on output.


  Note: The following fields are mutually exclusive: `specified_amount`, `last_period_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #specified_amount=

    def specified_amount=(value) -> ::Google::Type::Money

**Parameter**

- **value** ([::Google::Type::Money](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest/Google-Type-Money)) --- A specified amount to use as the budget. `currency_code` is optional. If specified when creating a budget, it must match the currency of the billing account. If specified when updating a budget, it must match the currency_code of the existing budget. The `currency_code` is provided on output.


  Note: The following fields are mutually exclusive: `specified_amount`, `last_period_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Type::Money](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest/Google-Type-Money)) --- A specified amount to use as the budget. `currency_code` is optional. If specified when creating a budget, it must match the currency of the billing account. If specified when updating a budget, it must match the currency_code of the existing budget. The `currency_code` is provided on output.


  Note: The following fields are mutually exclusive: `specified_amount`, `last_period_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared.