Class: Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1ThresholdRule
- Inherits:
-
Object
- Object
- Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1ThresholdRule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/billingbudgets_v1beta1/classes.rb,
generated/google/apis/billingbudgets_v1beta1/representations.rb,
generated/google/apis/billingbudgets_v1beta1/representations.rb
Overview
ThresholdRule contains a definition of a threshold which triggers
an alert (a notification of a threshold being crossed) to be sent when
spend goes above the specified amount.
Alerts are automatically e-mailed to users with the Billing Account
Administrator role or the Billing Account User role.
The thresholds here have no effect on notifications sent to anything
configured under Budget.all_updates_rule
.
Instance Attribute Summary collapse
-
#spend_basis ⇒ String
Optional.
-
#threshold_percent ⇒ Float
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudBillingBudgetsV1beta1ThresholdRule
constructor
A new instance of GoogleCloudBillingBudgetsV1beta1ThresholdRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ GoogleCloudBillingBudgetsV1beta1ThresholdRule
Returns a new instance of GoogleCloudBillingBudgetsV1beta1ThresholdRule.
290 291 292 |
# File 'generated/google/apis/billingbudgets_v1beta1/classes.rb', line 290 def initialize(**args) update!(**args) end |
Instance Attribute Details
#spend_basis ⇒ String
Optional. The type of basis used to determine if spend has passed the
threshold. Behavior defaults to CURRENT_SPEND if not set.
Corresponds to the JSON property spendBasis
281 282 283 |
# File 'generated/google/apis/billingbudgets_v1beta1/classes.rb', line 281 def spend_basis @spend_basis end |
#threshold_percent ⇒ Float
Required. Send an alert when this threshold is exceeded.
This is a 1.0-based percentage, so 0.5 = 50%.
Validation: non-negative number.
Corresponds to the JSON property thresholdPercent
288 289 290 |
# File 'generated/google/apis/billingbudgets_v1beta1/classes.rb', line 288 def threshold_percent @threshold_percent end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
295 296 297 298 |
# File 'generated/google/apis/billingbudgets_v1beta1/classes.rb', line 295 def update!(**args) @spend_basis = args[:spend_basis] if args.key?(:spend_basis) @threshold_percent = args[:threshold_percent] if args.key?(:threshold_percent) end |