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

com.pulumi.spotinst.aws.inputs.MrScalarTaskScalingDownPolicyArgs Maven / Gradle / Ivy

The 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.spotinst.aws.inputs;

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


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

    public static final MrScalarTaskScalingDownPolicyArgs Empty = new MrScalarTaskScalingDownPolicyArgs();

    /**
     * The type of action to perform. Allowed values are : 'adjustment', 'setMinTarget', 'setMaxTarget', 'updateCapacity', 'percentageAdjustment'
     * 
     */
    @Import(name="actionType")
    private @Nullable Output actionType;

    /**
     * @return The type of action to perform. Allowed values are : 'adjustment', 'setMinTarget', 'setMaxTarget', 'updateCapacity', 'percentageAdjustment'
     * 
     */
    public Optional> actionType() {
        return Optional.ofNullable(this.actionType);
    }

    /**
     * The number of instances to add/remove to/from the target capacity when scale is needed.
     * 
     */
    @Import(name="adjustment")
    private @Nullable Output adjustment;

    /**
     * @return The number of instances to add/remove to/from the target capacity when scale is needed.
     * 
     */
    public Optional> adjustment() {
        return Optional.ofNullable(this.adjustment);
    }

    /**
     * The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
     * 
     */
    @Import(name="cooldown")
    private @Nullable Output cooldown;

    /**
     * @return The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
     * 
     */
    public Optional> cooldown() {
        return Optional.ofNullable(this.cooldown);
    }

    /**
     * A mapping of dimensions describing qualities of the metric.
     * 
     */
    @Import(name="dimensions")
    private @Nullable Output> dimensions;

    /**
     * @return A mapping of dimensions describing qualities of the metric.
     * 
     */
    public Optional>> dimensions() {
        return Optional.ofNullable(this.dimensions);
    }

    @Import(name="evaluationPeriods")
    private @Nullable Output evaluationPeriods;

    public Optional> evaluationPeriods() {
        return Optional.ofNullable(this.evaluationPeriods);
    }

    /**
     * Max target capacity for scale down.
     * 
     */
    @Import(name="maxTargetCapacity")
    private @Nullable Output maxTargetCapacity;

    /**
     * @return Max target capacity for scale down.
     * 
     */
    public Optional> maxTargetCapacity() {
        return Optional.ofNullable(this.maxTargetCapacity);
    }

    /**
     * The maximum to set when scale is needed.
     * 
     */
    @Import(name="maximum")
    private @Nullable Output maximum;

    /**
     * @return The maximum to set when scale is needed.
     * 
     */
    public Optional> maximum() {
        return Optional.ofNullable(this.maximum);
    }

    @Import(name="metricName", required=true)
    private Output metricName;

    public Output metricName() {
        return this.metricName;
    }

    /**
     * Min target capacity for scale up.
     * 
     */
    @Import(name="minTargetCapacity")
    private @Nullable Output minTargetCapacity;

    /**
     * @return Min target capacity for scale up.
     * 
     */
    public Optional> minTargetCapacity() {
        return Optional.ofNullable(this.minTargetCapacity);
    }

    /**
     * The minimum to set when scale is needed.
     * 
     */
    @Import(name="minimum")
    private @Nullable Output minimum;

    /**
     * @return The minimum to set when scale is needed.
     * 
     */
    public Optional> minimum() {
        return Optional.ofNullable(this.minimum);
    }

    @Import(name="namespace", required=true)
    private Output namespace;

    public Output namespace() {
        return this.namespace;
    }

    @Import(name="operator")
    private @Nullable Output operator;

    public Optional> operator() {
        return Optional.ofNullable(this.operator);
    }

    @Import(name="period")
    private @Nullable Output period;

    public Optional> period() {
        return Optional.ofNullable(this.period);
    }

    /**
     * The name of the policy.
     * 
     */
    @Import(name="policyName", required=true)
    private Output policyName;

    /**
     * @return The name of the policy.
     * 
     */
    public Output policyName() {
        return this.policyName;
    }

    @Import(name="statistic")
    private @Nullable Output statistic;

    public Optional> statistic() {
        return Optional.ofNullable(this.statistic);
    }

    /**
     * The number of instances to set when scale is needed.
     * 
     */
    @Import(name="target")
    private @Nullable Output target;

    /**
     * @return The number of instances to set when scale is needed.
     * 
     */
    public Optional> target() {
        return Optional.ofNullable(this.target);
    }

    @Import(name="threshold", required=true)
    private Output threshold;

    public Output threshold() {
        return this.threshold;
    }

    @Import(name="unit", required=true)
    private Output unit;

    public Output unit() {
        return this.unit;
    }

    private MrScalarTaskScalingDownPolicyArgs() {}

    private MrScalarTaskScalingDownPolicyArgs(MrScalarTaskScalingDownPolicyArgs $) {
        this.actionType = $.actionType;
        this.adjustment = $.adjustment;
        this.cooldown = $.cooldown;
        this.dimensions = $.dimensions;
        this.evaluationPeriods = $.evaluationPeriods;
        this.maxTargetCapacity = $.maxTargetCapacity;
        this.maximum = $.maximum;
        this.metricName = $.metricName;
        this.minTargetCapacity = $.minTargetCapacity;
        this.minimum = $.minimum;
        this.namespace = $.namespace;
        this.operator = $.operator;
        this.period = $.period;
        this.policyName = $.policyName;
        this.statistic = $.statistic;
        this.target = $.target;
        this.threshold = $.threshold;
        this.unit = $.unit;
    }

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

    public static final class Builder {
        private MrScalarTaskScalingDownPolicyArgs $;

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

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

        /**
         * @param actionType The type of action to perform. Allowed values are : 'adjustment', 'setMinTarget', 'setMaxTarget', 'updateCapacity', 'percentageAdjustment'
         * 
         * @return builder
         * 
         */
        public Builder actionType(@Nullable Output actionType) {
            $.actionType = actionType;
            return this;
        }

        /**
         * @param actionType The type of action to perform. Allowed values are : 'adjustment', 'setMinTarget', 'setMaxTarget', 'updateCapacity', 'percentageAdjustment'
         * 
         * @return builder
         * 
         */
        public Builder actionType(String actionType) {
            return actionType(Output.of(actionType));
        }

        /**
         * @param adjustment The number of instances to add/remove to/from the target capacity when scale is needed.
         * 
         * @return builder
         * 
         */
        public Builder adjustment(@Nullable Output adjustment) {
            $.adjustment = adjustment;
            return this;
        }

        /**
         * @param adjustment The number of instances to add/remove to/from the target capacity when scale is needed.
         * 
         * @return builder
         * 
         */
        public Builder adjustment(String adjustment) {
            return adjustment(Output.of(adjustment));
        }

        /**
         * @param cooldown The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
         * 
         * @return builder
         * 
         */
        public Builder cooldown(@Nullable Output cooldown) {
            $.cooldown = cooldown;
            return this;
        }

        /**
         * @param cooldown The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
         * 
         * @return builder
         * 
         */
        public Builder cooldown(Integer cooldown) {
            return cooldown(Output.of(cooldown));
        }

        /**
         * @param dimensions A mapping of dimensions describing qualities of the metric.
         * 
         * @return builder
         * 
         */
        public Builder dimensions(@Nullable Output> dimensions) {
            $.dimensions = dimensions;
            return this;
        }

        /**
         * @param dimensions A mapping of dimensions describing qualities of the metric.
         * 
         * @return builder
         * 
         */
        public Builder dimensions(Map dimensions) {
            return dimensions(Output.of(dimensions));
        }

        public Builder evaluationPeriods(@Nullable Output evaluationPeriods) {
            $.evaluationPeriods = evaluationPeriods;
            return this;
        }

        public Builder evaluationPeriods(Integer evaluationPeriods) {
            return evaluationPeriods(Output.of(evaluationPeriods));
        }

        /**
         * @param maxTargetCapacity Max target capacity for scale down.
         * 
         * @return builder
         * 
         */
        public Builder maxTargetCapacity(@Nullable Output maxTargetCapacity) {
            $.maxTargetCapacity = maxTargetCapacity;
            return this;
        }

        /**
         * @param maxTargetCapacity Max target capacity for scale down.
         * 
         * @return builder
         * 
         */
        public Builder maxTargetCapacity(String maxTargetCapacity) {
            return maxTargetCapacity(Output.of(maxTargetCapacity));
        }

        /**
         * @param maximum The maximum to set when scale is needed.
         * 
         * @return builder
         * 
         */
        public Builder maximum(@Nullable Output maximum) {
            $.maximum = maximum;
            return this;
        }

        /**
         * @param maximum The maximum to set when scale is needed.
         * 
         * @return builder
         * 
         */
        public Builder maximum(String maximum) {
            return maximum(Output.of(maximum));
        }

        public Builder metricName(Output metricName) {
            $.metricName = metricName;
            return this;
        }

        public Builder metricName(String metricName) {
            return metricName(Output.of(metricName));
        }

        /**
         * @param minTargetCapacity Min target capacity for scale up.
         * 
         * @return builder
         * 
         */
        public Builder minTargetCapacity(@Nullable Output minTargetCapacity) {
            $.minTargetCapacity = minTargetCapacity;
            return this;
        }

        /**
         * @param minTargetCapacity Min target capacity for scale up.
         * 
         * @return builder
         * 
         */
        public Builder minTargetCapacity(String minTargetCapacity) {
            return minTargetCapacity(Output.of(minTargetCapacity));
        }

        /**
         * @param minimum The minimum to set when scale is needed.
         * 
         * @return builder
         * 
         */
        public Builder minimum(@Nullable Output minimum) {
            $.minimum = minimum;
            return this;
        }

        /**
         * @param minimum The minimum to set when scale is needed.
         * 
         * @return builder
         * 
         */
        public Builder minimum(String minimum) {
            return minimum(Output.of(minimum));
        }

        public Builder namespace(Output namespace) {
            $.namespace = namespace;
            return this;
        }

        public Builder namespace(String namespace) {
            return namespace(Output.of(namespace));
        }

        public Builder operator(@Nullable Output operator) {
            $.operator = operator;
            return this;
        }

        public Builder operator(String operator) {
            return operator(Output.of(operator));
        }

        public Builder period(@Nullable Output period) {
            $.period = period;
            return this;
        }

        public Builder period(Integer period) {
            return period(Output.of(period));
        }

        /**
         * @param policyName The name of the policy.
         * 
         * @return builder
         * 
         */
        public Builder policyName(Output policyName) {
            $.policyName = policyName;
            return this;
        }

        /**
         * @param policyName The name of the policy.
         * 
         * @return builder
         * 
         */
        public Builder policyName(String policyName) {
            return policyName(Output.of(policyName));
        }

        public Builder statistic(@Nullable Output statistic) {
            $.statistic = statistic;
            return this;
        }

        public Builder statistic(String statistic) {
            return statistic(Output.of(statistic));
        }

        /**
         * @param target The number of instances to set when scale is needed.
         * 
         * @return builder
         * 
         */
        public Builder target(@Nullable Output target) {
            $.target = target;
            return this;
        }

        /**
         * @param target The number of instances to set when scale is needed.
         * 
         * @return builder
         * 
         */
        public Builder target(String target) {
            return target(Output.of(target));
        }

        public Builder threshold(Output threshold) {
            $.threshold = threshold;
            return this;
        }

        public Builder threshold(Double threshold) {
            return threshold(Output.of(threshold));
        }

        public Builder unit(Output unit) {
            $.unit = unit;
            return this;
        }

        public Builder unit(String unit) {
            return unit(Output.of(unit));
        }

        public MrScalarTaskScalingDownPolicyArgs build() {
            if ($.metricName == null) {
                throw new MissingRequiredPropertyException("MrScalarTaskScalingDownPolicyArgs", "metricName");
            }
            if ($.namespace == null) {
                throw new MissingRequiredPropertyException("MrScalarTaskScalingDownPolicyArgs", "namespace");
            }
            if ($.policyName == null) {
                throw new MissingRequiredPropertyException("MrScalarTaskScalingDownPolicyArgs", "policyName");
            }
            if ($.threshold == null) {
                throw new MissingRequiredPropertyException("MrScalarTaskScalingDownPolicyArgs", "threshold");
            }
            if ($.unit == null) {
                throw new MissingRequiredPropertyException("MrScalarTaskScalingDownPolicyArgs", "unit");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy