Class CfnInstance.StateProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnInstance.StateProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstance.StateProperty>
- Enclosing interface:
CfnInstance.StateProperty
@Stability(Stable)
public static final class CfnInstance.StateProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstance.StateProperty>
A builder for
CfnInstance.StateProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnInstance.StateProperty.getCode()
Sets the value ofCfnInstance.StateProperty.getName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
code
Sets the value ofCfnInstance.StateProperty.getCode()
- Parameters:
code
- The state of the instance as a 16-bit unsigned integer. The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.
The valid values for instance-state-code will all be in the range of the low byte and they are:
0
:pending
16
:running
32
:shutting-down
48
:terminated
64
:stopping
80
:stopped
You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.
- Returns:
this
-
name
Sets the value ofCfnInstance.StateProperty.getName()
- Parameters:
name
- The current state of the instance.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnInstance.StateProperty>
- Returns:
- a new instance of
CfnInstance.StateProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-