Class: AWSCDK::Autoscaling::EC2HealthChecksOptions

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

Overview

EC2 Heath checks options.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(grace_period: nil) ⇒ EC2HealthChecksOptions

Returns a new instance of EC2HealthChecksOptions.

Parameters:

  • grace_period (AWSCDK::Duration, nil) (defaults to: nil)

    Specified the time Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check.



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

def initialize(grace_period: nil)
  @grace_period = grace_period
  Jsii::Type.check_type(@grace_period, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "gracePeriod") unless @grace_period.nil?
end

Instance Attribute Details

#grace_periodAWSCDK::Duration? (readonly)

Note:

Default: Duration.seconds(0)

Specified the time Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check.



18
19
20
# File 'autoscaling/ec2_health_checks_options.rb', line 18

def grace_period
  @grace_period
end

Class Method Details

.jsii_propertiesObject



20
21
22
23
24
# File 'autoscaling/ec2_health_checks_options.rb', line 20

def self.jsii_properties
  {
    :grace_period => "gracePeriod",
  }
end

Instance Method Details

#to_jsiiObject



26
27
28
29
30
31
32
# File 'autoscaling/ec2_health_checks_options.rb', line 26

def to_jsii
  result = {}
  result.merge!({
    "gracePeriod" => @grace_period,
  })
  result.compact
end