Class: AWSCDK::EC2::CfnInstance::HibernationOptionsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_instance.rb

Overview

Specifies the hibernation options for the instance.

HibernationOptions is a property of the AWS::EC2::Instance resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configured: nil) ⇒ HibernationOptionsProperty

Returns a new instance of HibernationOptionsProperty.

Parameters:

  • configured (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Set to true to enable your instance for hibernation.



1703
1704
1705
1706
# File 'ec2/cfn_instance.rb', line 1703

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

Instance Attribute Details

#configuredBoolean, ... (readonly)

Note:

Default: - false

Set to true to enable your instance for hibernation.

For Spot Instances, if you set Configured to true , either omit the InstanceInterruptionBehavior parameter (for SpotMarketOptions ), or set it to hibernate . When Configured is true:

  • If you omit InstanceInterruptionBehavior , it defaults to hibernate .
  • If you set InstanceInterruptionBehavior to a value other than hibernate , you'll get an error.

Default: false



1720
1721
1722
# File 'ec2/cfn_instance.rb', line 1720

def configured
  @configured
end

Class Method Details

.jsii_propertiesObject



1722
1723
1724
1725
1726
# File 'ec2/cfn_instance.rb', line 1722

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

Instance Method Details

#to_jsiiObject



1728
1729
1730
1731
1732
1733
1734
# File 'ec2/cfn_instance.rb', line 1728

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