Class CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty>
- Enclosing interface:
CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavailabilityZone(String availabilityZone) availabilityZoneId(String availabilityZoneId) blockDeviceMappings(List<? extends Object> blockDeviceMappings) blockDeviceMappings(IResolvable blockDeviceMappings) build()Builds the configured instance.instanceRequirements(CfnEC2FleetPropsMixin.InstanceRequirementsRequestProperty instanceRequirements) instanceRequirements(IResolvable instanceRequirements) instanceType(String instanceType) placement(CfnEC2FleetPropsMixin.PlacementProperty placement) placement(IResolvable placement) weightedCapacity(Number weightedCapacity)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
availabilityZone
@Stability(Stable) public CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder availabilityZone(String availabilityZone) Sets the value ofCfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.getAvailabilityZone()- Parameters:
availabilityZone- The Availability Zone in which to launch the instances. For example,us-east-2a. EitherAvailabilityZoneorAvailabilityZoneIdmust be specified in the request, but not both.- Returns:
this
-
availabilityZoneId
@Stability(Stable) public CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder availabilityZoneId(String availabilityZoneId) Sets the value ofCfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.getAvailabilityZoneId()- Parameters:
availabilityZoneId- The ID of the Availability Zone in which to launch the instances. For example,use2-az1. EitherAvailabilityZoneorAvailabilityZoneIdmust be specified in the request, but not both.- Returns:
this
-
blockDeviceMappings
@Stability(Stable) public CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder blockDeviceMappings(IResolvable blockDeviceMappings) Sets the value ofCfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.getBlockDeviceMappings()- Parameters:
blockDeviceMappings- The block device mappings, which define the EBS volumes and instance store volumes to attach to the instance at launch. Supported only for fleets of typeinstant.For more information, see Block device mappings for volumes on Amazon EC2 instances in the Amazon EC2 User Guide .
- Returns:
this
-
blockDeviceMappings
@Stability(Stable) public CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder blockDeviceMappings(List<? extends Object> blockDeviceMappings) Sets the value ofCfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.getBlockDeviceMappings()- Parameters:
blockDeviceMappings- The block device mappings, which define the EBS volumes and instance store volumes to attach to the instance at launch. Supported only for fleets of typeinstant.For more information, see Block device mappings for volumes on Amazon EC2 instances in the Amazon EC2 User Guide .
- Returns:
this
-
instanceRequirements
@Stability(Stable) public CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder instanceRequirements(IResolvable instanceRequirements) Sets the value ofCfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.getInstanceRequirements()- 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 CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder instanceRequirements(CfnEC2FleetPropsMixin.InstanceRequirementsRequestProperty instanceRequirements) Sets the value ofCfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.getInstanceRequirements()- 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 CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder instanceType(String instanceType) Sets the value ofCfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.getInstanceType()- Parameters:
instanceType- The instance type.mac1.metalis not supported as a launch template override.If you specify
InstanceType, you can't specifyInstanceRequirements.- Returns:
this
-
maxPrice
@Stability(Stable) public CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder maxPrice(String maxPrice) - Parameters:
maxPrice- 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.
If you specify a maximum price, it must be more than USD $0.001. Specifying a value below USD $0.001 will result in an
InvalidParameterValueerror message.- Returns:
this
-
placement
@Stability(Stable) public CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder placement(IResolvable placement) - Parameters:
placement- The location where the instance launched, if applicable.- Returns:
this
-
placement
@Stability(Stable) public CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder placement(CfnEC2FleetPropsMixin.PlacementProperty placement) - Parameters:
placement- The location where the instance launched, if applicable.- Returns:
this
-
priority
@Stability(Stable) public CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder priority(Number priority) - Parameters:
priority- The priority for the launch template override. The highest priority is launched first. If the On-DemandAllocationStrategyis set toprioritized, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.If the Spot
AllocationStrategyis set tocapacity-optimized-prioritized, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.Valid values are whole numbers starting at
0. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.- Returns:
this
-
subnetId
@Stability(Stable) public CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder subnetId(String subnetId) - Parameters:
subnetId- The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example,subnet-1234abcdeexample1, subnet-0987cdef6example2). A request of typeinstantcan have only one subnet ID.- Returns:
this
-
weightedCapacity
@Stability(Stable) public CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.Builder weightedCapacity(Number weightedCapacity) Sets the value ofCfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty.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.
When specifying weights, the price used in the
lowest-priceandprice-capacity-optimizedallocation strategies is per unit hour (where the instance price is divided by the specified weight). However, if all the specified weights are above the requestedTargetCapacity, resulting in only 1 instance being launched, the price used is per instance hour.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty>- Returns:
- a new instance of
CfnEC2FleetPropsMixin.FleetLaunchTemplateOverridesRequestProperty - Throws:
NullPointerException- if any required attribute was not provided
-