Class: Google::Apis::MonitoringV3::AlertStrategy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/monitoring_v3/classes.rb,
lib/google/apis/monitoring_v3/representations.rb,
lib/google/apis/monitoring_v3/representations.rb

Overview

Control over how the notification channels in notification_channels are notified when this alert fires.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AlertStrategy

Returns a new instance of AlertStrategy.



371
372
373
# File 'lib/google/apis/monitoring_v3/classes.rb', line 371

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

Instance Attribute Details

#auto_closeString

If an alerting policy that was active has no data for this long, any open incidents will close Corresponds to the JSON property autoClose

Returns:

  • (String)


351
352
353
# File 'lib/google/apis/monitoring_v3/classes.rb', line 351

def auto_close
  @auto_close
end

#notification_channel_strategyArray<Google::Apis::MonitoringV3::NotificationChannelStrategy>

Control how notifications will be sent out, on a per-channel basis. Corresponds to the JSON property notificationChannelStrategy



356
357
358
# File 'lib/google/apis/monitoring_v3/classes.rb', line 356

def notification_channel_strategy
  @notification_channel_strategy
end

#notification_promptsArray<String>

For log-based alert policies, the notification prompts is always OPENED. For non log-based alert policies, the notification prompts can be OPENED or OPENED, CLOSED. Corresponds to the JSON property notificationPrompts

Returns:

  • (Array<String>)


363
364
365
# File 'lib/google/apis/monitoring_v3/classes.rb', line 363

def notification_prompts
  @notification_prompts
end

#notification_rate_limitGoogle::Apis::MonitoringV3::NotificationRateLimit

Control over the rate of notifications sent to this alerting policy's notification channels. Corresponds to the JSON property notificationRateLimit



369
370
371
# File 'lib/google/apis/monitoring_v3/classes.rb', line 369

def notification_rate_limit
  @notification_rate_limit
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



376
377
378
379
380
381
# File 'lib/google/apis/monitoring_v3/classes.rb', line 376

def update!(**args)
  @auto_close = args[:auto_close] if args.key?(:auto_close)
  @notification_channel_strategy = args[:notification_channel_strategy] if args.key?(:notification_channel_strategy)
  @notification_prompts = args[:notification_prompts] if args.key?(:notification_prompts)
  @notification_rate_limit = args[:notification_rate_limit] if args.key?(:notification_rate_limit)
end