Class: AWSCDK::VPCLattice::CfnTargetGroup::HealthCheckConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
vpc_lattice/cfn_target_group.rb

Overview

Describes the health check configuration of a target group.

Health check configurations aren't used for target groups of type LAMBDA or ALB .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled: nil, health_check_interval_seconds: nil, health_check_timeout_seconds: nil, healthy_threshold_count: nil, matcher: nil, path: nil, port: nil, protocol: nil, protocol_version: nil, unhealthy_threshold_count: nil) ⇒ HealthCheckConfigProperty

Returns a new instance of HealthCheckConfigProperty.

Parameters:

  • enabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates whether health checking is enabled.

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

    The approximate amount of time, in seconds, between health checks of an individual target.

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

    The amount of time, in seconds, to wait before reporting a target as unhealthy.

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

    The number of consecutive successful health checks required before considering an unhealthy target healthy.

  • matcher (AWSCDK::IResolvable, AWSCDK::VPCLattice::CfnTargetGroup::MatcherProperty, nil) (defaults to: nil)

    The codes to use when checking for a successful response from a target.

  • path (String, nil) (defaults to: nil)

    The destination for health checks on the targets.

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

    The port used when performing health checks on targets.

  • protocol (String, nil) (defaults to: nil)

    The protocol used when performing health checks on targets.

  • protocol_version (String, nil) (defaults to: nil)

    The protocol version used when performing health checks on targets.

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

    The number of consecutive failed health checks required before considering a target unhealthy.



619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
# File 'vpc_lattice/cfn_target_group.rb', line 619

def initialize(enabled: nil, health_check_interval_seconds: nil, health_check_timeout_seconds: nil, healthy_threshold_count: nil, matcher: nil, path: nil, port: nil, protocol: nil, protocol_version: nil, unhealthy_threshold_count: nil)
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") unless @enabled.nil?
  @health_check_interval_seconds = health_check_interval_seconds
  Jsii::Type.check_type(@health_check_interval_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthCheckIntervalSeconds") unless @health_check_interval_seconds.nil?
  @health_check_timeout_seconds = health_check_timeout_seconds
  Jsii::Type.check_type(@health_check_timeout_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthCheckTimeoutSeconds") unless @health_check_timeout_seconds.nil?
  @healthy_threshold_count = healthy_threshold_count
  Jsii::Type.check_type(@healthy_threshold_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthyThresholdCount") unless @healthy_threshold_count.nil?
  @matcher = matcher.is_a?(Hash) ? ::AWSCDK::VPCLattice::CfnTargetGroup::MatcherProperty.new(**matcher.transform_keys(&:to_sym)) : matcher
  Jsii::Type.check_type(@matcher, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c192cGNsYXR0aWNlLkNmblRhcmdldEdyb3VwLk1hdGNoZXJQcm9wZXJ0eSJ9XX19")), "matcher") unless @matcher.nil?
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil?
  @port = port
  Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil?
  @protocol = protocol
  Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocol") unless @protocol.nil?
  @protocol_version = protocol_version
  Jsii::Type.check_type(@protocol_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocolVersion") unless @protocol_version.nil?
  @unhealthy_threshold_count = unhealthy_threshold_count
  Jsii::Type.check_type(@unhealthy_threshold_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "unhealthyThresholdCount") unless @unhealthy_threshold_count.nil?
end

Instance Attribute Details

#enabledBoolean, ... (readonly)

Indicates whether health checking is enabled.



646
647
648
# File 'vpc_lattice/cfn_target_group.rb', line 646

def enabled
  @enabled
end

#health_check_interval_secondsNumeric? (readonly)

The approximate amount of time, in seconds, between health checks of an individual target.

The range is 5–300 seconds. The default is 30 seconds.



653
654
655
# File 'vpc_lattice/cfn_target_group.rb', line 653

def health_check_interval_seconds
  @health_check_interval_seconds
end

#health_check_timeout_secondsNumeric? (readonly)

The amount of time, in seconds, to wait before reporting a target as unhealthy.

The range is 1–120 seconds. The default is 5 seconds.



660
661
662
# File 'vpc_lattice/cfn_target_group.rb', line 660

def health_check_timeout_seconds
  @health_check_timeout_seconds
end

#healthy_threshold_countNumeric? (readonly)

The number of consecutive successful health checks required before considering an unhealthy target healthy.

The range is 2–10. The default is 5.



667
668
669
# File 'vpc_lattice/cfn_target_group.rb', line 667

def healthy_threshold_count
  @healthy_threshold_count
end

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

The codes to use when checking for a successful response from a target.



672
673
674
# File 'vpc_lattice/cfn_target_group.rb', line 672

def matcher
  @matcher
end

#pathString? (readonly)

The destination for health checks on the targets.

If the protocol version is HTTP/1.1 or HTTP/2 , specify a valid URI (for example, /path?query ). The default path is / . Health checks are not supported if the protocol version is g_rpc , however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.



679
680
681
# File 'vpc_lattice/cfn_target_group.rb', line 679

def path
  @path
end

#portNumeric? (readonly)

The port used when performing health checks on targets.

The default setting is the port that a target receives traffic on.



686
687
688
# File 'vpc_lattice/cfn_target_group.rb', line 686

def port
  @port
end

#protocolString? (readonly)

The protocol used when performing health checks on targets.

The possible protocols are HTTP and HTTPS . The default is HTTP .



693
694
695
# File 'vpc_lattice/cfn_target_group.rb', line 693

def protocol
  @protocol
end

#protocol_versionString? (readonly)

The protocol version used when performing health checks on targets.

The possible protocol versions are HTTP1 and HTTP2 .



700
701
702
# File 'vpc_lattice/cfn_target_group.rb', line 700

def protocol_version
  @protocol_version
end

#unhealthy_threshold_countNumeric? (readonly)

The number of consecutive failed health checks required before considering a target unhealthy.

The range is 2–10. The default is 2.



707
708
709
# File 'vpc_lattice/cfn_target_group.rb', line 707

def unhealthy_threshold_count
  @unhealthy_threshold_count
end

Class Method Details

.jsii_propertiesObject



709
710
711
712
713
714
715
716
717
718
719
720
721
722
# File 'vpc_lattice/cfn_target_group.rb', line 709

def self.jsii_properties
  {
    :enabled => "enabled",
    :health_check_interval_seconds => "healthCheckIntervalSeconds",
    :health_check_timeout_seconds => "healthCheckTimeoutSeconds",
    :healthy_threshold_count => "healthyThresholdCount",
    :matcher => "matcher",
    :path => "path",
    :port => "port",
    :protocol => "protocol",
    :protocol_version => "protocolVersion",
    :unhealthy_threshold_count => "unhealthyThresholdCount",
  }
end

Instance Method Details

#to_jsiiObject



724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
# File 'vpc_lattice/cfn_target_group.rb', line 724

def to_jsii
  result = {}
  result.merge!({
    "enabled" => @enabled,
    "healthCheckIntervalSeconds" => @health_check_interval_seconds,
    "healthCheckTimeoutSeconds" => @health_check_timeout_seconds,
    "healthyThresholdCount" => @healthy_threshold_count,
    "matcher" => @matcher,
    "path" => @path,
    "port" => @port,
    "protocol" => @protocol,
    "protocolVersion" => @protocol_version,
    "unhealthyThresholdCount" => @unhealthy_threshold_count,
  })
  result.compact
end