Class: AWSCDK::ServiceDiscovery::HealthCheckConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ServiceDiscovery::HealthCheckConfig
- 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
-
#failure_threshold ⇒ Numeric?
readonly
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?
readonly
The path that you want Route 53 to request when performing health checks.
-
#type ⇒ AWSCDK::ServiceDiscovery::HealthCheckType?
readonly
The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(failure_threshold: nil, resource_path: nil, type: nil) ⇒ HealthCheckConfig
constructor
A new instance of HealthCheckConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(failure_threshold: nil, resource_path: nil, type: nil) ⇒ HealthCheckConfig
Returns a new instance of HealthCheckConfig.
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_threshold ⇒ Numeric? (readonly)
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.
26 27 28 |
# File 'service_discovery/health_check_config.rb', line 26 def failure_threshold @failure_threshold end |
#resource_path ⇒ String? (readonly)
Default: '/'
The path that you want Route 53 to request when performing health checks.
Do not use when health check type is TCP.
33 34 35 |
# File 'service_discovery/health_check_config.rb', line 33 def resource_path @resource_path end |
#type ⇒ AWSCDK::ServiceDiscovery::HealthCheckType? (readonly)
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_properties ⇒ Object
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_jsii ⇒ Object
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 |