Class CfnEC2FleetMixinProps.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.ec2.CfnEC2FleetMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnEC2FleetMixinProps>
- Enclosing interface:
CfnEC2FleetMixinProps
@Stability(Stable)
public static final class CfnEC2FleetMixinProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnEC2FleetMixinProps>
A builder for
CfnEC2FleetMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnEC2FleetMixinProps.getContext()excessCapacityTerminationPolicy(String excessCapacityTerminationPolicy) Sets the value ofCfnEC2FleetMixinProps.getExcessCapacityTerminationPolicy()launchTemplateConfigs(List<? extends Object> launchTemplateConfigs) Sets the value ofCfnEC2FleetMixinProps.getLaunchTemplateConfigs()launchTemplateConfigs(IResolvable launchTemplateConfigs) Sets the value ofCfnEC2FleetMixinProps.getLaunchTemplateConfigs()onDemandOptions(CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty onDemandOptions) Sets the value ofCfnEC2FleetMixinProps.getOnDemandOptions()onDemandOptions(IResolvable onDemandOptions) Sets the value ofCfnEC2FleetMixinProps.getOnDemandOptions()replaceUnhealthyInstances(Boolean replaceUnhealthyInstances) Sets the value ofCfnEC2FleetMixinProps.getReplaceUnhealthyInstances()replaceUnhealthyInstances(IResolvable replaceUnhealthyInstances) Sets the value ofCfnEC2FleetMixinProps.getReplaceUnhealthyInstances()reservedCapacityOptions(CfnEC2FleetPropsMixin.ReservedCapacityOptionsRequestProperty reservedCapacityOptions) Sets the value ofCfnEC2FleetMixinProps.getReservedCapacityOptions()reservedCapacityOptions(IResolvable reservedCapacityOptions) Sets the value ofCfnEC2FleetMixinProps.getReservedCapacityOptions()Sets the value ofCfnEC2FleetMixinProps.getSpotOptions()spotOptions(IResolvable spotOptions) Sets the value ofCfnEC2FleetMixinProps.getSpotOptions()tagSpecifications(List<? extends Object> tagSpecifications) Sets the value ofCfnEC2FleetMixinProps.getTagSpecifications()tagSpecifications(IResolvable tagSpecifications) Sets the value ofCfnEC2FleetMixinProps.getTagSpecifications()targetCapacitySpecification(CfnEC2FleetPropsMixin.TargetCapacitySpecificationRequestProperty targetCapacitySpecification) Sets the value ofCfnEC2FleetMixinProps.getTargetCapacitySpecification()targetCapacitySpecification(IResolvable targetCapacitySpecification) Sets the value ofCfnEC2FleetMixinProps.getTargetCapacitySpecification()terminateInstancesWithExpiration(Boolean terminateInstancesWithExpiration) Sets the value ofCfnEC2FleetMixinProps.getTerminateInstancesWithExpiration()terminateInstancesWithExpiration(IResolvable terminateInstancesWithExpiration) Sets the value ofCfnEC2FleetMixinProps.getTerminateInstancesWithExpiration()Sets the value ofCfnEC2FleetMixinProps.getType()Sets the value ofCfnEC2FleetMixinProps.getValidFrom()validUntil(String validUntil) Sets the value ofCfnEC2FleetMixinProps.getValidUntil()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
context
Sets the value ofCfnEC2FleetMixinProps.getContext()- Parameters:
context- Reserved.- Returns:
this
-
excessCapacityTerminationPolicy
@Stability(Stable) public CfnEC2FleetMixinProps.Builder excessCapacityTerminationPolicy(String excessCapacityTerminationPolicy) Sets the value ofCfnEC2FleetMixinProps.getExcessCapacityTerminationPolicy()- Parameters:
excessCapacityTerminationPolicy- Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet. Supported only for fleets of typemaintain.- Returns:
this
-
launchTemplateConfigs
@Stability(Stable) public CfnEC2FleetMixinProps.Builder launchTemplateConfigs(IResolvable launchTemplateConfigs) Sets the value ofCfnEC2FleetMixinProps.getLaunchTemplateConfigs()- Parameters:
launchTemplateConfigs- The configuration for the EC2 Fleet.- Returns:
this
-
launchTemplateConfigs
@Stability(Stable) public CfnEC2FleetMixinProps.Builder launchTemplateConfigs(List<? extends Object> launchTemplateConfigs) Sets the value ofCfnEC2FleetMixinProps.getLaunchTemplateConfigs()- Parameters:
launchTemplateConfigs- The configuration for the EC2 Fleet.- Returns:
this
-
onDemandOptions
@Stability(Stable) public CfnEC2FleetMixinProps.Builder onDemandOptions(IResolvable onDemandOptions) Sets the value ofCfnEC2FleetMixinProps.getOnDemandOptions()- Parameters:
onDemandOptions- Describes the configuration of On-Demand Instances in an EC2 Fleet.- Returns:
this
-
onDemandOptions
@Stability(Stable) public CfnEC2FleetMixinProps.Builder onDemandOptions(CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty onDemandOptions) Sets the value ofCfnEC2FleetMixinProps.getOnDemandOptions()- Parameters:
onDemandOptions- Describes the configuration of On-Demand Instances in an EC2 Fleet.- Returns:
this
-
replaceUnhealthyInstances
@Stability(Stable) public CfnEC2FleetMixinProps.Builder replaceUnhealthyInstances(Boolean replaceUnhealthyInstances) Sets the value ofCfnEC2FleetMixinProps.getReplaceUnhealthyInstances()- Parameters:
replaceUnhealthyInstances- Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of typemaintain. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide .- Returns:
this
-
replaceUnhealthyInstances
@Stability(Stable) public CfnEC2FleetMixinProps.Builder replaceUnhealthyInstances(IResolvable replaceUnhealthyInstances) Sets the value ofCfnEC2FleetMixinProps.getReplaceUnhealthyInstances()- Parameters:
replaceUnhealthyInstances- Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of typemaintain. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide .- Returns:
this
-
reservedCapacityOptions
@Stability(Stable) public CfnEC2FleetMixinProps.Builder reservedCapacityOptions(IResolvable reservedCapacityOptions) Sets the value ofCfnEC2FleetMixinProps.getReservedCapacityOptions()- Parameters:
reservedCapacityOptions- the value to be set.- Returns:
this
-
reservedCapacityOptions
@Stability(Stable) public CfnEC2FleetMixinProps.Builder reservedCapacityOptions(CfnEC2FleetPropsMixin.ReservedCapacityOptionsRequestProperty reservedCapacityOptions) Sets the value ofCfnEC2FleetMixinProps.getReservedCapacityOptions()- Parameters:
reservedCapacityOptions- the value to be set.- Returns:
this
-
spotOptions
Sets the value ofCfnEC2FleetMixinProps.getSpotOptions()- Parameters:
spotOptions- Describes the configuration of Spot Instances in an EC2 Fleet.- Returns:
this
-
spotOptions
@Stability(Stable) public CfnEC2FleetMixinProps.Builder spotOptions(CfnEC2FleetPropsMixin.SpotOptionsRequestProperty spotOptions) Sets the value ofCfnEC2FleetMixinProps.getSpotOptions()- Parameters:
spotOptions- Describes the configuration of Spot Instances in an EC2 Fleet.- Returns:
this
-
tagSpecifications
@Stability(Stable) public CfnEC2FleetMixinProps.Builder tagSpecifications(IResolvable tagSpecifications) Sets the value ofCfnEC2FleetMixinProps.getTagSpecifications()- Parameters:
tagSpecifications- The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tag your resources . If the fleet type isinstant, specify a resource type offleetto tag the fleet orinstanceto tag the instances at launch.If the fleet type is
maintainorrequest, specify a resource type offleetto tag the fleet. You cannot specify a resource type ofinstance. To tag instances at launch, specify the tags in a launch template .- Returns:
this
-
tagSpecifications
@Stability(Stable) public CfnEC2FleetMixinProps.Builder tagSpecifications(List<? extends Object> tagSpecifications) Sets the value ofCfnEC2FleetMixinProps.getTagSpecifications()- Parameters:
tagSpecifications- The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tag your resources . If the fleet type isinstant, specify a resource type offleetto tag the fleet orinstanceto tag the instances at launch.If the fleet type is
maintainorrequest, specify a resource type offleetto tag the fleet. You cannot specify a resource type ofinstance. To tag instances at launch, specify the tags in a launch template .- Returns:
this
-
targetCapacitySpecification
@Stability(Stable) public CfnEC2FleetMixinProps.Builder targetCapacitySpecification(IResolvable targetCapacitySpecification) Sets the value ofCfnEC2FleetMixinProps.getTargetCapacitySpecification()- Parameters:
targetCapacitySpecification- The number of units to request.- Returns:
this
-
targetCapacitySpecification
@Stability(Stable) public CfnEC2FleetMixinProps.Builder targetCapacitySpecification(CfnEC2FleetPropsMixin.TargetCapacitySpecificationRequestProperty targetCapacitySpecification) Sets the value ofCfnEC2FleetMixinProps.getTargetCapacitySpecification()- Parameters:
targetCapacitySpecification- The number of units to request.- Returns:
this
-
terminateInstancesWithExpiration
@Stability(Stable) public CfnEC2FleetMixinProps.Builder terminateInstancesWithExpiration(Boolean terminateInstancesWithExpiration) Sets the value ofCfnEC2FleetMixinProps.getTerminateInstancesWithExpiration()- Parameters:
terminateInstancesWithExpiration- Indicates whether running instances should be terminated when the EC2 Fleet expires.- Returns:
this
-
terminateInstancesWithExpiration
@Stability(Stable) public CfnEC2FleetMixinProps.Builder terminateInstancesWithExpiration(IResolvable terminateInstancesWithExpiration) Sets the value ofCfnEC2FleetMixinProps.getTerminateInstancesWithExpiration()- Parameters:
terminateInstancesWithExpiration- Indicates whether running instances should be terminated when the EC2 Fleet expires.- Returns:
this
-
type
Sets the value ofCfnEC2FleetMixinProps.getType()- Parameters:
type- The fleet type. The default value ismaintain.maintain- The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.request- The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.instant- The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.
For more information, see EC2 Fleet request types in the Amazon EC2 User Guide .
- Returns:
this
-
validFrom
Sets the value ofCfnEC2FleetMixinProps.getValidFrom()- Parameters:
validFrom- The start date and time of the request, in UTC format (for example, YYYY - MM - DD T HH : MM : SS Z). The default is to start fulfilling the request immediately.- Returns:
this
-
validUntil
Sets the value ofCfnEC2FleetMixinProps.getValidUntil()- Parameters:
validUntil- The end date and time of the request, in UTC format (for example, YYYY - MM - DD T HH : MM : SS Z). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnEC2FleetMixinProps>- Returns:
- a new instance of
CfnEC2FleetMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-