Class: AWSCDK::Autoscaling::HealthChecks

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

Overview

Health check settings for multiple types.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ HealthChecks

Returns a new instance of HealthChecks.

Raises:

  • (NoMethodError)


8
9
10
# File 'autoscaling/health_checks.rb', line 8

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

Class Method Details

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

Use EC2 only for health checks.

Parameters:

Returns:

  • (AWSCDK::Autoscaling::HealthChecks)


23
24
25
26
27
# File 'autoscaling/health_checks.rb', line 23

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

.jsii_overridable_methodsObject



12
13
14
15
16
17
# File 'autoscaling/health_checks.rb', line 12

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

.with_additional_checks(options) ⇒ AWSCDK::Autoscaling::HealthChecks

Use additional health checks other than EC2.

Specify types other than EC2, as EC2 is always enabled. It considers the instance unhealthy if it fails either the EC2 status checks or the additional health checks.

Parameters:

Returns:

  • (AWSCDK::Autoscaling::HealthChecks)


36
37
38
39
40
# File 'autoscaling/health_checks.rb', line 36

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

Instance Method Details

#grace_periodAWSCDK::Duration?

Returns:



48
49
50
# File 'autoscaling/health_checks.rb', line 48

def grace_period()
  jsii_get_property("gracePeriod")
end

#typesArray<String>

Returns:

  • (Array<String>)


43
44
45
# File 'autoscaling/health_checks.rb', line 43

def types()
  jsii_get_property("types")
end