All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyInstancesDistributionArgs Maven / Gradle / Ivy

// *** 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.autoscaling.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final GroupMixedInstancesPolicyInstancesDistributionArgs Empty = new GroupMixedInstancesPolicyInstancesDistributionArgs();

    /**
     * Strategy to use when launching on-demand instances. Valid values: `prioritized`, `lowest-price`. Default: `prioritized`.
     * 
     */
    @Import(name="onDemandAllocationStrategy")
    private @Nullable Output onDemandAllocationStrategy;

    /**
     * @return Strategy to use when launching on-demand instances. Valid values: `prioritized`, `lowest-price`. Default: `prioritized`.
     * 
     */
    public Optional> onDemandAllocationStrategy() {
        return Optional.ofNullable(this.onDemandAllocationStrategy);
    }

    /**
     * Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default: `0`.
     * 
     */
    @Import(name="onDemandBaseCapacity")
    private @Nullable Output onDemandBaseCapacity;

    /**
     * @return Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default: `0`.
     * 
     */
    public Optional> onDemandBaseCapacity() {
        return Optional.ofNullable(this.onDemandBaseCapacity);
    }

    /**
     * Percentage split between on-demand and Spot instances above the base on-demand capacity. Default: `100`.
     * 
     */
    @Import(name="onDemandPercentageAboveBaseCapacity")
    private @Nullable Output onDemandPercentageAboveBaseCapacity;

    /**
     * @return Percentage split between on-demand and Spot instances above the base on-demand capacity. Default: `100`.
     * 
     */
    public Optional> onDemandPercentageAboveBaseCapacity() {
        return Optional.ofNullable(this.onDemandPercentageAboveBaseCapacity);
    }

    /**
     * How to allocate capacity across the Spot pools. Valid values: `lowest-price`, `capacity-optimized`, `capacity-optimized-prioritized`, and `price-capacity-optimized`. Default: `lowest-price`.
     * 
     */
    @Import(name="spotAllocationStrategy")
    private @Nullable Output spotAllocationStrategy;

    /**
     * @return How to allocate capacity across the Spot pools. Valid values: `lowest-price`, `capacity-optimized`, `capacity-optimized-prioritized`, and `price-capacity-optimized`. Default: `lowest-price`.
     * 
     */
    public Optional> spotAllocationStrategy() {
        return Optional.ofNullable(this.spotAllocationStrategy);
    }

    /**
     * Number of Spot pools per availability zone to allocate capacity. EC2 Auto Scaling selects the cheapest Spot pools and evenly allocates Spot capacity across the number of Spot pools that you specify. Only available with `spot_allocation_strategy` set to `lowest-price`. Otherwise it must be set to `0`, if it has been defined before. Default: `2`.
     * 
     */
    @Import(name="spotInstancePools")
    private @Nullable Output spotInstancePools;

    /**
     * @return Number of Spot pools per availability zone to allocate capacity. EC2 Auto Scaling selects the cheapest Spot pools and evenly allocates Spot capacity across the number of Spot pools that you specify. Only available with `spot_allocation_strategy` set to `lowest-price`. Otherwise it must be set to `0`, if it has been defined before. Default: `2`.
     * 
     */
    public Optional> spotInstancePools() {
        return Optional.ofNullable(this.spotInstancePools);
    }

    /**
     * Maximum price per unit hour that the user is willing to pay for the Spot instances. Default: an empty string which means the on-demand price.
     * 
     */
    @Import(name="spotMaxPrice")
    private @Nullable Output spotMaxPrice;

    /**
     * @return Maximum price per unit hour that the user is willing to pay for the Spot instances. Default: an empty string which means the on-demand price.
     * 
     */
    public Optional> spotMaxPrice() {
        return Optional.ofNullable(this.spotMaxPrice);
    }

    private GroupMixedInstancesPolicyInstancesDistributionArgs() {}

    private GroupMixedInstancesPolicyInstancesDistributionArgs(GroupMixedInstancesPolicyInstancesDistributionArgs $) {
        this.onDemandAllocationStrategy = $.onDemandAllocationStrategy;
        this.onDemandBaseCapacity = $.onDemandBaseCapacity;
        this.onDemandPercentageAboveBaseCapacity = $.onDemandPercentageAboveBaseCapacity;
        this.spotAllocationStrategy = $.spotAllocationStrategy;
        this.spotInstancePools = $.spotInstancePools;
        this.spotMaxPrice = $.spotMaxPrice;
    }

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

    public static final class Builder {
        private GroupMixedInstancesPolicyInstancesDistributionArgs $;

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

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

        /**
         * @param onDemandAllocationStrategy Strategy to use when launching on-demand instances. Valid values: `prioritized`, `lowest-price`. Default: `prioritized`.
         * 
         * @return builder
         * 
         */
        public Builder onDemandAllocationStrategy(@Nullable Output onDemandAllocationStrategy) {
            $.onDemandAllocationStrategy = onDemandAllocationStrategy;
            return this;
        }

        /**
         * @param onDemandAllocationStrategy Strategy to use when launching on-demand instances. Valid values: `prioritized`, `lowest-price`. Default: `prioritized`.
         * 
         * @return builder
         * 
         */
        public Builder onDemandAllocationStrategy(String onDemandAllocationStrategy) {
            return onDemandAllocationStrategy(Output.of(onDemandAllocationStrategy));
        }

        /**
         * @param onDemandBaseCapacity Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default: `0`.
         * 
         * @return builder
         * 
         */
        public Builder onDemandBaseCapacity(@Nullable Output onDemandBaseCapacity) {
            $.onDemandBaseCapacity = onDemandBaseCapacity;
            return this;
        }

        /**
         * @param onDemandBaseCapacity Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default: `0`.
         * 
         * @return builder
         * 
         */
        public Builder onDemandBaseCapacity(Integer onDemandBaseCapacity) {
            return onDemandBaseCapacity(Output.of(onDemandBaseCapacity));
        }

        /**
         * @param onDemandPercentageAboveBaseCapacity Percentage split between on-demand and Spot instances above the base on-demand capacity. Default: `100`.
         * 
         * @return builder
         * 
         */
        public Builder onDemandPercentageAboveBaseCapacity(@Nullable Output onDemandPercentageAboveBaseCapacity) {
            $.onDemandPercentageAboveBaseCapacity = onDemandPercentageAboveBaseCapacity;
            return this;
        }

        /**
         * @param onDemandPercentageAboveBaseCapacity Percentage split between on-demand and Spot instances above the base on-demand capacity. Default: `100`.
         * 
         * @return builder
         * 
         */
        public Builder onDemandPercentageAboveBaseCapacity(Integer onDemandPercentageAboveBaseCapacity) {
            return onDemandPercentageAboveBaseCapacity(Output.of(onDemandPercentageAboveBaseCapacity));
        }

        /**
         * @param spotAllocationStrategy How to allocate capacity across the Spot pools. Valid values: `lowest-price`, `capacity-optimized`, `capacity-optimized-prioritized`, and `price-capacity-optimized`. Default: `lowest-price`.
         * 
         * @return builder
         * 
         */
        public Builder spotAllocationStrategy(@Nullable Output spotAllocationStrategy) {
            $.spotAllocationStrategy = spotAllocationStrategy;
            return this;
        }

        /**
         * @param spotAllocationStrategy How to allocate capacity across the Spot pools. Valid values: `lowest-price`, `capacity-optimized`, `capacity-optimized-prioritized`, and `price-capacity-optimized`. Default: `lowest-price`.
         * 
         * @return builder
         * 
         */
        public Builder spotAllocationStrategy(String spotAllocationStrategy) {
            return spotAllocationStrategy(Output.of(spotAllocationStrategy));
        }

        /**
         * @param spotInstancePools Number of Spot pools per availability zone to allocate capacity. EC2 Auto Scaling selects the cheapest Spot pools and evenly allocates Spot capacity across the number of Spot pools that you specify. Only available with `spot_allocation_strategy` set to `lowest-price`. Otherwise it must be set to `0`, if it has been defined before. Default: `2`.
         * 
         * @return builder
         * 
         */
        public Builder spotInstancePools(@Nullable Output spotInstancePools) {
            $.spotInstancePools = spotInstancePools;
            return this;
        }

        /**
         * @param spotInstancePools Number of Spot pools per availability zone to allocate capacity. EC2 Auto Scaling selects the cheapest Spot pools and evenly allocates Spot capacity across the number of Spot pools that you specify. Only available with `spot_allocation_strategy` set to `lowest-price`. Otherwise it must be set to `0`, if it has been defined before. Default: `2`.
         * 
         * @return builder
         * 
         */
        public Builder spotInstancePools(Integer spotInstancePools) {
            return spotInstancePools(Output.of(spotInstancePools));
        }

        /**
         * @param spotMaxPrice Maximum price per unit hour that the user is willing to pay for the Spot instances. Default: an empty string which means the on-demand price.
         * 
         * @return builder
         * 
         */
        public Builder spotMaxPrice(@Nullable Output spotMaxPrice) {
            $.spotMaxPrice = spotMaxPrice;
            return this;
        }

        /**
         * @param spotMaxPrice Maximum price per unit hour that the user is willing to pay for the Spot instances. Default: an empty string which means the on-demand price.
         * 
         * @return builder
         * 
         */
        public Builder spotMaxPrice(String spotMaxPrice) {
            return spotMaxPrice(Output.of(spotMaxPrice));
        }

        public GroupMixedInstancesPolicyInstancesDistributionArgs build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy