Class: AWSCDK::Autoscaling::HealthChecks
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Autoscaling::HealthChecks
- Defined in:
- autoscaling/health_checks.rb
Overview
Health check settings for multiple types.
Class Method Summary collapse
-
.ec2(options = nil) ⇒ AWSCDK::Autoscaling::HealthChecks
Use EC2 only for health checks.
- .jsii_overridable_methods ⇒ Object
-
.with_additional_checks(options) ⇒ AWSCDK::Autoscaling::HealthChecks
Use additional health checks other than EC2.
Instance Method Summary collapse
- #grace_period ⇒ AWSCDK::Duration?
-
#initialize(*args) ⇒ HealthChecks
constructor
A new instance of HealthChecks.
- #types ⇒ Array<String>
Constructor Details
#initialize(*args) ⇒ HealthChecks
Returns a new instance of HealthChecks.
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.
23 24 25 26 27 |
# File 'autoscaling/health_checks.rb', line 23 def self.ec2( = nil) = .is_a?(Hash) ? ::AWSCDK::Autoscaling::EC2HealthChecksOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuRWMySGVhbHRoQ2hlY2tzT3B0aW9ucyJ9")), "options") unless .nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_autoscaling.HealthChecks", "ec2", []) end |
.jsii_overridable_methods ⇒ Object
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.
36 37 38 39 40 |
# File 'autoscaling/health_checks.rb', line 36 def self.with_additional_checks() = .is_a?(Hash) ? ::AWSCDK::Autoscaling::AdditionalHealthChecksOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQWRkaXRpb25hbEhlYWx0aENoZWNrc09wdGlvbnMifQ==")), "options") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_autoscaling.HealthChecks", "withAdditionalChecks", []) end |
Instance Method Details
#grace_period ⇒ AWSCDK::Duration?
48 49 50 |
# File 'autoscaling/health_checks.rb', line 48 def grace_period() jsii_get_property("gracePeriod") end |
#types ⇒ Array<String>
43 44 45 |
# File 'autoscaling/health_checks.rb', line 43 def types() jsii_get_property("types") end |