Class: AWSCDK::CloudWatch::CfnLogAlarm::ScheduledQueryConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_watch/cfn_log_alarm.rb

Overview

The scheduled query configuration for the log alarm.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aggregation_expression:, log_group_identifiers:, query_string:, schedule_configuration:, scheduled_query_role_arn:) ⇒ ScheduledQueryConfigurationProperty

Returns a new instance of ScheduledQueryConfigurationProperty.

Parameters:

  • aggregation_expression (String)

    The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.

  • log_group_identifiers (Array<String>)

    The log groups to query.

  • query_string (String)

    The query string to execute against the specified log groups.

  • schedule_configuration (AWSCDK::IResolvable, AWSCDK::CloudWatch::CfnLogAlarm::ScheduleConfigurationProperty)

    The schedule configuration for the scheduled query.

  • scheduled_query_role_arn (String)

    The ARN of the IAM role that grants permissions to execute the scheduled query.



759
760
761
762
763
764
765
766
767
768
769
770
# File 'cloud_watch/cfn_log_alarm.rb', line 759

def initialize(aggregation_expression:, log_group_identifiers:, query_string:, schedule_configuration:, scheduled_query_role_arn:)
  @aggregation_expression = aggregation_expression
  Jsii::Type.check_type(@aggregation_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "aggregationExpression")
  @log_group_identifiers = log_group_identifiers
  Jsii::Type.check_type(@log_group_identifiers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "logGroupIdentifiers")
  @query_string = query_string
  Jsii::Type.check_type(@query_string, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queryString")
  @schedule_configuration = schedule_configuration.is_a?(Hash) ? ::AWSCDK::CloudWatch::CfnLogAlarm::ScheduleConfigurationProperty.new(**schedule_configuration.transform_keys(&:to_sym)) : schedule_configuration
  Jsii::Type.check_type(@schedule_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZHdhdGNoLkNmbkxvZ0FsYXJtLlNjaGVkdWxlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "scheduleConfiguration")
  @scheduled_query_role_arn = scheduled_query_role_arn
  Jsii::Type.check_type(@scheduled_query_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduledQueryRoleArn")
end

Instance Attribute Details

#aggregation_expressionString (readonly)

The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.



776
777
778
# File 'cloud_watch/cfn_log_alarm.rb', line 776

def aggregation_expression
  @aggregation_expression
end

#log_group_identifiersArray<String> (readonly)

The log groups to query.



781
782
783
# File 'cloud_watch/cfn_log_alarm.rb', line 781

def log_group_identifiers
  @log_group_identifiers
end

#query_stringString (readonly)

The query string to execute against the specified log groups.



786
787
788
# File 'cloud_watch/cfn_log_alarm.rb', line 786

def query_string
  @query_string
end

#scheduled_query_role_arnString (readonly)

The ARN of the IAM role that grants permissions to execute the scheduled query.



796
797
798
# File 'cloud_watch/cfn_log_alarm.rb', line 796

def scheduled_query_role_arn
  @scheduled_query_role_arn
end

Class Method Details

.jsii_propertiesObject



798
799
800
801
802
803
804
805
806
# File 'cloud_watch/cfn_log_alarm.rb', line 798

def self.jsii_properties
  {
    :aggregation_expression => "aggregationExpression",
    :log_group_identifiers => "logGroupIdentifiers",
    :query_string => "queryString",
    :schedule_configuration => "scheduleConfiguration",
    :scheduled_query_role_arn => "scheduledQueryRoleArn",
  }
end

Instance Method Details

#to_jsiiObject



808
809
810
811
812
813
814
815
816
817
818
# File 'cloud_watch/cfn_log_alarm.rb', line 808

def to_jsii
  result = {}
  result.merge!({
    "aggregationExpression" => @aggregation_expression,
    "logGroupIdentifiers" => @log_group_identifiers,
    "queryString" => @query_string,
    "scheduleConfiguration" => @schedule_configuration,
    "scheduledQueryRoleArn" => @scheduled_query_role_arn,
  })
  result.compact
end