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

com.pulumi.azure.monitoring.AutoscaleSettingArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.15.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.azure.monitoring;

import com.pulumi.azure.monitoring.inputs.AutoscaleSettingNotificationArgs;
import com.pulumi.azure.monitoring.inputs.AutoscaleSettingPredictiveArgs;
import com.pulumi.azure.monitoring.inputs.AutoscaleSettingProfileArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final AutoscaleSettingArgs Empty = new AutoscaleSettingArgs();

    /**
     * Specifies whether automatic scaling is enabled for the target resource. Defaults to `true`.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Specifies whether automatic scaling is enabled for the target resource. Defaults to `true`.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * Specifies the supported Azure location where the AutoScale Setting should exist. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Specifies the supported Azure location where the AutoScale Setting should exist. Changing this forces a new resource to be created.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The name of the AutoScale Setting. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the AutoScale Setting. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Specifies a `notification` block as defined below.
     * 
     */
    @Import(name="notification")
    private @Nullable Output notification;

    /**
     * @return Specifies a `notification` block as defined below.
     * 
     */
    public Optional> notification() {
        return Optional.ofNullable(this.notification);
    }

    /**
     * A `predictive` block as defined below.
     * 
     */
    @Import(name="predictive")
    private @Nullable Output predictive;

    /**
     * @return A `predictive` block as defined below.
     * 
     */
    public Optional> predictive() {
        return Optional.ofNullable(this.predictive);
    }

    /**
     * Specifies one or more (up to 20) `profile` blocks as defined below.
     * 
     */
    @Import(name="profiles", required=true)
    private Output> profiles;

    /**
     * @return Specifies one or more (up to 20) `profile` blocks as defined below.
     * 
     */
    public Output> profiles() {
        return this.profiles;
    }

    /**
     * The name of the Resource Group in the AutoScale Setting should be created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the Resource Group in the AutoScale Setting should be created. Changing this forces a new resource to be created.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * Specifies the resource ID of the resource that the autoscale setting should be added to. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="targetResourceId", required=true)
    private Output targetResourceId;

    /**
     * @return Specifies the resource ID of the resource that the autoscale setting should be added to. Changing this forces a new resource to be created.
     * 
     */
    public Output targetResourceId() {
        return this.targetResourceId;
    }

    private AutoscaleSettingArgs() {}

    private AutoscaleSettingArgs(AutoscaleSettingArgs $) {
        this.enabled = $.enabled;
        this.location = $.location;
        this.name = $.name;
        this.notification = $.notification;
        this.predictive = $.predictive;
        this.profiles = $.profiles;
        this.resourceGroupName = $.resourceGroupName;
        this.tags = $.tags;
        this.targetResourceId = $.targetResourceId;
    }

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

    public static final class Builder {
        private AutoscaleSettingArgs $;

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

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

        /**
         * @param enabled Specifies whether automatic scaling is enabled for the target resource. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Specifies whether automatic scaling is enabled for the target resource. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param location Specifies the supported Azure location where the AutoScale Setting should exist. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Specifies the supported Azure location where the AutoScale Setting should exist. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param name The name of the AutoScale Setting. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the AutoScale Setting. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param notification Specifies a `notification` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder notification(@Nullable Output notification) {
            $.notification = notification;
            return this;
        }

        /**
         * @param notification Specifies a `notification` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder notification(AutoscaleSettingNotificationArgs notification) {
            return notification(Output.of(notification));
        }

        /**
         * @param predictive A `predictive` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder predictive(@Nullable Output predictive) {
            $.predictive = predictive;
            return this;
        }

        /**
         * @param predictive A `predictive` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder predictive(AutoscaleSettingPredictiveArgs predictive) {
            return predictive(Output.of(predictive));
        }

        /**
         * @param profiles Specifies one or more (up to 20) `profile` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder profiles(Output> profiles) {
            $.profiles = profiles;
            return this;
        }

        /**
         * @param profiles Specifies one or more (up to 20) `profile` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder profiles(List profiles) {
            return profiles(Output.of(profiles));
        }

        /**
         * @param profiles Specifies one or more (up to 20) `profile` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder profiles(AutoscaleSettingProfileArgs... profiles) {
            return profiles(List.of(profiles));
        }

        /**
         * @param resourceGroupName The name of the Resource Group in the AutoScale Setting should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the Resource Group in the AutoScale Setting should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param targetResourceId Specifies the resource ID of the resource that the autoscale setting should be added to. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder targetResourceId(Output targetResourceId) {
            $.targetResourceId = targetResourceId;
            return this;
        }

        /**
         * @param targetResourceId Specifies the resource ID of the resource that the autoscale setting should be added to. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder targetResourceId(String targetResourceId) {
            return targetResourceId(Output.of(targetResourceId));
        }

        public AutoscaleSettingArgs build() {
            if ($.profiles == null) {
                throw new MissingRequiredPropertyException("AutoscaleSettingArgs", "profiles");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("AutoscaleSettingArgs", "resourceGroupName");
            }
            if ($.targetResourceId == null) {
                throw new MissingRequiredPropertyException("AutoscaleSettingArgs", "targetResourceId");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy