import { Value } from '../../../cloudformation/Value';
import { SpotFleetTagSpecificationProps } from './SpotFleetTagSpecificationProps';
import { LaunchTemplateConfigProps } from './LaunchTemplateConfigProps';
import { SpotMaintenanceStrategiesProps } from './SpotMaintenanceStrategiesProps';
import { SpotFleetLaunchSpecificationProps } from './SpotFleetLaunchSpecificationProps';
import { LoadBalancersConfigProps } from './LoadBalancersConfigProps';
/**
  Specifies the configuration of a Spot Fleet request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet.html">Spot Fleet </a> in the <em>Amazon EC2 User Guide</em>.
  For full documentation go to <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotfleetrequestconfigdata.html">the AWS Docs</a>
*/
export interface SpotFleetRequestConfigDataProps {
    /** <code>Context</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-context"></a>
  Reserved.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    context?: Value<string>;
    /** <code>SpotMaxTotalPrice</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-spotmaxtotalprice"></a>
  The maximum amount per hour for Spot Instances that you’re willing to pay. You can use the <code>spotMaxTotalPrice</code> parameter, the <code>onDemandMaxTotalPrice</code> parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you’re willing to pay. When the maximum amount you’re willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.<br />
  If your fleet includes T instances that are configured as <code>unlimited</code>, and if their average CPU usage exceeds the baseline utilization, you will incur a charge for surplus credits. The <code>spotMaxTotalPrice</code> does not account for surplus credits, and, if you use surplus credits, your final cost might be higher than what you specified for <code>spotMaxTotalPrice</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits">Surplus credits can incur charges</a> in the
  EC2 User Guide:
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    spotMaxTotalPrice?: Value<string>;
    /** <code>ExcessCapacityTerminationPolicy</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-excesscapacityterminationpolicy"></a>
  Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.<br />
  Supported only for fleets of type <code>maintain</code>.<br />
  
  Required: No<br />
  
  Allowed values: <code>default | noTermination</code><br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    excessCapacityTerminationPolicy?: Value<'default' | 'noTermination'>;
    /** <code>TagSpecifications</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-tagspecifications"></a>
  The key-value pair for tagging the Spot Fleet request on creation. The value for <code>ResourceType</code> must be <code>spot-fleet-request</code>, otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template">launch template</a> (valid only if you use <code>LaunchTemplateConfigs</code>) or in the <code>[SpotFleetTagSpecification](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html)</code> (valid only if you use <code>LaunchSpecifications</code>). For information about tagging after launch, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources">Tag your resources</a>.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    tagSpecifications?: SpotFleetTagSpecificationProps[];
    /** <code>InstancePoolsToUseCount</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-instancepoolstousecount"></a>
  The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot <strong>AllocationStrategy</strong> is set to <code>lowest-price</code>. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.<br />
  Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    instancePoolsToUseCount?: Value<number>;
    /** <code>LaunchTemplateConfigs</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-launchtemplateconfigs"></a>
  The launch template and overrides. If you specify <code>LaunchTemplateConfigs</code>, you can’t specify <code>LaunchSpecifications</code>.<br />
  
  Required: Conditional<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    launchTemplateConfigs?: LaunchTemplateConfigProps[];
    /** <code>TargetCapacityUnitType</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-targetcapacityunittype"></a>
  The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.<br />
  Default: <code>units</code> (translates to number of instances)<br />
  
  Required: No<br />
  
  Allowed values: <code>memory-mib | units | vcpu</code><br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    targetCapacityUnitType?: Value<'memory-mib' | 'units' | 'vcpu'>;
    /** <code>IamFleetRole</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-iamfleetrole"></a>
  The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html#spot-fleet-prerequisites">Spot Fleet Prerequisites</a> in the
  Amazon EC2 User Guide for Linux Instances: Spot Fleet can terminate Spot Instances on your behalf when you cancel its Spot Fleet request or when the Spot Fleet request expires, if you set <code>TerminateInstancesWithExpiration</code>.<br />
  
  Required: Yes<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    iamFleetRole: Value<string>;
    /** <code>SpotMaintenanceStrategies</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-spotmaintenancestrategies"></a>
  The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    spotMaintenanceStrategies?: SpotMaintenanceStrategiesProps;
    /** <code>TerminateInstancesWithExpiration</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-terminateinstanceswithexpiration"></a>
  Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    terminateInstancesWithExpiration?: Value<boolean>;
    /** <code>ValidUntil</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-validuntil"></a>
  The end date and time of the request, in UTC format (
  YYYY: <
  MM: <
  DD: <
  HH: <
  SS: . After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    validUntil?: Value<string>;
    /** <code>OnDemandMaxTotalPrice</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-ondemandmaxtotalprice"></a>
  The maximum amount per hour for On-Demand Instances that you’re willing to pay. You can use the <code>onDemandMaxTotalPrice</code> parameter, the <code>spotMaxTotalPrice</code> parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you’re willing to pay. When the maximum amount you’re willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.<br />
  If your fleet includes T instances that are configured as <code>unlimited</code>, and if their average CPU usage exceeds the baseline utilization, you will incur a charge for surplus credits. The <code>onDemandMaxTotalPrice</code> does not account for surplus credits, and, if you use surplus credits, your final cost might be higher than what you specified for <code>onDemandMaxTotalPrice</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits">Surplus credits can incur charges</a> in the
  EC2 User Guide:
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    onDemandMaxTotalPrice?: Value<string>;
    /** <code>OnDemandAllocationStrategy</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-ondemandallocationstrategy"></a>
  The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify <code>lowestPrice</code>, Spot Fleet uses price to determine the order, launching the lowest price first. If you specify <code>prioritized</code>, Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to <code>lowestPrice</code>.<br />
  
  Required: No<br />
  
  Allowed values: <code>lowestPrice | prioritized</code><br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    onDemandAllocationStrategy?: Value<'lowestPrice' | 'prioritized'>;
    /** <code>SpotPrice</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-spotprice"></a>
  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.<br />
  If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    spotPrice?: Value<string>;
    /** <code>AllocationStrategy</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-allocationstrategy"></a>
  The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the
  Amazon EC2 User Guide: br />
  priceCapacityOptimized (recommended)<br />
  Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.<br />
  capacityOptimized<br />
  Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use <code>capacityOptimizedPrioritized</code>. Set a priority for each instance type by using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. <code>capacityOptimizedPrioritized</code> is supported only if your Spot Fleet uses a launch template. Note that if the <code>OnDemandAllocationStrategy</code> is set to <code>prioritized</code>, the same priority is applied when fulfilling On-Demand capacity.<br />
  diversified<br />
  Spot Fleet requests instances from all of the Spot Instance pools that you specify.<br />
  lowestPrice<br />
  Spot Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn’t have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.
  Default: <code>lowestPrice</code><br />
  
  Required: No<br />
  
  Allowed values: <code>capacityOptimized | capacityOptimizedPrioritized | diversified | lowestPrice | priceCapacityOptimized</code><br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    allocationStrategy?: Value<'capacityOptimized' | 'capacityOptimizedPrioritized' | 'diversified' | 'lowestPrice' | 'priceCapacityOptimized'>;
    /** <code>OnDemandTargetCapacity</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-ondemandtargetcapacity"></a>
  The number of On-Demand units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    onDemandTargetCapacity?: Value<number>;
    /** <code>Type</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-type"></a>
  The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is <code>request</code>, the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is <code>maintain</code>, the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: <code>maintain</code>. <code>instant</code> is listed but is not used by Spot Fleet.<br />
  
  Required: No<br />
  
  Allowed values: <code>instant | maintain | request</code><br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    type?: Value<'instant' | 'maintain' | 'request'>;
    /** <code>LaunchSpecifications</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-launchspecifications"></a>
  The launch specifications for the Spot Fleet request. If you specify <code>LaunchSpecifications</code>, you can’t specify <code>LaunchTemplateConfigs</code>.<br />
  
  Required: Conditional<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    launchSpecifications?: SpotFleetLaunchSpecificationProps[];
    /** <code>InstanceInterruptionBehavior</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-instanceinterruptionbehavior"></a>
  The behavior when a Spot Instance is interrupted. The default is <code>terminate</code>.<br />
  
  Required: No<br />
  
  Allowed values: <code>hibernate | stop | terminate</code><br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    instanceInterruptionBehavior?: Value<'hibernate' | 'stop' | 'terminate'>;
    /** <code>LoadBalancersConfig</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-loadbalancersconfig"></a>
  One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.<br />
  With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    loadBalancersConfig?: LoadBalancersConfigProps;
    /** <code>ValidFrom</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-validfrom"></a>
  The start date and time of the request, in UTC format (
  YYYY: <
  MM: <
  DD: <
  HH: <
  SS: . By default, Amazon EC2 starts fulfilling the request immediately.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    validFrom?: Value<string>;
    /** <code>ReplaceUnhealthyInstances</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-replaceunhealthyinstances"></a>
  Indicates whether Spot Fleet should replace unhealthy instances.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement">Replacement</a> */
    replaceUnhealthyInstances?: Value<boolean>;
    /** <code>TargetCapacity</code>  <a name="cfn-ec2-spotfleet-spotfleetrequestconfigdata-targetcapacity"></a>
  The number of units to request for the Spot Fleet. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is <code>maintain</code>, you can specify a target capacity of 0 and add capacity later.<br />
  
  Required: Yes<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    targetCapacity: Value<number>;
}
