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

com.pulumi.azurenative.azurefleet.inputs.SpotPriorityProfileArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.azurenative.azurefleet.inputs;

import com.pulumi.azurenative.azurefleet.enums.EvictionPolicy;
import com.pulumi.azurenative.azurefleet.enums.SpotAllocationStrategy;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Configuration Options for Spot instances in Compute Fleet.
 * 
 */
public final class SpotPriorityProfileArgs extends com.pulumi.resources.ResourceArgs {

    public static final SpotPriorityProfileArgs Empty = new SpotPriorityProfileArgs();

    /**
     * Allocation strategy to follow when determining the VM sizes distribution for Spot VMs.
     * 
     */
    @Import(name="allocationStrategy")
    private @Nullable Output> allocationStrategy;

    /**
     * @return Allocation strategy to follow when determining the VM sizes distribution for Spot VMs.
     * 
     */
    public Optional>> allocationStrategy() {
        return Optional.ofNullable(this.allocationStrategy);
    }

    /**
     * Total capacity to achieve. It is currently in terms of number of VMs.
     * 
     */
    @Import(name="capacity")
    private @Nullable Output capacity;

    /**
     * @return Total capacity to achieve. It is currently in terms of number of VMs.
     * 
     */
    public Optional> capacity() {
        return Optional.ofNullable(this.capacity);
    }

    /**
     * Eviction Policy to follow when evicting Spot VMs.
     * 
     */
    @Import(name="evictionPolicy")
    private @Nullable Output> evictionPolicy;

    /**
     * @return Eviction Policy to follow when evicting Spot VMs.
     * 
     */
    public Optional>> evictionPolicy() {
        return Optional.ofNullable(this.evictionPolicy);
    }

    /**
     * Flag to enable/disable continuous goal seeking for the desired capacity and restoration of evicted Spot VMs.
     * If maintain is enabled, AzureFleetRP will use all VM sizes in vmSizesProfile to create new VMs (if VMs are evicted deleted)
     * or update existing VMs with new VM sizes (if VMs are evicted deallocated or failed to allocate due to capacity constraint) in order to achieve the desired capacity.
     * Maintain is enabled by default.
     * 
     */
    @Import(name="maintain")
    private @Nullable Output maintain;

    /**
     * @return Flag to enable/disable continuous goal seeking for the desired capacity and restoration of evicted Spot VMs.
     * If maintain is enabled, AzureFleetRP will use all VM sizes in vmSizesProfile to create new VMs (if VMs are evicted deleted)
     * or update existing VMs with new VM sizes (if VMs are evicted deallocated or failed to allocate due to capacity constraint) in order to achieve the desired capacity.
     * Maintain is enabled by default.
     * 
     */
    public Optional> maintain() {
        return Optional.ofNullable(this.maintain);
    }

    /**
     * Price per hour of each Spot VM will never exceed this.
     * 
     */
    @Import(name="maxPricePerVM")
    private @Nullable Output maxPricePerVM;

    /**
     * @return Price per hour of each Spot VM will never exceed this.
     * 
     */
    public Optional> maxPricePerVM() {
        return Optional.ofNullable(this.maxPricePerVM);
    }

    /**
     * Minimum capacity to achieve which cannot be updated. If we will not be able to "guarantee" minimum capacity, we will reject the request in the sync path itself.
     * 
     */
    @Import(name="minCapacity")
    private @Nullable Output minCapacity;

    /**
     * @return Minimum capacity to achieve which cannot be updated. If we will not be able to "guarantee" minimum capacity, we will reject the request in the sync path itself.
     * 
     */
    public Optional> minCapacity() {
        return Optional.ofNullable(this.minCapacity);
    }

    private SpotPriorityProfileArgs() {}

    private SpotPriorityProfileArgs(SpotPriorityProfileArgs $) {
        this.allocationStrategy = $.allocationStrategy;
        this.capacity = $.capacity;
        this.evictionPolicy = $.evictionPolicy;
        this.maintain = $.maintain;
        this.maxPricePerVM = $.maxPricePerVM;
        this.minCapacity = $.minCapacity;
    }

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

    public static final class Builder {
        private SpotPriorityProfileArgs $;

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

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

        /**
         * @param allocationStrategy Allocation strategy to follow when determining the VM sizes distribution for Spot VMs.
         * 
         * @return builder
         * 
         */
        public Builder allocationStrategy(@Nullable Output> allocationStrategy) {
            $.allocationStrategy = allocationStrategy;
            return this;
        }

        /**
         * @param allocationStrategy Allocation strategy to follow when determining the VM sizes distribution for Spot VMs.
         * 
         * @return builder
         * 
         */
        public Builder allocationStrategy(Either allocationStrategy) {
            return allocationStrategy(Output.of(allocationStrategy));
        }

