Class CfnLaunchTemplate.PlacementProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnLaunchTemplate.PlacementProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLaunchTemplate.PlacementProperty>
- Enclosing interface:
- CfnLaunchTemplate.PlacementProperty
@Stability(Stable)
public static final class CfnLaunchTemplate.PlacementProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLaunchTemplate.PlacementProperty>
A builder for
CfnLaunchTemplate.PlacementProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnLaunchTemplate.PlacementProperty.getAffinity()availabilityZone(String availabilityZone) Sets the value ofCfnLaunchTemplate.PlacementProperty.getAvailabilityZone()build()Builds the configured instance.Sets the value ofCfnLaunchTemplate.PlacementProperty.getGroupId()Sets the value ofCfnLaunchTemplate.PlacementProperty.getGroupName()Sets the value ofCfnLaunchTemplate.PlacementProperty.getHostId()hostResourceGroupArn(String hostResourceGroupArn) Sets the value ofCfnLaunchTemplate.PlacementProperty.getHostResourceGroupArn()partitionNumber(Number partitionNumber) Sets the value ofCfnLaunchTemplate.PlacementProperty.getPartitionNumber()spreadDomain(String spreadDomain) Sets the value ofCfnLaunchTemplate.PlacementProperty.getSpreadDomain()Sets the value ofCfnLaunchTemplate.PlacementProperty.getTenancy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
affinity
Sets the value ofCfnLaunchTemplate.PlacementProperty.getAffinity()- Parameters:
affinity- The affinity setting for an instance on a Dedicated Host.- Returns:
this
-
availabilityZone
@Stability(Stable) public CfnLaunchTemplate.PlacementProperty.Builder availabilityZone(String availabilityZone) Sets the value ofCfnLaunchTemplate.PlacementProperty.getAvailabilityZone()- Parameters:
availabilityZone- The Availability Zone for the instance.- Returns:
this
-
groupId
Sets the value ofCfnLaunchTemplate.PlacementProperty.getGroupId()- Parameters:
groupId- The Group Id of a placement group. You must specify the Placement Group Group Id to launch an instance in a shared placement group.- Returns:
this
-
groupName
Sets the value ofCfnLaunchTemplate.PlacementProperty.getGroupName()- Parameters:
groupName- The name of the placement group for the instance.- Returns:
this
-
hostId
Sets the value ofCfnLaunchTemplate.PlacementProperty.getHostId()- Parameters:
hostId- The ID of the Dedicated Host for the instance.- Returns:
this
-
hostResourceGroupArn
@Stability(Stable) public CfnLaunchTemplate.PlacementProperty.Builder hostResourceGroupArn(String hostResourceGroupArn) Sets the value ofCfnLaunchTemplate.PlacementProperty.getHostResourceGroupArn()- Parameters:
hostResourceGroupArn- The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it tohost.- Returns:
this
-
partitionNumber
@Stability(Stable) public CfnLaunchTemplate.PlacementProperty.Builder partitionNumber(Number partitionNumber) Sets the value ofCfnLaunchTemplate.PlacementProperty.getPartitionNumber()- Parameters:
partitionNumber- The number of the partition the instance should launch in. Valid only if the placement group strategy is set topartition.- Returns:
this
-
spreadDomain
@Stability(Stable) public CfnLaunchTemplate.PlacementProperty.Builder spreadDomain(String spreadDomain) Sets the value ofCfnLaunchTemplate.PlacementProperty.getSpreadDomain()- Parameters:
spreadDomain- Reserved for future use.- Returns:
this
-
tenancy
Sets the value ofCfnLaunchTemplate.PlacementProperty.getTenancy()- Parameters:
tenancy- The tenancy of the instance. An instance with a tenancy of dedicated runs on single-tenant hardware.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnLaunchTemplate.PlacementProperty>- Returns:
- a new instance of
CfnLaunchTemplate.PlacementProperty - Throws:
NullPointerException- if any required attribute was not provided
-