Class CfnEC2FleetPropsMixin.PlacementProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.ec2.CfnEC2FleetPropsMixin.PlacementProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnEC2FleetPropsMixin.PlacementProperty>
- Enclosing interface:
CfnEC2FleetPropsMixin.PlacementProperty
@Stability(Stable)
public static final class CfnEC2FleetPropsMixin.PlacementProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnEC2FleetPropsMixin.PlacementProperty>
A builder for
CfnEC2FleetPropsMixin.PlacementProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getAffinity()availabilityZone(String availabilityZone) Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getAvailabilityZone()build()Builds the configured instance.Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getGroupName()Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getHostId()hostResourceGroupArn(String hostResourceGroupArn) Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getHostResourceGroupArn()partitionNumber(Number partitionNumber) Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getPartitionNumber()spreadDomain(String spreadDomain) Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getSpreadDomain()Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getTenancy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
affinity
Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getAffinity()- Parameters:
affinity- The affinity setting for the instance on the Dedicated Host. This parameter is not supported for CreateFleet or ImportInstance .- Returns:
this
-
availabilityZone
@Stability(Stable) public CfnEC2FleetPropsMixin.PlacementProperty.Builder availabilityZone(String availabilityZone) Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getAvailabilityZone()- Parameters:
availabilityZone- The Availability Zone of the instance. On input, you can specifyAvailabilityZoneorAvailabilityZoneId, but not both. If you specify neither one, Amazon EC2 automatically selects an Availability Zone for you.This parameter is not supported for CreateFleet .
- Returns:
this
-
groupName
@Stability(Stable) public CfnEC2FleetPropsMixin.PlacementProperty.Builder groupName(String groupName) Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getGroupName()- Parameters:
groupName- The name of the placement group that the instance is in. On input, you can specifyGroupIdorGroupName, but not both.- Returns:
this
-
hostId
Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getHostId()- Parameters:
hostId- The ID of the Dedicated Host on which the instance resides. This parameter is not supported for CreateFleet or ImportInstance .- Returns:
this
-
hostResourceGroupArn
@Stability(Stable) public CfnEC2FleetPropsMixin.PlacementProperty.Builder hostResourceGroupArn(String hostResourceGroupArn) Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getHostResourceGroupArn()- Parameters:
hostResourceGroupArn- The ARN of the host resource group in which to launch the instances. On input, if you specify this parameter, either omit the Tenancy parameter or set it tohost.This parameter is not supported for CreateFleet .
- Returns:
this
-
partitionNumber
@Stability(Stable) public CfnEC2FleetPropsMixin.PlacementProperty.Builder partitionNumber(Number partitionNumber) Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getPartitionNumber()- Parameters:
partitionNumber- The number of the partition that the instance is in. Valid only if the placement group strategy is set topartition.This parameter is not supported for CreateFleet .
- Returns:
this
-
spreadDomain
@Stability(Stable) public CfnEC2FleetPropsMixin.PlacementProperty.Builder spreadDomain(String spreadDomain) Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getSpreadDomain()- Parameters:
spreadDomain- Reserved for future use.- Returns:
this
-
tenancy
Sets the value ofCfnEC2FleetPropsMixin.PlacementProperty.getTenancy()- Parameters:
tenancy- The tenancy of the instance. An instance with a tenancy ofdedicatedruns on single-tenant hardware. This parameter is not supported for CreateFleet . Thehosttenancy is not supported for ImportInstance or for T3 instances that are configured for theunlimitedCPU credit option.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnEC2FleetPropsMixin.PlacementProperty>- Returns:
- a new instance of
CfnEC2FleetPropsMixin.PlacementProperty - Throws:
NullPointerException- if any required attribute was not provided
-