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

com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs 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.appautoscaling.inputs;

import com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs;
import com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final PolicyTargetTrackingScalingPolicyConfigurationArgs Empty = new PolicyTargetTrackingScalingPolicyConfigurationArgs();

    /**
     * Custom CloudWatch metric. Documentation can be found  at: [AWS Customized Metric Specification](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CustomizedMetricSpecification.html). See supported fields below.
     * 
     */
    @Import(name="customizedMetricSpecification")
    private @Nullable Output customizedMetricSpecification;

    /**
     * @return Custom CloudWatch metric. Documentation can be found  at: [AWS Customized Metric Specification](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CustomizedMetricSpecification.html). See supported fields below.
     * 
     */
    public Optional> customizedMetricSpecification() {
        return Optional.ofNullable(this.customizedMetricSpecification);
    }

    /**
     * Whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is `false`.
     * 
     */
    @Import(name="disableScaleIn")
    private @Nullable Output disableScaleIn;

    /**
     * @return Whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is `false`.
     * 
     */
    public Optional> disableScaleIn() {
        return Optional.ofNullable(this.disableScaleIn);
    }

    /**
     * Predefined metric. See supported fields below.
     * 
     */
    @Import(name="predefinedMetricSpecification")
    private @Nullable Output predefinedMetricSpecification;

    /**
     * @return Predefined metric. See supported fields below.
     * 
     */
    public Optional> predefinedMetricSpecification() {
        return Optional.ofNullable(this.predefinedMetricSpecification);
    }

    /**
     * Amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
     * 
     */
    @Import(name="scaleInCooldown")
    private @Nullable Output scaleInCooldown;

    /**
     * @return Amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
     * 
     */
    public Optional> scaleInCooldown() {
        return Optional.ofNullable(this.scaleInCooldown);
    }

    /**
     * Amount of time, in seconds, after a scale out activity completes before another scale out activity can start.
     * 
     */
    @Import(name="scaleOutCooldown")
    private @Nullable Output scaleOutCooldown;

    /**
     * @return Amount of time, in seconds, after a scale out activity completes before another scale out activity can start.
     * 
     */
    public Optional> scaleOutCooldown() {
        return Optional.ofNullable(this.scaleOutCooldown);
    }

    /**
     * Target value for the metric.
     * 
     */
    @Import(name="targetValue", required=true)
    private Output targetValue;

    /**
     * @return Target value for the metric.
     * 
     */
    public Output targetValue() {
        return this.targetValue;
    }

    private PolicyTargetTrackingScalingPolicyConfigurationArgs() {}

    private PolicyTargetTrackingScalingPolicyConfigurationArgs(PolicyTargetTrackingScalingPolicyConfigurationArgs $) {
        this.customizedMetricSpecification = $.customizedMetricSpecification;
        this.disableScaleIn = $.disableScaleIn;
        this.predefinedMetricSpecification = $.predefinedMetricSpecification;
        this.scaleInCooldown = $.scaleInCooldown;
        this.scaleOutCooldown = $.scaleOutCooldown;
        this.targetValue = $.targetValue;
    }

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

    public static final class Builder {
        private PolicyTargetTrackingScalingPolicyConfigurationArgs $;

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

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

        /**
         * @param customizedMetricSpecification Custom CloudWatch metric. Documentation can be found  at: [AWS Customized Metric Specification](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CustomizedMetricSpecification.html). See supported fields below.
         * 
         * @return builder
         * 
         */
        public Builder customizedMetricSpecification(@Nullable Output customizedMetricSpecification) {
            $.customizedMetricSpecification = customizedMetricSpecification;
            return this;
        }

        /**
         * @param customizedMetricSpecification Custom CloudWatch metric. Documentation can be found  at: [AWS Customized Metric Specification](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CustomizedMetricSpecification.html). See supported fields below.
         * 
         * @return builder
         * 
         */
        public Builder customizedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs customizedMetricSpecification) {
            return customizedMetricSpecification(Output.of(customizedMetricSpecification));
        }

        /**
         * @param disableScaleIn Whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is `false`.
         * 
         * @return builder
         * 
         */
        public Builder disableScaleIn(@Nullable Output disableScaleIn) {
            $.disableScaleIn = disableScaleIn;
            return this;
        }

        /**
         * @param disableScaleIn Whether scale in by the target tracking policy is disabled. If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is `false`.
         * 
         * @return builder
         * 
         */
        public Builder disableScaleIn(Boolean disableScaleIn) {
            return disableScaleIn(Output.of(disableScaleIn));
        }

        /**
         * @param predefinedMetricSpecification Predefined metric. See supported fields below.
         * 
         * @return builder
         * 
         */
        public Builder predefinedMetricSpecification(@Nullable Output predefinedMetricSpecification) {
            $.predefinedMetricSpecification = predefinedMetricSpecification;
            return this;
        }

        /**
         * @param predefinedMetricSpecification Predefined metric. See supported fields below.
         * 
         * @return builder
         * 
         */
        public Builder predefinedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs predefinedMetricSpecification) {
            return predefinedMetricSpecification(Output.of(predefinedMetricSpecification));
        }

        /**
         * @param scaleInCooldown Amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
         * 
         * @return builder
         * 
         */
        public Builder scaleInCooldown(@Nullable Output scaleInCooldown) {
            $.scaleInCooldown = scaleInCooldown;
            return this;
        }

        /**
         * @param scaleInCooldown Amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
         * 
         * @return builder
         * 
         */
        public Builder scaleInCooldown(Integer scaleInCooldown) {
            return scaleInCooldown(Output.of(scaleInCooldown));
        }

        /**
         * @param scaleOutCooldown Amount of time, in seconds, after a scale out activity completes before another scale out activity can start.
         * 
         * @return builder
         * 
         */
        public Builder scaleOutCooldown(@Nullable Output scaleOutCooldown) {
            $.scaleOutCooldown = scaleOutCooldown;
            return this;
        }

        /**
         * @param scaleOutCooldown Amount of time, in seconds, after a scale out activity completes before another scale out activity can start.
         * 
         * @return builder
         * 
         */
        public Builder scaleOutCooldown(Integer scaleOutCooldown) {
            return scaleOutCooldown(Output.of(scaleOutCooldown));
        }

        /**
         * @param targetValue Target value for the metric.
         * 
         * @return builder
         * 
         */
        public Builder targetValue(Output targetValue) {
            $.targetValue = targetValue;
            return this;
        }

        /**
         * @param targetValue Target value for the metric.
         * 
         * @return builder
         * 
         */
        public Builder targetValue(Double targetValue) {
            return targetValue(Output.of(targetValue));
        }

        public PolicyTargetTrackingScalingPolicyConfigurationArgs build() {
            if ($.targetValue == null) {
                throw new MissingRequiredPropertyException("PolicyTargetTrackingScalingPolicyConfigurationArgs", "targetValue");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy