Class: Google::Apis::IntegrationsV1alpha::EnterpriseCrmEventbusProtoTaskAlertConfig

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

Overview

Message to be used to configure alerting in the @code TaskConfig protos for tasks in an event.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EnterpriseCrmEventbusProtoTaskAlertConfig

Returns a new instance of EnterpriseCrmEventbusProtoTaskAlertConfig.



2718
2719
2720
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2718

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

Instance Attribute Details

#aggregation_periodString

The period over which the metric value should be aggregated and evaluated. Format is , where integer should be a positive integer and unit should be one of (s,m,h,d,w) meaning (second, minute, hour, day, week). Corresponds to the JSON property aggregationPeriod

Returns:

  • (String)


2639
2640
2641
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2639

def aggregation_period
  @aggregation_period
end

#alert_disabledBoolean Also known as: alert_disabled?

Set to false by default. When set to true, the metrics are not aggregated or pushed to Monarch for this workflow alert. Corresponds to the JSON property alertDisabled

Returns:

  • (Boolean)


2645
2646
2647
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2645

def alert_disabled
  @alert_disabled
end

#alert_nameString

A name to identify this alert. This will be displayed in the alert subject. If set, this name should be unique in within the scope of the containing workflow. Corresponds to the JSON property alertName

Returns:

  • (String)


2652
2653
2654
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2652

def alert_name
  @alert_name
end

#client_idString

Client associated with this alert configuration. Must be a client enabled in one of the containing workflow's triggers. Corresponds to the JSON property clientId

Returns:

  • (String)


2658
2659
2660
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2658

def client_id
  @client_id
end

#duration_threshold_msFixnum

Should be specified only for TASK_AVERAGE_DURATION and TASK_PERCENTILE_DURATION metrics. This member should be used to specify what duration value the metrics should exceed for the alert to trigger. Corresponds to the JSON property durationThresholdMs

Returns:

  • (Fixnum)


2665
2666
2667
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2665

def duration_threshold_ms
  @duration_threshold_ms
end

#error_enum_listGoogle::Apis::IntegrationsV1alpha::EnterpriseCrmEventbusProtoBaseAlertConfigErrorEnumList

List of error enums for alerts. Corresponds to the JSON property errorEnumList



2670
2671
2672
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2670

def error_enum_list
  @error_enum_list
end

#metric_typeString

Corresponds to the JSON property metricType

Returns:

  • (String)


2675
2676
2677
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2675

def metric_type
  @metric_type
end

#num_aggregation_periodsFixnum

For how many contiguous aggregation periods should the expected min or max be violated for the alert to be fired. Corresponds to the JSON property numAggregationPeriods

Returns:

  • (Fixnum)


2681
2682
2683
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2681

def num_aggregation_periods
  @num_aggregation_periods
end

#only_final_attemptBoolean Also known as: only_final_attempt?

Only count final task attempts, not retries. Corresponds to the JSON property onlyFinalAttempt

Returns:

  • (Boolean)


2686
2687
2688
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2686

def only_final_attempt
  @only_final_attempt
end

#playbook_urlString

Link to a playbook for resolving the issue that triggered this alert. Corresponds to the JSON property playbookUrl

Returns:

  • (String)


2692
2693
2694
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2692

def playbook_url
  @playbook_url
end

#threshold_typeString

The threshold type for which this alert is being configured. If value falls below expected_min or exceeds expected_max, an alert will be fired. Corresponds to the JSON property thresholdType

Returns:

  • (String)


2698
2699
2700
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2698

def threshold_type
  @threshold_type
end

#threshold_valueGoogle::Apis::IntegrationsV1alpha::EnterpriseCrmEventbusProtoBaseAlertConfigThresholdValue

The threshold value of the metric, above or below which the alert should be triggered. See EventAlertConfig or TaskAlertConfig for the different alert metric types in each case. For the *RATE metrics, one or both of these fields may be set. Zero is the default value and can be left at that. For * PERCENTILE_DURATION metrics, one or both of these fields may be set, and also, the duration threshold value should be specified in the threshold_duration_ms member below. For *AVERAGE_DURATION metrics, these fields should not be set at all. A different member, threshold_duration_ms, must be set in the EventAlertConfig or the TaskAlertConfig. Corresponds to the JSON property thresholdValue



2711
2712
2713
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2711

def threshold_value
  @threshold_value
end

#warning_enum_listGoogle::Apis::IntegrationsV1alpha::EnterpriseCrmEventbusProtoBaseAlertConfigErrorEnumList

List of error enums for alerts. Corresponds to the JSON property warningEnumList



2716
2717
2718
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2716

def warning_enum_list
  @warning_enum_list
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 2723

def update!(**args)
  @aggregation_period = args[:aggregation_period] if args.key?(:aggregation_period)
  @alert_disabled = args[:alert_disabled] if args.key?(:alert_disabled)
  @alert_name = args[:alert_name] if args.key?(:alert_name)
  @client_id = args[:client_id] if args.key?(:client_id)
  @duration_threshold_ms = args[:duration_threshold_ms] if args.key?(:duration_threshold_ms)
  @error_enum_list = args[:error_enum_list] if args.key?(:error_enum_list)
  @metric_type = args[:metric_type] if args.key?(:metric_type)
  @num_aggregation_periods = args[:num_aggregation_periods] if args.key?(:num_aggregation_periods)
  @only_final_attempt = args[:only_final_attempt] if args.key?(:only_final_attempt)
  @playbook_url = args[:playbook_url] if args.key?(:playbook_url)
  @threshold_type = args[:threshold_type] if args.key?(:threshold_type)
  @threshold_value = args[:threshold_value] if args.key?(:threshold_value)
  @warning_enum_list = args[:warning_enum_list] if args.key?(:warning_enum_list)
end