        /**
         * @param allocationStrategy Allocation strategy to follow when determining the VM sizes distribution for Spot VMs.
         * 
         * @return builder
         * 
         */
        public Builder allocationStrategy(String allocationStrategy) {
            return allocationStrategy(Either.ofLeft(allocationStrategy));
        }

        /**
         * @param allocationStrategy Allocation strategy to follow when determining the VM sizes distribution for Spot VMs.
         * 
         * @return builder
         * 
         */
        public Builder allocationStrategy(SpotAllocationStrategy allocationStrategy) {
            return allocationStrategy(Either.ofRight(allocationStrategy));
        }

        /**
         * @param capacity Total capacity to achieve. It is currently in terms of number of VMs.
         * 
         * @return builder
         * 
         */
        public Builder capacity(@Nullable Output capacity) {
            $.capacity = capacity;
            return this;
        }

        /**
         * @param capacity Total capacity to achieve. It is currently in terms of number of VMs.
         * 
         * @return builder
         * 
         */
        public Builder capacity(Integer capacity) {
            return capacity(Output.of(capacity));
        }

        /**
         * @param evictionPolicy Eviction Policy to follow when evicting Spot VMs.
         * 
         * @return builder
         * 
         */
        public Builder evictionPolicy(@Nullable Output> evictionPolicy) {
            $.evictionPolicy = evictionPolicy;
            return this;
        }

        /**
         * @param evictionPolicy Eviction Policy to follow when evicting Spot VMs.
         * 
         * @return builder
         * 
         */
        public Builder evictionPolicy(Either evictionPolicy) {
            return evictionPolicy(Output.of(evictionPolicy));
        }

        /**
         * @param evictionPolicy Eviction Policy to follow when evicting Spot VMs.
         * 
         * @return builder
         * 
         */
        public Builder evictionPolicy(String evictionPolicy) {
            return evictionPolicy(Either.ofLeft(evictionPolicy));
        }

        /**
         * @param evictionPolicy Eviction Policy to follow when evicting Spot VMs.
         * 
         * @return builder
         * 
         */
        public Builder evictionPolicy(EvictionPolicy evictionPolicy) {
            return evictionPolicy(Either.ofRight(evictionPolicy));
        }

        /**
         * @param maintain Flag to enable/disable continuous goal seeking for the desired capacity and restoration of evicted Spot VMs.
         * If maintain is enabled, AzureFleetRP will use all VM sizes in vmSizesProfile to create new VMs (if VMs are evicted deleted)
         * or update existing VMs with new VM sizes (if VMs are evicted deallocated or failed to allocate due to capacity constraint) in order to achieve the desired capacity.
         * Maintain is enabled by default.
         * 
         * @return builder
         * 
         */
        public Builder maintain(@Nullable Output maintain) {
            $.maintain = maintain;
            return this;
        }

        /**
         * @param maintain Flag to enable/disable continuous goal seeking for the desired capacity and restoration of evicted Spot VMs.
         * If maintain is enabled, AzureFleetRP will use all VM sizes in vmSizesProfile to create new VMs (if VMs are evicted deleted)
         * or update existing VMs with new VM sizes (if VMs are evicted deallocated or failed to allocate due to capacity constraint) in order to achieve the desired capacity.
         * Maintain is enabled by default.
         * 
         * @return builder
         * 
         */
        public Builder maintain(Boolean maintain) {
            return maintain(Output.of(maintain));
        }

        /**
         * @param maxPricePerVM Price per hour of each Spot VM will never exceed this.
         * 
         * @return builder
         * 
         */
        public Builder maxPricePerVM(@Nullable Output maxPricePerVM) {
            $.maxPricePerVM = maxPricePerVM;
            return this;
        }

        /**
         * @param maxPricePerVM Price per hour of each Spot VM will never exceed this.
         * 
         * @return builder
         * 
         */
        public Builder maxPricePerVM(Double maxPricePerVM) {
            return maxPricePerVM(Output.of(maxPricePerVM));
        }

        /**
         * @param minCapacity Minimum capacity to achieve which cannot be updated. If we will not be able to "guarantee" minimum capacity, we will reject the request in the sync path itself.
         * 
         * @return builder
         * 
         */
        public Builder minCapacity(@Nullable Output minCapacity) {
            $.minCapacity = minCapacity;
            return this;
        }

        /**
         * @param minCapacity Minimum capacity to achieve which cannot be updated. If we will not be able to "guarantee" minimum capacity, we will reject the request in the sync path itself.
         * 
         * @return builder
         * 
         */
        public Builder minCapacity(Integer minCapacity) {
            return minCapacity(Output.of(minCapacity));
        }

        public SpotPriorityProfileArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy