Class: AWSCDK::ServiceDiscovery::HealthCheckConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
service_discovery/health_check_config.rb

Overview

Settings for an optional Amazon Route 53 health check.

If you specify settings for a health check, AWS Cloud Map associates the health check with all the records that you specify in DnsConfig. Only valid with a PublicDnsNamespace.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(failure_threshold: nil, resource_path: nil, type: nil) ⇒ HealthCheckConfig

Returns a new instance of HealthCheckConfig.

Parameters:

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

    The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa.

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

    The path that you want Route 53 to request when performing health checks.

  • type (AWSCDK::ServiceDiscovery::HealthCheckType, nil) (defaults to: nil)

    The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy.



13
14
15
16
17
18
19
20
# File 'service_discovery/health_check_config.rb', line 13

def initialize(failure_threshold: nil, resource_path: nil, type: nil)
  @failure_threshold = failure_threshold
  Jsii::Type.check_type(@failure_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "failureThreshold") unless @failure_threshold.nil?
  @resource_path = resource_path
  Jsii::Type.check_type(@resource_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourcePath") unless @resource_path.nil?
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWRpc2NvdmVyeS5IZWFsdGhDaGVja1R5cGUifQ==")), "type") unless @type.nil?
end

Instance Attribute Details

#failure_thresholdNumeric? (readonly)

Note:

Default: 1

The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa.

Returns:

  • (Numeric, nil)


26
27
28
# File 'service_discovery/health_check_config.rb', line 26

def failure_threshold
  @failure_threshold
end

#resource_pathString? (readonly)

Note:

Default: '/'

The path that you want Route 53 to request when performing health checks.

Do not use when health check type is TCP.

Returns:

  • (String, nil)


33
34
35
# File 'service_discovery/health_check_config.rb', line 33

def resource_path
  @resource_path
end

#typeAWSCDK::ServiceDiscovery::HealthCheckType? (readonly)

Note:

Default: HTTP

The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy.

Cannot be modified once created. Supported values are HTTP, HTTPS, and TCP.



40
41
42
# File 'service_discovery/health_check_config.rb', line 40

def type
  @type
end

Class Method Details

.jsii_propertiesObject



42
43
44
45
46
47
48
# File 'service_discovery/health_check_config.rb', line 42

def self.jsii_properties
  {
    :failure_threshold => "failureThreshold",
    :resource_path => "resourcePath",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



50
51
52
53
54
55
56
57
58
# File 'service_discovery/health_check_config.rb', line 50

def to_jsii
  result = {}
  result.merge!({
    "failureThreshold" => @failure_threshold,
    "resourcePath" => @resource_path,
    "type" => @type,
  })
  result.compact
end