Class: AWSCDK::InternetMonitor::CfnMonitor::HealthEventsConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
internet_monitor/cfn_monitor.rb

Overview

Define the health event threshold percentages for the performance score and availability score for your application's monitor.

Amazon CloudWatch Internet Monitor creates a health event when there's an internet issue that affects your application end users where a health score percentage is at or below a set threshold.

If you don't set a health event threshold, the default value is 95%.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(availability_local_health_events_config: nil, availability_score_threshold: nil, performance_local_health_events_config: nil, performance_score_threshold: nil) ⇒ HealthEventsConfigProperty

Returns a new instance of HealthEventsConfigProperty.

Parameters:

  • availability_local_health_events_config (AWSCDK::IResolvable, AWSCDK::InternetMonitor::CfnMonitor::LocalHealthEventsConfigProperty, nil) (defaults to: nil)

    The configuration that determines the threshold and other conditions for when Internet Monitor creates a health event for a local availability issue.

  • availability_score_threshold (Numeric, nil) (defaults to: nil)

    The health event threshold percentage set for availability scores.

  • performance_local_health_events_config (AWSCDK::IResolvable, AWSCDK::InternetMonitor::CfnMonitor::LocalHealthEventsConfigProperty, nil) (defaults to: nil)

    The configuration that determines the threshold and other conditions for when Internet Monitor creates a health event for a local performance issue.

  • performance_score_threshold (Numeric, nil) (defaults to: nil)

    The health event threshold percentage set for performance scores.



735
736
737
738
739
740
741
742
743
744
# File 'internet_monitor/cfn_monitor.rb', line 735

def initialize(availability_local_health_events_config: nil, availability_score_threshold: nil, performance_local_health_events_config: nil, performance_score_threshold: nil)
  @availability_local_health_events_config = availability_local_health_events_config.is_a?(Hash) ? ::AWSCDK::InternetMonitor::CfnMonitor::LocalHealthEventsConfigProperty.new(**availability_local_health_events_config.transform_keys(&:to_sym)) : availability_local_health_events_config
  Jsii::Type.check_type(@availability_local_health_events_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pbnRlcm5ldG1vbml0b3IuQ2ZuTW9uaXRvci5Mb2NhbEhlYWx0aEV2ZW50c0NvbmZpZ1Byb3BlcnR5In1dfX0=")), "availabilityLocalHealthEventsConfig") unless @availability_local_health_events_config.nil?
  @availability_score_threshold = availability_score_threshold
  Jsii::Type.check_type(@availability_score_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "availabilityScoreThreshold") unless @availability_score_threshold.nil?
  @performance_local_health_events_config = performance_local_health_events_config.is_a?(Hash) ? ::AWSCDK::InternetMonitor::CfnMonitor::LocalHealthEventsConfigProperty.new(**performance_local_health_events_config.transform_keys(&:to_sym)) : performance_local_health_events_config
  Jsii::Type.check_type(@performance_local_health_events_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pbnRlcm5ldG1vbml0b3IuQ2ZuTW9uaXRvci5Mb2NhbEhlYWx0aEV2ZW50c0NvbmZpZ1Byb3BlcnR5In1dfX0=")), "performanceLocalHealthEventsConfig") unless @performance_local_health_events_config.nil?
  @performance_score_threshold = performance_score_threshold
  Jsii::Type.check_type(@performance_score_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "performanceScoreThreshold") unless @performance_score_threshold.nil?
end

Instance Attribute Details

#availability_local_health_events_configAWSCDK::IResolvable, ... (readonly)

The configuration that determines the threshold and other conditions for when Internet Monitor creates a health event for a local availability issue.



750
751
752
# File 'internet_monitor/cfn_monitor.rb', line 750

def availability_local_health_events_config
  @availability_local_health_events_config
end

#availability_score_thresholdNumeric? (readonly)

The health event threshold percentage set for availability scores.

When the overall availability score is at or below this percentage, Internet Monitor creates a health event.



757
758
759
# File 'internet_monitor/cfn_monitor.rb', line 757

def availability_score_threshold
  @availability_score_threshold
end

#performance_local_health_events_configAWSCDK::IResolvable, ... (readonly)

The configuration that determines the threshold and other conditions for when Internet Monitor creates a health event for a local performance issue.



762
763
764
# File 'internet_monitor/cfn_monitor.rb', line 762

def performance_local_health_events_config
  @performance_local_health_events_config
end

#performance_score_thresholdNumeric? (readonly)

The health event threshold percentage set for performance scores.

When the overall performance score is at or below this percentage, Internet Monitor creates a health event.



769
770
771
# File 'internet_monitor/cfn_monitor.rb', line 769

def performance_score_threshold
  @performance_score_threshold
end

Class Method Details

.jsii_propertiesObject



771
772
773
774
775
776
777
778
# File 'internet_monitor/cfn_monitor.rb', line 771

def self.jsii_properties
  {
    :availability_local_health_events_config => "availabilityLocalHealthEventsConfig",
    :availability_score_threshold => "availabilityScoreThreshold",
    :performance_local_health_events_config => "performanceLocalHealthEventsConfig",
    :performance_score_threshold => "performanceScoreThreshold",
  }
end

Instance Method Details

#to_jsiiObject



780
781
782
783
784
785
786
787
788
789
# File 'internet_monitor/cfn_monitor.rb', line 780

def to_jsii
  result = {}
  result.merge!({
    "availabilityLocalHealthEventsConfig" => @availability_local_health_events_config,
    "availabilityScoreThreshold" => @availability_score_threshold,
    "performanceLocalHealthEventsConfig" => @performance_local_health_events_config,
    "performanceScoreThreshold" => @performance_score_threshold,
  })
  result.compact
end