Class CfnHostProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnHostProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnHostProps>
- Enclosing interface:
CfnHostProps
@Stability(Stable)
public static final class CfnHostProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnHostProps>
A builder for
CfnHostProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnHostProps.getAssetId()
autoPlacement
(String autoPlacement) Sets the value ofCfnHostProps.getAutoPlacement()
availabilityZone
(String availabilityZone) Sets the value ofCfnHostProps.getAvailabilityZone()
build()
Builds the configured instance.hostMaintenance
(String hostMaintenance) Sets the value ofCfnHostProps.getHostMaintenance()
hostRecovery
(String hostRecovery) Sets the value ofCfnHostProps.getHostRecovery()
instanceFamily
(String instanceFamily) Sets the value ofCfnHostProps.getInstanceFamily()
instanceType
(String instanceType) Sets the value ofCfnHostProps.getInstanceType()
outpostArn
(String outpostArn) Sets the value ofCfnHostProps.getOutpostArn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
availabilityZone
Sets the value ofCfnHostProps.getAvailabilityZone()
- Parameters:
availabilityZone
- The Availability Zone in which to allocate the Dedicated Host. This parameter is required.- Returns:
this
-
assetId
Sets the value ofCfnHostProps.getAssetId()
- Parameters:
assetId
- The ID of the Outpost hardware asset on which the Dedicated Host is allocated.- Returns:
this
-
autoPlacement
Sets the value ofCfnHostProps.getAutoPlacement()
- Parameters:
autoPlacement
- Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide .Default:
off
- Returns:
this
-
hostMaintenance
Sets the value ofCfnHostProps.getHostMaintenance()
- Parameters:
hostMaintenance
- Indicates whether host maintenance is enabled or disabled for the Dedicated Host.- Returns:
this
-
hostRecovery
Sets the value ofCfnHostProps.getHostRecovery()
- Parameters:
hostRecovery
- Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by default. For more information, see Host recovery in the Amazon EC2 User Guide .Default:
off
- Returns:
this
-
instanceFamily
Sets the value ofCfnHostProps.getInstanceFamily()
- Parameters:
instanceFamily
- The instance family supported by the Dedicated Host. For example,m5
.- Returns:
this
-
instanceType
Sets the value ofCfnHostProps.getInstanceType()
- Parameters:
instanceType
- Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.- Returns:
this
-
outpostArn
Sets the value ofCfnHostProps.getOutpostArn()
- Parameters:
outpostArn
- The Amazon Resource Name (ARN) of the AWS Outpost on which the Dedicated Host is allocated.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnHostProps>
- Returns:
- a new instance of
CfnHostProps
- Throws:
NullPointerException
- if any required attribute was not provided
-