Class CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSpotFleet.SpotFleetLaunchSpecificationProperty>
- Enclosing interface:
CfnSpotFleet.SpotFleetLaunchSpecificationProperty
CfnSpotFleet.SpotFleetLaunchSpecificationProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionblockDeviceMappings
(List<? extends Object> blockDeviceMappings) blockDeviceMappings
(IResolvable blockDeviceMappings) build()
Builds the configured instance.ebsOptimized
(Boolean ebsOptimized) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getEbsOptimized()
ebsOptimized
(IResolvable ebsOptimized) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getEbsOptimized()
iamInstanceProfile
(IResolvable iamInstanceProfile) iamInstanceProfile
(CfnSpotFleet.IamInstanceProfileSpecificationProperty iamInstanceProfile) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getImageId()
instanceRequirements
(IResolvable instanceRequirements) instanceRequirements
(CfnSpotFleet.InstanceRequirementsRequestProperty instanceRequirements) instanceType
(String instanceType) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getInstanceType()
Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getKernelId()
Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getKeyName()
monitoring
(IResolvable monitoring) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getMonitoring()
monitoring
(CfnSpotFleet.SpotFleetMonitoringProperty monitoring) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getMonitoring()
networkInterfaces
(List<? extends Object> networkInterfaces) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getNetworkInterfaces()
networkInterfaces
(IResolvable networkInterfaces) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getNetworkInterfaces()
placement
(IResolvable placement) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getPlacement()
placement
(CfnSpotFleet.SpotPlacementProperty placement) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getPlacement()
Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getRamdiskId()
securityGroups
(List<? extends Object> securityGroups) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getSecurityGroups()
securityGroups
(IResolvable securityGroups) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getSecurityGroups()
Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getSpotPrice()
Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getSubnetId()
tagSpecifications
(List<? extends Object> tagSpecifications) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getTagSpecifications()
tagSpecifications
(IResolvable tagSpecifications) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getTagSpecifications()
Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getUserData()
weightedCapacity
(Number weightedCapacity) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getWeightedCapacity()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
imageId
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder imageId(String imageId) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getImageId()
- Parameters:
imageId
- The ID of the AMI. This parameter is required.- Returns:
this
-
blockDeviceMappings
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder blockDeviceMappings(IResolvable blockDeviceMappings) - Parameters:
blockDeviceMappings
- One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.- Returns:
this
-
blockDeviceMappings
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder blockDeviceMappings(List<? extends Object> blockDeviceMappings) - Parameters:
blockDeviceMappings
- One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.- Returns:
this
-
ebsOptimized
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder ebsOptimized(Boolean ebsOptimized) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getEbsOptimized()
- Parameters:
ebsOptimized
- Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.Default:
false
- Returns:
this
-
ebsOptimized
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder ebsOptimized(IResolvable ebsOptimized) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getEbsOptimized()
- Parameters:
ebsOptimized
- Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.Default:
false
- Returns:
this
-
iamInstanceProfile
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder iamInstanceProfile(IResolvable iamInstanceProfile) - Parameters:
iamInstanceProfile
- The IAM instance profile.- Returns:
this
-
iamInstanceProfile
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder iamInstanceProfile(CfnSpotFleet.IamInstanceProfileSpecificationProperty iamInstanceProfile) - Parameters:
iamInstanceProfile
- The IAM instance profile.- Returns:
this
-
instanceRequirements
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder instanceRequirements(IResolvable instanceRequirements) - Parameters:
instanceRequirements
- The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.If you specify
InstanceRequirements
, you can't specifyInstanceType
.- Returns:
this
-
instanceRequirements
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder instanceRequirements(CfnSpotFleet.InstanceRequirementsRequestProperty instanceRequirements) - Parameters:
instanceRequirements
- The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.If you specify
InstanceRequirements
, you can't specifyInstanceType
.- Returns:
this
-
instanceType
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder instanceType(String instanceType) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getInstanceType()
- Parameters:
instanceType
- The instance type.- Returns:
this
-
kernelId
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder kernelId(String kernelId) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getKernelId()
- Parameters:
kernelId
- The ID of the kernel.- Returns:
this
-
keyName
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder keyName(String keyName) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getKeyName()
- Parameters:
keyName
- The name of the key pair.- Returns:
this
-
monitoring
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder monitoring(IResolvable monitoring) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getMonitoring()
- Parameters:
monitoring
- Enable or disable monitoring for the instances.- Returns:
this
-
monitoring
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder monitoring(CfnSpotFleet.SpotFleetMonitoringProperty monitoring) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getMonitoring()
- Parameters:
monitoring
- Enable or disable monitoring for the instances.- Returns:
this
-
networkInterfaces
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder networkInterfaces(IResolvable networkInterfaces) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getNetworkInterfaces()
- Parameters:
networkInterfaces
- One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.SpotFleetLaunchSpecification
currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use LaunchTemplateConfig .- Returns:
this
-
networkInterfaces
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder networkInterfaces(List<? extends Object> networkInterfaces) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getNetworkInterfaces()
- Parameters:
networkInterfaces
- One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.SpotFleetLaunchSpecification
currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use LaunchTemplateConfig .- Returns:
this
-
placement
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder placement(IResolvable placement) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getPlacement()
- Parameters:
placement
- The placement information.- Returns:
this
-
placement
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder placement(CfnSpotFleet.SpotPlacementProperty placement) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getPlacement()
- Parameters:
placement
- The placement information.- Returns:
this
-
ramdiskId
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder ramdiskId(String ramdiskId) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getRamdiskId()
- Parameters:
ramdiskId
- The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the AWS Resource Center and search for the kernel ID.- Returns:
this
-
securityGroups
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder securityGroups(IResolvable securityGroups) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getSecurityGroups()
- Parameters:
securityGroups
- The security groups.- Returns:
this
-
securityGroups
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder securityGroups(List<? extends Object> securityGroups) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getSecurityGroups()
- Parameters:
securityGroups
- The security groups.- Returns:
this
-
spotPrice
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder spotPrice(String spotPrice) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getSpotPrice()
- Parameters:
spotPrice
- The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
- Returns:
this
-
subnetId
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder subnetId(String subnetId) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getSubnetId()
- Parameters:
subnetId
- The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".- Returns:
this
-
tagSpecifications
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder tagSpecifications(IResolvable tagSpecifications) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getTagSpecifications()
- Parameters:
tagSpecifications
- The tags to apply during creation.- Returns:
this
-
tagSpecifications
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder tagSpecifications(List<? extends Object> tagSpecifications) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getTagSpecifications()
- Parameters:
tagSpecifications
- The tags to apply during creation.- Returns:
this
-
userData
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder userData(String userData) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getUserData()
- Parameters:
userData
- The base64-encoded user data that instances use when starting up. User data is limited to 16 KB.- Returns:
this
-
weightedCapacity
@Stability(Stable) public CfnSpotFleet.SpotFleetLaunchSpecificationProperty.Builder weightedCapacity(Number weightedCapacity) Sets the value ofCfnSpotFleet.SpotFleetLaunchSpecificationProperty.getWeightedCapacity()
- Parameters:
weightedCapacity
- The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnSpotFleet.SpotFleetLaunchSpecificationProperty>
- Returns:
- a new instance of
CfnSpotFleet.SpotFleetLaunchSpecificationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-