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