Class: AWSCDK::Autoscaling::HealthCheck Deprecated

Inherits:
Jsii::Object
  • Object
show all
Defined in:
autoscaling/health_check.rb

Overview

Deprecated.

Use HealthChecks instead

Health check settings.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ HealthCheck

Returns a new instance of HealthCheck.

Raises:

  • (NoMethodError)


10
11
12
# File 'autoscaling/health_check.rb', line 10

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.aws_autoscaling.HealthCheck does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.ec2(options = nil) ⇒ AWSCDK::Autoscaling::HealthCheck

Use EC2 for health checks.

Parameters:

Returns:

  • (AWSCDK::Autoscaling::HealthCheck)


25
26
27
28
29
# File 'autoscaling/health_check.rb', line 25

def self.ec2(options = nil)
  options = options.is_a?(Hash) ? ::AWSCDK::Autoscaling::EC2HealthCheckOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuRWMySGVhbHRoQ2hlY2tPcHRpb25zIn0=")), "options") unless options.nil?
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_autoscaling.HealthCheck", "ec2", [options])
end

.elb(options) ⇒ AWSCDK::Autoscaling::HealthCheck

Use ELB for health checks.

It considers the instance unhealthy if it fails either the EC2 status checks or the load balancer health checks.

Parameters:

Returns:

  • (AWSCDK::Autoscaling::HealthCheck)


37
38
39
40
41
# File 'autoscaling/health_check.rb', line 37

def self.elb(options)
  options = options.is_a?(Hash) ? ::AWSCDK::Autoscaling::ELBHealthCheckOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuRWxiSGVhbHRoQ2hlY2tPcHRpb25zIn0=")), "options")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_autoscaling.HealthCheck", "elb", [options])
end

.jsii_overridable_methodsObject



14
15
16
17
18
19
# File 'autoscaling/health_check.rb', line 14

def self.jsii_overridable_methods
  {
    :type => { kind: :property, name: "type", is_optional: false },
    :grace_period => { kind: :property, name: "gracePeriod", is_optional: true },
  }
end

Instance Method Details

#grace_periodAWSCDK::Duration?

Returns:



49
50
51
# File 'autoscaling/health_check.rb', line 49

def grace_period()
  jsii_get_property("gracePeriod")
end

#typeString

Returns:

  • (String)


44
45
46
# File 'autoscaling/health_check.rb', line 44

def type()
  jsii_get_property("type")
end