Class CfnInstance.HibernationOptionsProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnInstance.HibernationOptionsProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstance.HibernationOptionsProperty>
- Enclosing interface:
CfnInstance.HibernationOptionsProperty
@Stability(Stable)
public static final class CfnInstance.HibernationOptionsProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstance.HibernationOptionsProperty>
A builder for
CfnInstance.HibernationOptionsProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.configured
(Boolean configured) Sets the value ofCfnInstance.HibernationOptionsProperty.getConfigured()
configured
(IResolvable configured) Sets the value ofCfnInstance.HibernationOptionsProperty.getConfigured()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
configured
@Stability(Stable) public CfnInstance.HibernationOptionsProperty.Builder configured(Boolean configured) Sets the value ofCfnInstance.HibernationOptionsProperty.getConfigured()
- Parameters:
configured
- Set totrue
to enable your instance for hibernation. For Spot Instances, if you setConfigured
totrue
, either omit theInstanceInterruptionBehavior
parameter (forSpotMarketOptions
), or set it tohibernate
. WhenConfigured
is true:- If you omit
InstanceInterruptionBehavior
, it defaults tohibernate
. - If you set
InstanceInterruptionBehavior
to a value other thanhibernate
, you'll get an error.
Default:
false
- If you omit
- Returns:
this
-
configured
@Stability(Stable) public CfnInstance.HibernationOptionsProperty.Builder configured(IResolvable configured) Sets the value ofCfnInstance.HibernationOptionsProperty.getConfigured()
- Parameters:
configured
- Set totrue
to enable your instance for hibernation. For Spot Instances, if you setConfigured
totrue
, either omit theInstanceInterruptionBehavior
parameter (forSpotMarketOptions
), or set it tohibernate
. WhenConfigured
is true:- If you omit
InstanceInterruptionBehavior
, it defaults tohibernate
. - If you set
InstanceInterruptionBehavior
to a value other thanhibernate
, you'll get an error.
Default:
false
- If you omit
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnInstance.HibernationOptionsProperty>
- Returns:
- a new instance of
CfnInstance.HibernationOptionsProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-