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

com.pulumi.aws.autoscaling.outputs.PolicyStepAdjustment Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

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.aws.autoscaling.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class PolicyStepAdjustment {
    /**
     * @return Lower bound for the
     * difference between the alarm threshold and the CloudWatch metric.
     * Without a value, AWS will treat this bound as negative infinity.
     * 
     */
    private @Nullable String metricIntervalLowerBound;
    /**
     * @return Upper bound for the
     * difference between the alarm threshold and the CloudWatch metric.
     * Without a value, AWS will treat this bound as positive infinity. The upper bound
     * must be greater than the lower bound.
     * 
     * Notice the bounds are **relative** to the alarm threshold, meaning that the starting point is not 0%, but the alarm threshold. Check the official [docs](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-steps) for a detailed example.
     * 
     * The following arguments are only available to "TargetTrackingScaling" type policies:
     * 
     */
    private @Nullable String metricIntervalUpperBound;
    /**
     * @return Number of members by which to
     * scale, when the adjustment bounds are breached. A positive value scales
     * up. A negative value scales down.
     * 
     */
    private Integer scalingAdjustment;

    private PolicyStepAdjustment() {}
    /**
     * @return Lower bound for the
     * difference between the alarm threshold and the CloudWatch metric.
     * Without a value, AWS will treat this bound as negative infinity.
     * 
     */
    public Optional metricIntervalLowerBound() {
        return Optional.ofNullable(this.metricIntervalLowerBound);
    }
    /**
     * @return Upper bound for the
     * difference between the alarm threshold and the CloudWatch metric.
     * Without a value, AWS will treat this bound as positive infinity. The upper bound
     * must be greater than the lower bound.
     * 
     * Notice the bounds are **relative** to the alarm threshold, meaning that the starting point is not 0%, but the alarm threshold. Check the official [docs](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-steps) for a detailed example.
     * 
     * The following arguments are only available to "TargetTrackingScaling" type policies:
     * 
     */
    public Optional metricIntervalUpperBound() {
        return Optional.ofNullable(this.metricIntervalUpperBound);
    }
    /**
     * @return Number of members by which to
     * scale, when the adjustment bounds are breached. A positive value scales
     * up. A negative value scales down.
     * 
     */
    public Integer scalingAdjustment() {
        return this.scalingAdjustment;
    }

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

    public static Builder builder(PolicyStepAdjustment defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String metricIntervalLowerBound;
        private @Nullable String metricIntervalUpperBound;
        private Integer scalingAdjustment;
        public Builder() {}
        public Builder(PolicyStepAdjustment defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.metricIntervalLowerBound = defaults.metricIntervalLowerBound;
    	      this.metricIntervalUpperBound = defaults.metricIntervalUpperBound;
    	      this.scalingAdjustment = defaults.scalingAdjustment;
        }

        @CustomType.Setter
        public Builder metricIntervalLowerBound(@Nullable String metricIntervalLowerBound) {

            this.metricIntervalLowerBound = metricIntervalLowerBound;
            return this;
        }
        @CustomType.Setter
        public Builder metricIntervalUpperBound(@Nullable String metricIntervalUpperBound) {

            this.metricIntervalUpperBound = metricIntervalUpperBound;
            return this;
        }
        @CustomType.Setter
        public Builder scalingAdjustment(Integer scalingAdjustment) {
            if (scalingAdjustment == null) {
              throw new MissingRequiredPropertyException("PolicyStepAdjustment", "scalingAdjustment");
            }
            this.scalingAdjustment = scalingAdjustment;
            return this;
        }
        public PolicyStepAdjustment build() {
            final var _resultValue = new PolicyStepAdjustment();
            _resultValue.metricIntervalLowerBound = metricIntervalLowerBound;
            _resultValue.metricIntervalUpperBound = metricIntervalUpperBound;
            _resultValue.scalingAdjustment = scalingAdjustment;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy