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

com.pulumi.aws.autoscalingplans.ScalingPlanArgs 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.autoscalingplans;

import com.pulumi.aws.autoscalingplans.inputs.ScalingPlanApplicationSourceArgs;
import com.pulumi.aws.autoscalingplans.inputs.ScalingPlanScalingInstructionArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ScalingPlanArgs Empty = new ScalingPlanArgs();

    /**
     * CloudFormation stack or set of tags. You can create one scaling plan per application source.
     * 
     */
    @Import(name="applicationSource", required=true)
    private Output applicationSource;

    /**
     * @return CloudFormation stack or set of tags. You can create one scaling plan per application source.
     * 
     */
    public Output applicationSource() {
        return this.applicationSource;
    }

    /**
     * Name of the scaling plan. Names cannot contain vertical bars, colons, or forward slashes.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Name of the scaling plan. Names cannot contain vertical bars, colons, or forward slashes.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Scaling instructions. More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html).
     * 
     */
    @Import(name="scalingInstructions", required=true)
    private Output> scalingInstructions;

    /**
     * @return Scaling instructions. More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html).
     * 
     */
    public Output> scalingInstructions() {
        return this.scalingInstructions;
    }

    private ScalingPlanArgs() {}

    private ScalingPlanArgs(ScalingPlanArgs $) {
        this.applicationSource = $.applicationSource;
        this.name = $.name;
        this.scalingInstructions = $.scalingInstructions;
    }

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

    public static final class Builder {
        private ScalingPlanArgs $;

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

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

        /**
         * @param applicationSource CloudFormation stack or set of tags. You can create one scaling plan per application source.
         * 
         * @return builder
         * 
         */
        public Builder applicationSource(Output applicationSource) {
            $.applicationSource = applicationSource;
            return this;
        }

        /**
         * @param applicationSource CloudFormation stack or set of tags. You can create one scaling plan per application source.
         * 
         * @return builder
         * 
         */
        public Builder applicationSource(ScalingPlanApplicationSourceArgs applicationSource) {
            return applicationSource(Output.of(applicationSource));
        }

        /**
         * @param name Name of the scaling plan. Names cannot contain vertical bars, colons, or forward slashes.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the scaling plan. Names cannot contain vertical bars, colons, or forward slashes.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param scalingInstructions Scaling instructions. More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html).
         * 
         * @return builder
         * 
         */
        public Builder scalingInstructions(Output> scalingInstructions) {
            $.scalingInstructions = scalingInstructions;
            return this;
        }

        /**
         * @param scalingInstructions Scaling instructions. More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html).
         * 
         * @return builder
         * 
         */
        public Builder scalingInstructions(List scalingInstructions) {
            return scalingInstructions(Output.of(scalingInstructions));
        }

        /**
         * @param scalingInstructions Scaling instructions. More details can be found in the [AWS Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html).
         * 
         * @return builder
         * 
         */
        public Builder scalingInstructions(ScalingPlanScalingInstructionArgs... scalingInstructions) {
            return scalingInstructions(List.of(scalingInstructions));
        }

        public ScalingPlanArgs build() {
            if ($.applicationSource == null) {
                throw new MissingRequiredPropertyException("ScalingPlanArgs", "applicationSource");
            }
            if ($.scalingInstructions == null) {
                throw new MissingRequiredPropertyException("ScalingPlanArgs", "scalingInstructions");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy