Class: Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1Budget
- Inherits:
-
Object
- Object
- Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1Budget
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/billingbudgets_v1beta1/classes.rb,
lib/google/apis/billingbudgets_v1beta1/representations.rb,
lib/google/apis/billingbudgets_v1beta1/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
-
#all_updates_rule ⇒ Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1AllUpdatesRule
AllUpdatesRule defines notifications that are sent based on budget spend and thresholds.
-
#amount ⇒ Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1BudgetAmount
The budgeted amount for each usage period.
-
#budget_filter ⇒ Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1Filter
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.
-
#ownership_scope ⇒ String
Corresponds to the JSON property
ownershipScope
. -
#threshold_rules ⇒ Array<Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1ThresholdRule>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudBillingBudgetsV1beta1Budget
constructor
A new instance of GoogleCloudBillingBudgetsV1beta1Budget.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudBillingBudgetsV1beta1Budget
Returns a new instance of GoogleCloudBillingBudgetsV1beta1Budget.
149 150 151 |
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 149 def initialize(**args) update!(**args) end |
Instance Attribute Details
#all_updates_rule ⇒ Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1AllUpdatesRule
AllUpdatesRule defines notifications that are sent based on budget spend and
thresholds.
Corresponds to the JSON property allUpdatesRule
107 108 109 |
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 107 def all_updates_rule @all_updates_rule end |
#amount ⇒ Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1BudgetAmount
The budgeted amount for each usage period.
Corresponds to the JSON property amount
112 113 114 |
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 112 def amount @amount end |
#budget_filter ⇒ Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1Filter
A filter for a budget, limiting the scope of the cost to calculate.
Corresponds to the JSON property budgetFilter
117 118 119 |
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 117 def budget_filter @budget_filter end |
#display_name ⇒ String
User data for display name in UI. Validation: <= 60 chars.
Corresponds to the JSON property displayName
122 123 124 |
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 122 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 will cause an update to overwrite other changes.
Corresponds to the JSON property etag
128 129 130 |
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 128 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`
135 136 137 |
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 135 def name @name end |
#ownership_scope ⇒ String
Corresponds to the JSON property ownershipScope
140 141 142 |
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 140 def ownership_scope @ownership_scope end |
#threshold_rules ⇒ Array<Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1ThresholdRule>
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
147 148 149 |
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 147 def threshold_rules @threshold_rules end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
154 155 156 157 158 159 160 161 162 163 |
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 154 def update!(**args) @all_updates_rule = args[:all_updates_rule] if args.key?(:all_updates_rule) @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) @ownership_scope = args[:ownership_scope] if args.key?(:ownership_scope) @threshold_rules = args[:threshold_rules] if args.key?(:threshold_rules) end |