Class: Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget
- Inherits:
-
Object
- Object
- Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Budget
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/billingbudgets_v1/classes.rb,
lib/google/apis/billingbudgets_v1/representations.rb,
lib/google/apis/billingbudgets_v1/representations.rb
Overview
A budget is a plan that describes what you expect to spend on Cloud projects, plus the rules to execute as spend is tracked against that plan, (for example, send an alert when 90% of the target spend is met). The budget time period is configurable, with options such as month (default), quarter, year, or custom time period.
Instance Attribute Summary collapse
-
#amount ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1BudgetAmount
The budgeted amount for each usage period.
-
#budget_filter ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Filter
A filter for a budget, limiting the scope of the cost to calculate.
-
#display_name ⇒ String
User data for display name in UI.
-
#etag ⇒ String
Optional.
-
#name ⇒ String
Output only.
-
#notifications_rule ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1NotificationsRule
NotificationsRule defines notifications that are sent based on budget spend and thresholds.
-
#ownership_scope ⇒ String
Corresponds to the JSON property
ownershipScope
. -
#threshold_rules ⇒ Array<Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1ThresholdRule>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudBillingBudgetsV1Budget
constructor
A new instance of GoogleCloudBillingBudgetsV1Budget.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudBillingBudgetsV1Budget
Returns a new instance of GoogleCloudBillingBudgetsV1Budget.
80 81 82 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 80 def initialize(**args) update!(**args) end |
Instance Attribute Details
#amount ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1BudgetAmount
The budgeted amount for each usage period.
Corresponds to the JSON property amount
36 37 38 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 36 def amount @amount end |
#budget_filter ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1Filter
A filter for a budget, limiting the scope of the cost to calculate.
Corresponds to the JSON property budgetFilter
41 42 43 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 41 def budget_filter @budget_filter end |
#display_name ⇒ String
User data for display name in UI. The name must be less than or equal to 60
characters.
Corresponds to the JSON property displayName
47 48 49 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 47 def display_name @display_name end |
#etag ⇒ String
Optional. Etag to validate that the object is unchanged for a read-modify-
write operation. An empty etag causes an update to overwrite other changes.
Corresponds to the JSON property etag
53 54 55 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 53 def etag @etag end |
#name ⇒ String
Output only. Resource name of the budget. The resource name implies the scope
of a budget. Values are of the form billingAccounts/
billingAccountId/
budgets/
budgetId`.
Corresponds to the JSON property
name`
60 61 62 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 60 def name @name end |
#notifications_rule ⇒ Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1NotificationsRule
NotificationsRule defines notifications that are sent based on budget spend
and thresholds.
Corresponds to the JSON property notificationsRule
66 67 68 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 66 def notifications_rule @notifications_rule end |
#ownership_scope ⇒ String
Corresponds to the JSON property ownershipScope
71 72 73 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 71 def ownership_scope @ownership_scope end |
#threshold_rules ⇒ Array<Google::Apis::BillingbudgetsV1::GoogleCloudBillingBudgetsV1ThresholdRule>
Optional. Rules that trigger alerts (notifications of thresholds being crossed)
when spend exceeds the specified percentages of the budget. Optional for
pubsubTopic
notifications. Required if using email notifications.
Corresponds to the JSON property thresholdRules
78 79 80 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 78 def threshold_rules @threshold_rules end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
85 86 87 88 89 90 91 92 93 94 |
# File 'lib/google/apis/billingbudgets_v1/classes.rb', line 85 def update!(**args) @amount = args[:amount] if args.key?(:amount) @budget_filter = args[:budget_filter] if args.key?(:budget_filter) @display_name = args[:display_name] if args.key?(:display_name) @etag = args[:etag] if args.key?(:etag) @name = args[:name] if args.key?(:name) @notifications_rule = args[:notifications_rule] if args.key?(:notifications_rule) @ownership_scope = args[:ownership_scope] if args.key?(:ownership_scope) @threshold_rules = args[:threshold_rules] if args.key?(:threshold_rules) end |