Class: Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1ThresholdRule

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudBillingBudgetsV1beta1ThresholdRule

Returns a new instance of GoogleCloudBillingBudgetsV1beta1ThresholdRule.



330
331
332
# File 'generated/google/apis/billingbudgets_v1beta1/classes.rb', line 330

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#spend_basisString

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

Returns:

  • (String)


322
323
324
# File 'generated/google/apis/billingbudgets_v1beta1/classes.rb', line 322

def spend_basis
  @spend_basis
end

#threshold_percentFloat

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

Returns:

  • (Float)


328
329
330
# File 'generated/google/apis/billingbudgets_v1beta1/classes.rb', line 328

def threshold_percent
  @threshold_percent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



335
336
337
338
# File 'generated/google/apis/billingbudgets_v1beta1/classes.rb', line 335

def update!(**args)
  @spend_basis = args[:spend_basis] if args.key?(:spend_basis)
  @threshold_percent = args[:threshold_percent] if args.key?(:threshold_percent)
end