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.



287
288
289
# File 'lib/google/apis/monitoring_v3/classes.rb', line 287

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)


267
268
269
# File 'lib/google/apis/monitoring_v3/classes.rb', line 267

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



272
273
274
# File 'lib/google/apis/monitoring_v3/classes.rb', line 272

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>)


279
280
281
# File 'lib/google/apis/monitoring_v3/classes.rb', line 279

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



285
286
287
# File 'lib/google/apis/monitoring_v3/classes.rb', line 285

def notification_rate_limit
  @notification_rate_limit
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



292
293
294
295
296
297
# File 'lib/google/apis/monitoring_v3/classes.rb', line 292

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