// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.ec2;

import com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchSpecificationArgs;
import com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigArgs;
import com.pulumi.aws.ec2.inputs.SpotFleetRequestSpotMaintenanceStrategiesArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class SpotFleetRequestArgs extends com.pulumi.resources.ResourceArgs {

    public static final SpotFleetRequestArgs Empty = new SpotFleetRequestArgs();

    /**
     * Indicates how to allocate the target capacity across
     * the Spot pools specified by the Spot fleet request. Valid values: `lowestPrice`, `diversified`, `capacityOptimized`, `capacityOptimizedPrioritized`, and `priceCapacityOptimized`. The default is
     * `lowestPrice`.
     * 
     */
    @Import(name="allocationStrategy")
    private @Nullable Output<String> allocationStrategy;

    /**
     * @return Indicates how to allocate the target capacity across
     * the Spot pools specified by the Spot fleet request. Valid values: `lowestPrice`, `diversified`, `capacityOptimized`, `capacityOptimizedPrioritized`, and `priceCapacityOptimized`. The default is
     * `lowestPrice`.
     * 
     */
    public Optional<Output<String>> allocationStrategy() {
        return Optional.ofNullable(this.allocationStrategy);
    }

    /**
     * Reserved.
     * 
     */
    @Import(name="context")
    private @Nullable Output<String> context;

    /**
     * @return Reserved.
     * 
     */
    public Optional<Output<String>> context() {
        return Optional.ofNullable(this.context);
    }

    /**
     * Indicates whether running Spot
     * instances should be terminated if the target capacity of the Spot fleet
     * request is decreased below the current size of the Spot fleet.
     * 
     */
    @Import(name="excessCapacityTerminationPolicy")
    private @Nullable Output<String> excessCapacityTerminationPolicy;

    /**
     * @return Indicates whether running Spot
     * instances should be terminated if the target capacity of the Spot fleet
     * request is decreased below the current size of the Spot fleet.
     * 
     */
    public Optional<Output<String>> excessCapacityTerminationPolicy() {
        return Optional.ofNullable(this.excessCapacityTerminationPolicy);
    }

    /**
     * The type of fleet request. Indicates whether the Spot Fleet only requests the target
     * capacity or also attempts to maintain it. Default is `maintain`.
     * 
     */
    @Import(name="fleetType")
    private @Nullable Output<String> fleetType;

    /**
     * @return The type of fleet request. Indicates whether the Spot Fleet only requests the target
     * capacity or also attempts to maintain it. Default is `maintain`.
     * 
     */
    public Optional<Output<String>> fleetType() {
        return Optional.ofNullable(this.fleetType);
    }

    /**
     * Grants the Spot fleet permission to terminate
     * Spot instances on your behalf when you cancel its Spot fleet request using
     * CancelSpotFleetRequests or when the Spot fleet request expires, if you set
     * terminateInstancesWithExpiration.
     * 
     */
    @Import(name="iamFleetRole", required=true)
    private Output<String> iamFleetRole;

    /**
     * @return Grants the Spot fleet permission to terminate
     * Spot instances on your behalf when you cancel its Spot fleet request using
     * CancelSpotFleetRequests or when the Spot fleet request expires, if you set
     * terminateInstancesWithExpiration.
     * 
     */
    public Output<String> iamFleetRole() {
        return this.iamFleetRole;
    }

    /**
     * Indicates whether a Spot
     * instance stops or terminates when it is interrupted. Default is
     * `terminate`.
     * 
     */
    @Import(name="instanceInterruptionBehaviour")
    private @Nullable Output<String> instanceInterruptionBehaviour;

    /**
     * @return Indicates whether a Spot
     * instance stops or terminates when it is interrupted. Default is
     * `terminate`.
     * 
     */
    public Optional<Output<String>> instanceInterruptionBehaviour() {
        return Optional.ofNullable(this.instanceInterruptionBehaviour);
    }

    /**
     * The number of Spot pools across which to allocate your target Spot capacity.
     * Valid only when `allocation_strategy` is set to `lowestPrice`. Spot Fleet selects
     * the cheapest Spot pools and evenly allocates your target Spot capacity across
     * the number of Spot pools that you specify.
     * 
     */
    @Import(name="instancePoolsToUseCount")
    private @Nullable Output<Integer> instancePoolsToUseCount;

    /**
     * @return The number of Spot pools across which to allocate your target Spot capacity.
     * Valid only when `allocation_strategy` is set to `lowestPrice`. Spot Fleet selects
     * the cheapest Spot pools and evenly allocates your target Spot capacity across
     * the number of Spot pools that you specify.
     * 
     */
    public Optional<Output<Integer>> instancePoolsToUseCount() {
        return Optional.ofNullable(this.instancePoolsToUseCount);
    }

    /**
     * Used to define the launch configuration of the
     * spot-fleet request. Can be specified multiple times to define different bids
     * across different markets and instance types. Conflicts with `launch_template_config`. At least one of `launch_specification` or `launch_template_config` is required.
     * 
     * **Note**: This takes in similar but not
     * identical inputs as `aws.ec2.Instance`.  There are limitations on
     * what you can specify. See the list of officially supported inputs in the
     * [reference documentation](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html). Any normal `aws.ec2.Instance` parameter that corresponds to those inputs may be used and it have
     * a additional parameter `iam_instance_profile_arn` takes `aws.iam.InstanceProfile` attribute `arn` as input.
     * 
     */
    @Import(name="launchSpecifications")
    private @Nullable Output<List<SpotFleetRequestLaunchSpecificationArgs>> launchSpecifications;

    /**
     * @return Used to define the launch configuration of the
     * spot-fleet request. Can be specified multiple times to define different bids
     * across different markets and instance types. Conflicts with `launch_template_config`. At least one of `launch_specification` or `launch_template_config` is required.
     * 
     * **Note**: This takes in similar but not
     * identical inputs as `aws.ec2.Instance`.  There are limitations on
     * what you can specify. See the list of officially supported inputs in the
     * [reference documentation](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html). Any normal `aws.ec2.Instance` parameter that corresponds to those inputs may be used and it have
     * a additional parameter `iam_instance_profile_arn` takes `aws.iam.InstanceProfile` attribute `arn` as input.
     * 
     */
    public Optional<Output<List<SpotFleetRequestLaunchSpecificationArgs>>> launchSpecifications() {
        return Optional.ofNullable(this.launchSpecifications);
    }

    /**
     * Launch template configuration block. See Launch Template Configs below for more details. Conflicts with `launch_specification`. At least one of `launch_specification` or `launch_template_config` is required.
     * 
     */
    @Import(name="launchTemplateConfigs")
    private @Nullable Output<List<SpotFleetRequestLaunchTemplateConfigArgs>> launchTemplateConfigs;

    /**
     * @return Launch template configuration block. See Launch Template Configs below for more details. Conflicts with `launch_specification`. At least one of `launch_specification` or `launch_template_config` is required.
     * 
     */
    public Optional<Output<List<SpotFleetRequestLaunchTemplateConfigArgs>>> launchTemplateConfigs() {
        return Optional.ofNullable(this.launchTemplateConfigs);
    }

    /**
     * A list of elastic load balancer names to add to the Spot fleet.
     * 
     */
    @Import(name="loadBalancers")
    private @Nullable Output<List<String>> loadBalancers;

    /**
     * @return A list of elastic load balancer names to add to the Spot fleet.
     * 
     */
    public Optional<Output<List<String>>> loadBalancers() {
        return Optional.ofNullable(this.loadBalancers);
    }

    /**
     * The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: `lowestPrice` and `prioritized`. the default is `lowestPrice`.
     * 
     */
    @Import(name="onDemandAllocationStrategy")
    private @Nullable Output<String> onDemandAllocationStrategy;

    /**
     * @return The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: `lowestPrice` and `prioritized`. the default is `lowestPrice`.
     * 
     */
    public Optional<Output<String>> onDemandAllocationStrategy() {
        return Optional.ofNullable(this.onDemandAllocationStrategy);
    }

    /**
     * The maximum amount per hour for On-Demand Instances that you&#39;re willing to pay. When the maximum amount you&#39;re willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
     * 
     */
    @Import(name="onDemandMaxTotalPrice")
    private @Nullable Output<String> onDemandMaxTotalPrice;

    /**
     * @return The maximum amount per hour for On-Demand Instances that you&#39;re willing to pay. When the maximum amount you&#39;re willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
     * 
     */
    public Optional<Output<String>> onDemandMaxTotalPrice() {
        return Optional.ofNullable(this.onDemandMaxTotalPrice);
    }

    /**
     * The number of On-Demand units to request. If the request type is `maintain`, you can specify a target capacity of 0 and add capacity later.
     * 
     */
    @Import(name="onDemandTargetCapacity")
    private @Nullable Output<Integer> onDemandTargetCapacity;

    /**
     * @return The number of On-Demand units to request. If the request type is `maintain`, you can specify a target capacity of 0 and add capacity later.
     * 
     */
    public Optional<Output<Integer>> onDemandTargetCapacity() {
        return Optional.ofNullable(this.onDemandTargetCapacity);
    }

    /**
     * Indicates whether Spot fleet should replace unhealthy instances. Default `false`.
     * 
     */
    @Import(name="replaceUnhealthyInstances")
    private @Nullable Output<Boolean> replaceUnhealthyInstances;

    /**
     * @return Indicates whether Spot fleet should replace unhealthy instances. Default `false`.
     * 
     */
    public Optional<Output<Boolean>> replaceUnhealthyInstances() {
        return Optional.ofNullable(this.replaceUnhealthyInstances);
    }

    /**
     * Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
     * 
     */
    @Import(name="spotMaintenanceStrategies")
    private @Nullable Output<SpotFleetRequestSpotMaintenanceStrategiesArgs> spotMaintenanceStrategies;

    /**
     * @return Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
     * 
     */
    public Optional<Output<SpotFleetRequestSpotMaintenanceStrategiesArgs>> spotMaintenanceStrategies() {
        return Optional.ofNullable(this.spotMaintenanceStrategies);
    }

    /**
     * The maximum bid price per unit hour.
     * 
     */
    @Import(name="spotPrice")
    private @Nullable Output<String> spotPrice;

    /**
     * @return The maximum bid price per unit hour.
     * 
     */
    public Optional<Output<String>> spotPrice() {
        return Optional.ofNullable(this.spotPrice);
    }

    /**
     * A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    @Import(name="tags")
    private @Nullable Output<Map<String,String>> tags;

    /**
     * @return A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    public Optional<Output<Map<String,String>>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The number of 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.
     * 
     */
    @Import(name="targetCapacity", required=true)
    private Output<Integer> targetCapacity;

    /**
     * @return The number of 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.
     * 
     */
    public Output<Integer> targetCapacity() {
        return this.targetCapacity;
    }

    /**
     * The unit for the target capacity. This can only be done with `instance_requirements` defined
     * 
     */
    @Import(name="targetCapacityUnitType")
    private @Nullable Output<String> targetCapacityUnitType;

    /**
     * @return The unit for the target capacity. This can only be done with `instance_requirements` defined
     * 
     */
    public Optional<Output<String>> targetCapacityUnitType() {
        return Optional.ofNullable(this.targetCapacityUnitType);
    }

    /**
     * A list of `aws.alb.TargetGroup` ARNs, for use with Application Load Balancing.
     * 
     */
    @Import(name="targetGroupArns")
    private @Nullable Output<List<String>> targetGroupArns;

    /**
     * @return A list of `aws.alb.TargetGroup` ARNs, for use with Application Load Balancing.
     * 
     */
    public Optional<Output<List<String>>> targetGroupArns() {
        return Optional.ofNullable(this.targetGroupArns);
    }

    /**
     * Indicates whether running Spot
     * instances should be terminated when the resource is deleted (and the Spot fleet request cancelled).
     * If no value is specified, the value of the `terminate_instances_with_expiration` argument is used.
     * 
     */
    @Import(name="terminateInstancesOnDelete")
    private @Nullable Output<String> terminateInstancesOnDelete;

    /**
     * @return Indicates whether running Spot
     * instances should be terminated when the resource is deleted (and the Spot fleet request cancelled).
     * If no value is specified, the value of the `terminate_instances_with_expiration` argument is used.
     * 
     */
    public Optional<Output<String>> terminateInstancesOnDelete() {
        return Optional.ofNullable(this.terminateInstancesOnDelete);
    }

    /**
     * Indicates whether running Spot
     * instances should be terminated when the Spot fleet request expires.
     * 
     */
    @Import(name="terminateInstancesWithExpiration")
    private @Nullable Output<Boolean> terminateInstancesWithExpiration;

    /**
     * @return Indicates whether running Spot
     * instances should be terminated when the Spot fleet request expires.
     * 
     */
    public Optional<Output<Boolean>> terminateInstancesWithExpiration() {
        return Optional.ofNullable(this.terminateInstancesWithExpiration);
    }

    /**
     * The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
     * 
     */
    @Import(name="validFrom")
    private @Nullable Output<String> validFrom;

    /**
     * @return The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
     * 
     */
    public Optional<Output<String>> validFrom() {
        return Optional.ofNullable(this.validFrom);
    }

    /**
     * The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
     * 
     */
    @Import(name="validUntil")
    private @Nullable Output<String> validUntil;

    /**
     * @return The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
     * 
     */
    public Optional<Output<String>> validUntil() {
        return Optional.ofNullable(this.validUntil);
    }

    /**
     * If set, this provider will
     * wait for the Spot Request to be fulfilled, and will throw an error if the
     * timeout of 10m is reached.
     * 
     */
    @Import(name="waitForFulfillment")
    private @Nullable Output<Boolean> waitForFulfillment;

    /**
     * @return If set, this provider will
     * wait for the Spot Request to be fulfilled, and will throw an error if the
     * timeout of 10m is reached.
     * 
     */
    public Optional<Output<Boolean>> waitForFulfillment() {
        return Optional.ofNullable(this.waitForFulfillment);
    }

    private SpotFleetRequestArgs() {}

    private SpotFleetRequestArgs(SpotFleetRequestArgs $) {
        this.allocationStrategy = $.allocationStrategy;
        this.context = $.context;
        this.excessCapacityTerminationPolicy = $.excessCapacityTerminationPolicy;
        this.fleetType = $.fleetType;
        this.iamFleetRole = $.iamFleetRole;
        this.instanceInterruptionBehaviour = $.instanceInterruptionBehaviour;
        this.instancePoolsToUseCount = $.instancePoolsToUseCount;
        this.launchSpecifications = $.launchSpecifications;
        this.launchTemplateConfigs = $.launchTemplateConfigs;
        this.loadBalancers = $.loadBalancers;
        this.onDemandAllocationStrategy = $.onDemandAllocationStrategy;
        this.onDemandMaxTotalPrice = $.onDemandMaxTotalPrice;
        this.onDemandTargetCapacity = $.onDemandTargetCapacity;
        this.replaceUnhealthyInstances = $.replaceUnhealthyInstances;
        this.spotMaintenanceStrategies = $.spotMaintenanceStrategies;
        this.spotPrice = $.spotPrice;
        this.tags = $.tags;
        this.targetCapacity = $.targetCapacity;
        this.targetCapacityUnitType = $.targetCapacityUnitType;
        this.targetGroupArns = $.targetGroupArns;
        this.terminateInstancesOnDelete = $.terminateInstancesOnDelete;
        this.terminateInstancesWithExpiration = $.terminateInstancesWithExpiration;
        this.validFrom = $.validFrom;
        this.validUntil = $.validUntil;
        this.waitForFulfillment = $.waitForFulfillment;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(SpotFleetRequestArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private SpotFleetRequestArgs $;

        public Builder() {
            $ = new SpotFleetRequestArgs();
        }

        public Builder(SpotFleetRequestArgs defaults) {
            $ = new SpotFleetRequestArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param allocationStrategy Indicates how to allocate the target capacity across
         * the Spot pools specified by the Spot fleet request. Valid values: `lowestPrice`, `diversified`, `capacityOptimized`, `capacityOptimizedPrioritized`, and `priceCapacityOptimized`. The default is
         * `lowestPrice`.
         * 
         * @return builder
         * 
         */
        public Builder allocationStrategy(@Nullable Output<String> allocationStrategy) {
            $.allocationStrategy = allocationStrategy;
            return this;
        }

        /**
         * @param allocationStrategy Indicates how to allocate the target capacity across
         * the Spot pools specified by the Spot fleet request. Valid values: `lowestPrice`, `diversified`, `capacityOptimized`, `capacityOptimizedPrioritized`, and `priceCapacityOptimized`. The default is
         * `lowestPrice`.
         * 
         * @return builder
         * 
         */
        public Builder allocationStrategy(String allocationStrategy) {
            return allocationStrategy(Output.of(allocationStrategy));
        }

        /**
         * @param context Reserved.
         * 
         * @return builder
         * 
         */
        public Builder context(@Nullable Output<String> context) {
            $.context = context;
            return this;
        }

        /**
         * @param context Reserved.
         * 
         * @return builder
         * 
         */
        public Builder context(String context) {
            return context(Output.of(context));
        }

        /**
         * @param excessCapacityTerminationPolicy Indicates whether running Spot
         * instances should be terminated if the target capacity of the Spot fleet
         * request is decreased below the current size of the Spot fleet.
         * 
         * @return builder
         * 
         */
        public Builder excessCapacityTerminationPolicy(@Nullable Output<String> excessCapacityTerminationPolicy) {
            $.excessCapacityTerminationPolicy = excessCapacityTerminationPolicy;
            return this;
        }

        /**
         * @param excessCapacityTerminationPolicy Indicates whether running Spot
         * instances should be terminated if the target capacity of the Spot fleet
         * request is decreased below the current size of the Spot fleet.
         * 
         * @return builder
         * 
         */
        public Builder excessCapacityTerminationPolicy(String excessCapacityTerminationPolicy) {
            return excessCapacityTerminationPolicy(Output.of(excessCapacityTerminationPolicy));
        }

        /**
         * @param fleetType The type of fleet request. Indicates whether the Spot Fleet only requests the target
         * capacity or also attempts to maintain it. Default is `maintain`.
         * 
         * @return builder
         * 
         */
        public Builder fleetType(@Nullable Output<String> fleetType) {
            $.fleetType = fleetType;
            return this;
        }

        /**
         * @param fleetType The type of fleet request. Indicates whether the Spot Fleet only requests the target
         * capacity or also attempts to maintain it. Default is `maintain`.
         * 
         * @return builder
         * 
         */
        public Builder fleetType(String fleetType) {
            return fleetType(Output.of(fleetType));
        }

        /**
         * @param iamFleetRole Grants the Spot fleet permission to terminate
         * Spot instances on your behalf when you cancel its Spot fleet request using
         * CancelSpotFleetRequests or when the Spot fleet request expires, if you set
         * terminateInstancesWithExpiration.
         * 
         * @return builder
         * 
         */
        public Builder iamFleetRole(Output<String> iamFleetRole) {
            $.iamFleetRole = iamFleetRole;
            return this;
        }

        /**
         * @param iamFleetRole Grants the Spot fleet permission to terminate
         * Spot instances on your behalf when you cancel its Spot fleet request using
         * CancelSpotFleetRequests or when the Spot fleet request expires, if you set
         * terminateInstancesWithExpiration.
         * 
         * @return builder
         * 
         */
        public Builder iamFleetRole(String iamFleetRole) {
            return iamFleetRole(Output.of(iamFleetRole));
        }

        /**
         * @param instanceInterruptionBehaviour Indicates whether a Spot
         * instance stops or terminates when it is interrupted. Default is
         * `terminate`.
         * 
         * @return builder
         * 
         */
        public Builder instanceInterruptionBehaviour(@Nullable Output<String> instanceInterruptionBehaviour) {
            $.instanceInterruptionBehaviour = instanceInterruptionBehaviour;
            return this;
        }

        /**
         * @param instanceInterruptionBehaviour Indicates whether a Spot
         * instance stops or terminates when it is interrupted. Default is
         * `terminate`.
         * 
         * @return builder
         * 
         */
        public Builder instanceInterruptionBehaviour(String instanceInterruptionBehaviour) {
            return instanceInterruptionBehaviour(Output.of(instanceInterruptionBehaviour));
        }

        /**
         * @param instancePoolsToUseCount The number of Spot pools across which to allocate your target Spot capacity.
         * Valid only when `allocation_strategy` is set to `lowestPrice`. Spot Fleet selects
         * the cheapest Spot pools and evenly allocates your target Spot capacity across
         * the number of Spot pools that you specify.
         * 
         * @return builder
         * 
         */
        public Builder instancePoolsToUseCount(@Nullable Output<Integer> instancePoolsToUseCount) {
            $.instancePoolsToUseCount = instancePoolsToUseCount;
            return this;
        }

        /**
         * @param instancePoolsToUseCount The number of Spot pools across which to allocate your target Spot capacity.
         * Valid only when `allocation_strategy` is set to `lowestPrice`. Spot Fleet selects
         * the cheapest Spot pools and evenly allocates your target Spot capacity across
         * the number of Spot pools that you specify.
         * 
         * @return builder
         * 
         */
        public Builder instancePoolsToUseCount(Integer instancePoolsToUseCount) {
            return instancePoolsToUseCount(Output.of(instancePoolsToUseCount));
        }

        /**
         * @param launchSpecifications Used to define the launch configuration of the
         * spot-fleet request. Can be specified multiple times to define different bids
         * across different markets and instance types. Conflicts with `launch_template_config`. At least one of `launch_specification` or `launch_template_config` is required.
         * 
         * **Note**: This takes in similar but not
         * identical inputs as `aws.ec2.Instance`.  There are limitations on
         * what you can specify. See the list of officially supported inputs in the
         * [reference documentation](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html). Any normal `aws.ec2.Instance` parameter that corresponds to those inputs may be used and it have
         * a additional parameter `iam_instance_profile_arn` takes `aws.iam.InstanceProfile` attribute `arn` as input.
         * 
         * @return builder
         * 
         */
        public Builder launchSpecifications(@Nullable Output<List<SpotFleetRequestLaunchSpecificationArgs>> launchSpecifications) {
            $.launchSpecifications = launchSpecifications;
            return this;
        }

        /**
         * @param launchSpecifications Used to define the launch configuration of the
         * spot-fleet request. Can be specified multiple times to define different bids
         * across different markets and instance types. Conflicts with `launch_template_config`. At least one of `launch_specification` or `launch_template_config` is required.
         * 
         * **Note**: This takes in similar but not
         * identical inputs as `aws.ec2.Instance`.  There are limitations on
         * what you can specify. See the list of officially supported inputs in the
         * [reference documentation](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html). Any normal `aws.ec2.Instance` parameter that corresponds to those inputs may be used and it have
         * a additional parameter `iam_instance_profile_arn` takes `aws.iam.InstanceProfile` attribute `arn` as input.
         * 
         * @return builder
         * 
         */
        public Builder launchSpecifications(List<SpotFleetRequestLaunchSpecificationArgs> launchSpecifications) {
            return launchSpecifications(Output.of(launchSpecifications));
        }

        /**
         * @param launchSpecifications Used to define the launch configuration of the
         * spot-fleet request. Can be specified multiple times to define different bids
         * across different markets and instance types. Conflicts with `launch_template_config`. At least one of `launch_specification` or `launch_template_config` is required.
         * 
         * **Note**: This takes in similar but not
         * identical inputs as `aws.ec2.Instance`.  There are limitations on
         * what you can specify. See the list of officially supported inputs in the
         * [reference documentation](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html). Any normal `aws.ec2.Instance` parameter that corresponds to those inputs may be used and it have
         * a additional parameter `iam_instance_profile_arn` takes `aws.iam.InstanceProfile` attribute `arn` as input.
         * 
         * @return builder
         * 
         */
        public Builder launchSpecifications(SpotFleetRequestLaunchSpecificationArgs... launchSpecifications) {
            return launchSpecifications(List.of(launchSpecifications));
        }

        /**
         * @param launchTemplateConfigs Launch template configuration block. See Launch Template Configs below for more details. Conflicts with `launch_specification`. At least one of `launch_specification` or `launch_template_config` is required.
         * 
         * @return builder
         * 
         */
        public Builder launchTemplateConfigs(@Nullable Output<List<SpotFleetRequestLaunchTemplateConfigArgs>> launchTemplateConfigs) {
            $.launchTemplateConfigs = launchTemplateConfigs;
            return this;
        }

        /**
         * @param launchTemplateConfigs Launch template configuration block. See Launch Template Configs below for more details. Conflicts with `launch_specification`. At least one of `launch_specification` or `launch_template_config` is required.
         * 
         * @return builder
         * 
         */
        public Builder launchTemplateConfigs(List<SpotFleetRequestLaunchTemplateConfigArgs> launchTemplateConfigs) {
            return launchTemplateConfigs(Output.of(launchTemplateConfigs));
        }

        /**
         * @param launchTemplateConfigs Launch template configuration block. See Launch Template Configs below for more details. Conflicts with `launch_specification`. At least one of `launch_specification` or `launch_template_config` is required.
         * 
         * @return builder
         * 
         */
        public Builder launchTemplateConfigs(SpotFleetRequestLaunchTemplateConfigArgs... launchTemplateConfigs) {
            return launchTemplateConfigs(List.of(launchTemplateConfigs));
        }

        /**
         * @param loadBalancers A list of elastic load balancer names to add to the Spot fleet.
         * 
         * @return builder
         * 
         */
        public Builder loadBalancers(@Nullable Output<List<String>> loadBalancers) {
            $.loadBalancers = loadBalancers;
            return this;
        }

        /**
         * @param loadBalancers A list of elastic load balancer names to add to the Spot fleet.
         * 
         * @return builder
         * 
         */
        public Builder loadBalancers(List<String> loadBalancers) {
            return loadBalancers(Output.of(loadBalancers));
        }

        /**
         * @param loadBalancers A list of elastic load balancer names to add to the Spot fleet.
         * 
         * @return builder
         * 
         */
        public Builder loadBalancers(String... loadBalancers) {
            return loadBalancers(List.of(loadBalancers));
        }

        /**
         * @param onDemandAllocationStrategy The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: `lowestPrice` and `prioritized`. the default is `lowestPrice`.
         * 
         * @return builder
         * 
         */
        public Builder onDemandAllocationStrategy(@Nullable Output<String> onDemandAllocationStrategy) {
            $.onDemandAllocationStrategy = onDemandAllocationStrategy;
            return this;
        }

        /**
         * @param onDemandAllocationStrategy The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: `lowestPrice` and `prioritized`. the default is `lowestPrice`.
         * 
         * @return builder
         * 
         */
        public Builder onDemandAllocationStrategy(String onDemandAllocationStrategy) {
            return onDemandAllocationStrategy(Output.of(onDemandAllocationStrategy));
        }

        /**
         * @param onDemandMaxTotalPrice The maximum amount per hour for On-Demand Instances that you&#39;re willing to pay. When the maximum amount you&#39;re willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
         * 
         * @return builder
         * 
         */
        public Builder onDemandMaxTotalPrice(@Nullable Output<String> onDemandMaxTotalPrice) {
            $.onDemandMaxTotalPrice = onDemandMaxTotalPrice;
            return this;
        }

        /**
         * @param onDemandMaxTotalPrice The maximum amount per hour for On-Demand Instances that you&#39;re willing to pay. When the maximum amount you&#39;re willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
         * 
         * @return builder
         * 
         */
        public Builder onDemandMaxTotalPrice(String onDemandMaxTotalPrice) {
            return onDemandMaxTotalPrice(Output.of(onDemandMaxTotalPrice));
        }

        /**
         * @param onDemandTargetCapacity The number of On-Demand units to request. If the request type is `maintain`, you can specify a target capacity of 0 and add capacity later.
         * 
         * @return builder
         * 
         */
        public Builder onDemandTargetCapacity(@Nullable Output<Integer> onDemandTargetCapacity) {
            $.onDemandTargetCapacity = onDemandTargetCapacity;
            return this;
        }

        /**
         * @param onDemandTargetCapacity The number of On-Demand units to request. If the request type is `maintain`, you can specify a target capacity of 0 and add capacity later.
         * 
         * @return builder
         * 
         */
        public Builder onDemandTargetCapacity(Integer onDemandTargetCapacity) {
            return onDemandTargetCapacity(Output.of(onDemandTargetCapacity));
        }

        /**
         * @param replaceUnhealthyInstances Indicates whether Spot fleet should replace unhealthy instances. Default `false`.
         * 
         * @return builder
         * 
         */
        public Builder replaceUnhealthyInstances(@Nullable Output<Boolean> replaceUnhealthyInstances) {
            $.replaceUnhealthyInstances = replaceUnhealthyInstances;
            return this;
        }

        /**
         * @param replaceUnhealthyInstances Indicates whether Spot fleet should replace unhealthy instances. Default `false`.
         * 
         * @return builder
         * 
         */
        public Builder replaceUnhealthyInstances(Boolean replaceUnhealthyInstances) {
            return replaceUnhealthyInstances(Output.of(replaceUnhealthyInstances));
        }

        /**
         * @param spotMaintenanceStrategies Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
         * 
         * @return builder
         * 
         */
        public Builder spotMaintenanceStrategies(@Nullable Output<SpotFleetRequestSpotMaintenanceStrategiesArgs> spotMaintenanceStrategies) {
            $.spotMaintenanceStrategies = spotMaintenanceStrategies;
            return this;
        }

        /**
         * @param spotMaintenanceStrategies Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
         * 
         * @return builder
         * 
         */
        public Builder spotMaintenanceStrategies(SpotFleetRequestSpotMaintenanceStrategiesArgs spotMaintenanceStrategies) {
            return spotMaintenanceStrategies(Output.of(spotMaintenanceStrategies));
        }

        /**
         * @param spotPrice The maximum bid price per unit hour.
         * 
         * @return builder
         * 
         */
        public Builder spotPrice(@Nullable Output<String> spotPrice) {
            $.spotPrice = spotPrice;
            return this;
        }

        /**
         * @param spotPrice The maximum bid price per unit hour.
         * 
         * @return builder
         * 
         */
        public Builder spotPrice(String spotPrice) {
            return spotPrice(Output.of(spotPrice));
        }

        /**
         * @param tags A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output<Map<String,String>> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map<String,String> tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param targetCapacity The number of 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.
         * 
         * @return builder
         * 
         */
        public Builder targetCapacity(Output<Integer> targetCapacity) {
            $.targetCapacity = targetCapacity;
            return this;
        }

        /**
         * @param targetCapacity The number of 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.
         * 
         * @return builder
         * 
         */
        public Builder targetCapacity(Integer targetCapacity) {
            return targetCapacity(Output.of(targetCapacity));
        }

        /**
         * @param targetCapacityUnitType The unit for the target capacity. This can only be done with `instance_requirements` defined
         * 
         * @return builder
         * 
         */
        public Builder targetCapacityUnitType(@Nullable Output<String> targetCapacityUnitType) {
            $.targetCapacityUnitType = targetCapacityUnitType;
            return this;
        }

        /**
         * @param targetCapacityUnitType The unit for the target capacity. This can only be done with `instance_requirements` defined
         * 
         * @return builder
         * 
         */
        public Builder targetCapacityUnitType(String targetCapacityUnitType) {
            return targetCapacityUnitType(Output.of(targetCapacityUnitType));
        }

        /**
         * @param targetGroupArns A list of `aws.alb.TargetGroup` ARNs, for use with Application Load Balancing.
         * 
         * @return builder
         * 
         */
        public Builder targetGroupArns(@Nullable Output<List<String>> targetGroupArns) {
            $.targetGroupArns = targetGroupArns;
            return this;
        }

        /**
         * @param targetGroupArns A list of `aws.alb.TargetGroup` ARNs, for use with Application Load Balancing.
         * 
         * @return builder
         * 
         */
        public Builder targetGroupArns(List<String> targetGroupArns) {
            return targetGroupArns(Output.of(targetGroupArns));
        }

        /**
         * @param targetGroupArns A list of `aws.alb.TargetGroup` ARNs, for use with Application Load Balancing.
         * 
         * @return builder
         * 
         */
        public Builder targetGroupArns(String... targetGroupArns) {
            return targetGroupArns(List.of(targetGroupArns));
        }

        /**
         * @param terminateInstancesOnDelete Indicates whether running Spot
         * instances should be terminated when the resource is deleted (and the Spot fleet request cancelled).
         * If no value is specified, the value of the `terminate_instances_with_expiration` argument is used.
         * 
         * @return builder
         * 
         */
        public Builder terminateInstancesOnDelete(@Nullable Output<String> terminateInstancesOnDelete) {
            $.terminateInstancesOnDelete = terminateInstancesOnDelete;
            return this;
        }

        /**
         * @param terminateInstancesOnDelete Indicates whether running Spot
         * instances should be terminated when the resource is deleted (and the Spot fleet request cancelled).
         * If no value is specified, the value of the `terminate_instances_with_expiration` argument is used.
         * 
         * @return builder
         * 
         */
        public Builder terminateInstancesOnDelete(String terminateInstancesOnDelete) {
            return terminateInstancesOnDelete(Output.of(terminateInstancesOnDelete));
        }

        /**
         * @param terminateInstancesWithExpiration Indicates whether running Spot
         * instances should be terminated when the Spot fleet request expires.
         * 
         * @return builder
         * 
         */
        public Builder terminateInstancesWithExpiration(@Nullable Output<Boolean> terminateInstancesWithExpiration) {
            $.terminateInstancesWithExpiration = terminateInstancesWithExpiration;
            return this;
        }

        /**
         * @param terminateInstancesWithExpiration Indicates whether running Spot
         * instances should be terminated when the Spot fleet request expires.
         * 
         * @return builder
         * 
         */
        public Builder terminateInstancesWithExpiration(Boolean terminateInstancesWithExpiration) {
            return terminateInstancesWithExpiration(Output.of(terminateInstancesWithExpiration));
        }

        /**
         * @param validFrom The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
         * 
         * @return builder
         * 
         */
        public Builder validFrom(@Nullable Output<String> validFrom) {
            $.validFrom = validFrom;
            return this;
        }

        /**
         * @param validFrom The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
         * 
         * @return builder
         * 
         */
        public Builder validFrom(String validFrom) {
            return validFrom(Output.of(validFrom));
        }

        /**
         * @param validUntil The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
         * 
         * @return builder
         * 
         */
        public Builder validUntil(@Nullable Output<String> validUntil) {
            $.validUntil = validUntil;
            return this;
        }

        /**
         * @param validUntil The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
         * 
         * @return builder
         * 
         */
        public Builder validUntil(String validUntil) {
            return validUntil(Output.of(validUntil));
        }

        /**
         * @param waitForFulfillment If set, this provider will
         * wait for the Spot Request to be fulfilled, and will throw an error if the
         * timeout of 10m is reached.
         * 
         * @return builder
         * 
         */
        public Builder waitForFulfillment(@Nullable Output<Boolean> waitForFulfillment) {
            $.waitForFulfillment = waitForFulfillment;
            return this;
        }

        /**
         * @param waitForFulfillment If set, this provider will
         * wait for the Spot Request to be fulfilled, and will throw an error if the
         * timeout of 10m is reached.
         * 
         * @return builder
         * 
         */
        public Builder waitForFulfillment(Boolean waitForFulfillment) {
            return waitForFulfillment(Output.of(waitForFulfillment));
        }

        public SpotFleetRequestArgs build() {
            $.iamFleetRole = Objects.requireNonNull($.iamFleetRole, "expected parameter 'iamFleetRole' to be non-null");
            $.targetCapacity = Objects.requireNonNull($.targetCapacity, "expected parameter 'targetCapacity' to be non-null");
            return $;
        }
    }

}
