Class: AWSCDK::AppRunner::CfnService::HealthCheckConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_runner/cfn_service.rb

Overview

Describes the settings for the health check that AWS App Runner performs to monitor the health of a service.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(healthy_threshold: nil, interval: nil, path: nil, protocol: nil, timeout: nil, unhealthy_threshold: nil) ⇒ HealthCheckConfigurationProperty

Returns a new instance of HealthCheckConfigurationProperty.

Parameters:

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

    The number of consecutive checks that must succeed before App Runner decides that the service is healthy.

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

    The time interval, in seconds, between health checks.

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

    The URL that health check requests are sent to.

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

    The IP protocol that App Runner uses to perform health checks for your service.

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

    The time, in seconds, to wait for a health check response before deciding it failed.

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

    The number of consecutive checks that must fail before App Runner decides that the service is unhealthy.



1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
# File 'app_runner/cfn_service.rb', line 1007

def initialize(healthy_threshold: nil, interval: nil, path: nil, protocol: nil, timeout: nil, unhealthy_threshold: nil)
  @healthy_threshold = healthy_threshold
  Jsii::Type.check_type(@healthy_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthyThreshold") unless @healthy_threshold.nil?
  @interval = interval
  Jsii::Type.check_type(@interval, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "interval") unless @interval.nil?
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil?
  @protocol = protocol
  Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocol") unless @protocol.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeout") unless @timeout.nil?
  @unhealthy_threshold = unhealthy_threshold
  Jsii::Type.check_type(@unhealthy_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "unhealthyThreshold") unless @unhealthy_threshold.nil?
end

Instance Attribute Details

#healthy_thresholdNumeric? (readonly)

The number of consecutive checks that must succeed before App Runner decides that the service is healthy.

Default: 1



1028
1029
1030
# File 'app_runner/cfn_service.rb', line 1028

def healthy_threshold
  @healthy_threshold
end

#intervalNumeric? (readonly)

The time interval, in seconds, between health checks.

Default: 5



1035
1036
1037
# File 'app_runner/cfn_service.rb', line 1035

def interval
  @interval
end

#pathString? (readonly)

The URL that health check requests are sent to.

Path is only applicable when you set Protocol to HTTP .

Default: "/"



1044
1045
1046
# File 'app_runner/cfn_service.rb', line 1044

def path
  @path
end

#protocolString? (readonly)

The IP protocol that App Runner uses to perform health checks for your service.

If you set Protocol to HTTP , App Runner sends health check requests to the HTTP path specified by Path .

Default: TCP



1053
1054
1055
# File 'app_runner/cfn_service.rb', line 1053

def protocol
  @protocol
end

#timeoutNumeric? (readonly)

The time, in seconds, to wait for a health check response before deciding it failed.

Default: 2



1060
1061
1062
# File 'app_runner/cfn_service.rb', line 1060

def timeout
  @timeout
end

#unhealthy_thresholdNumeric? (readonly)

The number of consecutive checks that must fail before App Runner decides that the service is unhealthy.

Default: 5



1067
1068
1069
# File 'app_runner/cfn_service.rb', line 1067

def unhealthy_threshold
  @unhealthy_threshold
end

Class Method Details

.jsii_propertiesObject



1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
# File 'app_runner/cfn_service.rb', line 1069

def self.jsii_properties
  {
    :healthy_threshold => "healthyThreshold",
    :interval => "interval",
    :path => "path",
    :protocol => "protocol",
    :timeout => "timeout",
    :unhealthy_threshold => "unhealthyThreshold",
  }
end

Instance Method Details

#to_jsiiObject



1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
# File 'app_runner/cfn_service.rb', line 1080

def to_jsii
  result = {}
  result.merge!({
    "healthyThreshold" => @healthy_threshold,
    "interval" => @interval,
    "path" => @path,
    "protocol" => @protocol,
    "timeout" => @timeout,
    "unhealthyThreshold" => @unhealthy_threshold,
  })
  result.compact
end