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

com.pulumi.azure.monitoring.inputs.AutoscaleSettingProfileRuleMetricTriggerArgs 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.10.0-alpha.1731737215
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.inputs;

import com.pulumi.azure.monitoring.inputs.AutoscaleSettingProfileRuleMetricTriggerDimensionArgs;
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.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final AutoscaleSettingProfileRuleMetricTriggerArgs Empty = new AutoscaleSettingProfileRuleMetricTriggerArgs();

    /**
     * One or more `dimensions` block as defined below.
     * 
     */
    @Import(name="dimensions")
    private @Nullable Output> dimensions;

    /**
     * @return One or more `dimensions` block as defined below.
     * 
     */
    public Optional>> dimensions() {
        return Optional.ofNullable(this.dimensions);
    }

    /**
     * Whether to enable metric divide by instance count.
     * 
     */
    @Import(name="divideByInstanceCount")
    private @Nullable Output divideByInstanceCount;

    /**
     * @return Whether to enable metric divide by instance count.
     * 
     */
    public Optional> divideByInstanceCount() {
        return Optional.ofNullable(this.divideByInstanceCount);
    }

    /**
     * The name of the metric that defines what the rule monitors, such as `Percentage CPU` for `Virtual Machine Scale Sets` and `CpuPercentage` for `App Service Plan`.
     * 
     * > **NOTE:** The allowed value of `metric_name` highly depends on the targeting resource type, please visit [Supported metrics with Azure Monitor](https://docs.microsoft.com/azure/azure-monitor/platform/metrics-supported) for more details.
     * 
     */
    @Import(name="metricName", required=true)
    private Output metricName;

    /**
     * @return The name of the metric that defines what the rule monitors, such as `Percentage CPU` for `Virtual Machine Scale Sets` and `CpuPercentage` for `App Service Plan`.
     * 
     * > **NOTE:** The allowed value of `metric_name` highly depends on the targeting resource type, please visit [Supported metrics with Azure Monitor](https://docs.microsoft.com/azure/azure-monitor/platform/metrics-supported) for more details.
     * 
     */
    public Output metricName() {
        return this.metricName;
    }

    /**
     * The namespace of the metric that defines what the rule monitors, such as `microsoft.compute/virtualmachinescalesets` for `Virtual Machine Scale Sets`.
     * 
     */
    @Import(name="metricNamespace")
    private @Nullable Output metricNamespace;

    /**
     * @return The namespace of the metric that defines what the rule monitors, such as `microsoft.compute/virtualmachinescalesets` for `Virtual Machine Scale Sets`.
     * 
     */
    public Optional> metricNamespace() {
        return Optional.ofNullable(this.metricNamespace);
    }

    /**
     * The ID of the Resource which the Rule monitors.
     * 
     */
    @Import(name="metricResourceId", required=true)
    private Output metricResourceId;

    /**
     * @return The ID of the Resource which the Rule monitors.
     * 
     */
    public Output metricResourceId() {
        return this.metricResourceId;
    }

    /**
     * Specifies the operator used to compare the metric data and threshold. Possible values are: `Equals`, `NotEquals`, `GreaterThan`, `GreaterThanOrEqual`, `LessThan`, `LessThanOrEqual`.
     * 
     */
    @Import(name="operator", required=true)
    private Output operator;

    /**
     * @return Specifies the operator used to compare the metric data and threshold. Possible values are: `Equals`, `NotEquals`, `GreaterThan`, `GreaterThanOrEqual`, `LessThan`, `LessThanOrEqual`.
     * 
     */
    public Output operator() {
        return this.operator;
    }

    /**
     * Specifies how the metrics from multiple instances are combined. Possible values are `Average`, `Max`, `Min` and `Sum`.
     * 
     */
    @Import(name="statistic", required=true)
    private Output statistic;

    /**
     * @return Specifies how the metrics from multiple instances are combined. Possible values are `Average`, `Max`, `Min` and `Sum`.
     * 
     */
    public Output statistic() {
        return this.statistic;
    }

    /**
     * Specifies the threshold of the metric that triggers the scale action.
     * 
     */
    @Import(name="threshold", required=true)
    private Output threshold;

    /**
     * @return Specifies the threshold of the metric that triggers the scale action.
     * 
     */
    public Output threshold() {
        return this.threshold;
    }

    /**
     * Specifies how the data that's collected should be combined over time. Possible values include `Average`, `Count`, `Maximum`, `Minimum`, `Last` and `Total`.
     * 
     */
    @Import(name="timeAggregation", required=true)
    private Output timeAggregation;

    /**
     * @return Specifies how the data that's collected should be combined over time. Possible values include `Average`, `Count`, `Maximum`, `Minimum`, `Last` and `Total`.
     * 
     */
    public Output timeAggregation() {
        return this.timeAggregation;
    }

    /**
     * Specifies the granularity of metrics that the rule monitors, which must be one of the pre-defined values returned from the metric definitions for the metric. This value must be between 1 minute and 12 hours an be formatted as an ISO 8601 string.
     * 
     */
    @Import(name="timeGrain", required=true)
    private Output timeGrain;

    /**
     * @return Specifies the granularity of metrics that the rule monitors, which must be one of the pre-defined values returned from the metric definitions for the metric. This value must be between 1 minute and 12 hours an be formatted as an ISO 8601 string.
     * 
     */
    public Output timeGrain() {
        return this.timeGrain;
    }

    /**
     * Specifies the time range for which data is collected, which must be greater than the delay in metric collection (which varies from resource to resource). This value must be between 5 minutes and 12 hours and be formatted as an ISO 8601 string.
     * 
     */
    @Import(name="timeWindow", required=true)
    private Output timeWindow;

    /**
     * @return Specifies the time range for which data is collected, which must be greater than the delay in metric collection (which varies from resource to resource). This value must be between 5 minutes and 12 hours and be formatted as an ISO 8601 string.
     * 
     */
    public Output timeWindow() {
        return this.timeWindow;
    }

    private AutoscaleSettingProfileRuleMetricTriggerArgs() {}

    private AutoscaleSettingProfileRuleMetricTriggerArgs(AutoscaleSettingProfileRuleMetricTriggerArgs $) {
        this.dimensions = $.dimensions;
        this.divideByInstanceCount = $.divideByInstanceCount;
        this.metricName = $.metricName;
        this.metricNamespace = $.metricNamespace;
        this.metricResourceId = $.metricResourceId;
        this.operator = $.operator;
        this.statistic = $.statistic;
        this.threshold = $.threshold;
        this.timeAggregation = $.timeAggregation;
        this.timeGrain = $.timeGrain;
        this.timeWindow = $.timeWindow;
    }

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

    public static final class Builder {
        private AutoscaleSettingProfileRuleMetricTriggerArgs $;

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

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

        /**
         * @param dimensions One or more `dimensions` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder dimensions(@Nullable Output> dimensions) {
            $.dimensions = dimensions;
            return this;
        }

        /**
         * @param dimensions One or more `dimensions` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder dimensions(List dimensions) {
            return dimensions(Output.of(dimensions));
        }

        /**
         * @param dimensions One or more `dimensions` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder dimensions(AutoscaleSettingProfileRuleMetricTriggerDimensionArgs... dimensions) {
            return dimensions(List.of(dimensions));
        }

        /**
         * @param divideByInstanceCount Whether to enable metric divide by instance count.
         * 
         * @return builder
         * 
         */
        public Builder divideByInstanceCount(@Nullable Output divideByInstanceCount) {
            $.divideByInstanceCount = divideByInstanceCount;
            return this;
        }

        /**
         * @param divideByInstanceCount Whether to enable metric divide by instance count.
         * 
         * @return builder
         * 
         */
        public Builder divideByInstanceCount(Boolean divideByInstanceCount) {
            return divideByInstanceCount(Output.of(divideByInstanceCount));
        }

        /**
         * @param metricName The name of the metric that defines what the rule monitors, such as `Percentage CPU` for `Virtual Machine Scale Sets` and `CpuPercentage` for `App Service Plan`.
         * 
         * > **NOTE:** The allowed value of `metric_name` highly depends on the targeting resource type, please visit [Supported metrics with Azure Monitor](https://docs.microsoft.com/azure/azure-monitor/platform/metrics-supported) for more details.
         * 
         * @return builder
         * 
         */
        public Builder metricName(Output metricName) {
            $.metricName = metricName;
            return this;
        }

        /**
         * @param metricName The name of the metric that defines what the rule monitors, such as `Percentage CPU` for `Virtual Machine Scale Sets` and `CpuPercentage` for `App Service Plan`.
         * 
         * > **NOTE:** The allowed value of `metric_name` highly depends on the targeting resource type, please visit [Supported metrics with Azure Monitor](https://docs.microsoft.com/azure/azure-monitor/platform/metrics-supported) for more details.
         * 
         * @return builder
         * 
         */
        public Builder metricName(String metricName) {
            return metricName(Output.of(metricName));
        }

        /**
         * @param metricNamespace The namespace of the metric that defines what the rule monitors, such as `microsoft.compute/virtualmachinescalesets` for `Virtual Machine Scale Sets`.
         * 
         * @return builder
         * 
         */
        public Builder metricNamespace(@Nullable Output metricNamespace) {
            $.metricNamespace = metricNamespace;
            return this;
        }

        /**
         * @param metricNamespace The namespace of the metric that defines what the rule monitors, such as `microsoft.compute/virtualmachinescalesets` for `Virtual Machine Scale Sets`.
         * 
         * @return builder
         * 
         */
        public Builder metricNamespace(String metricNamespace) {
            return metricNamespace(Output.of(metricNamespace));
        }

        /**
         * @param metricResourceId The ID of the Resource which the Rule monitors.
         * 
         * @return builder
         * 
         */
        public Builder metricResourceId(Output metricResourceId) {
            $.metricResourceId = metricResourceId;
            return this;
        }

        /**
         * @param metricResourceId The ID of the Resource which the Rule monitors.
         * 
         * @return builder
         * 
         */
        public Builder metricResourceId(String metricResourceId) {
            return metricResourceId(Output.of(metricResourceId));
        }

        /**
         * @param operator Specifies the operator used to compare the metric data and threshold. Possible values are: `Equals`, `NotEquals`, `GreaterThan`, `GreaterThanOrEqual`, `LessThan`, `LessThanOrEqual`.
         * 
         * @return builder
         * 
         */
        public Builder operator(Output operator) {
            $.operator = operator;
            return this;
        }

        /**
         * @param operator Specifies the operator used to compare the metric data and threshold. Possible values are: `Equals`, `NotEquals`, `GreaterThan`, `GreaterThanOrEqual`, `LessThan`, `LessThanOrEqual`.
         * 
         * @return builder
         * 
         */
        public Builder operator(String operator) {
            return operator(Output.of(operator));
        }

        /**
         * @param statistic Specifies how the metrics from multiple instances are combined. Possible values are `Average`, `Max`, `Min` and `Sum`.
         * 
         * @return builder
         * 
         */
        public Builder statistic(Output statistic) {
            $.statistic = statistic;
            return this;
        }

        /**
         * @param statistic Specifies how the metrics from multiple instances are combined. Possible values are `Average`, `Max`, `Min` and `Sum`.
         * 
         * @return builder
         * 
         */
        public Builder statistic(String statistic) {
            return statistic(Output.of(statistic));
        }

        /**
         * @param threshold Specifies the threshold of the metric that triggers the scale action.
         * 
         * @return builder
         * 
         */
        public Builder threshold(Output threshold) {
            $.threshold = threshold;
            return this;
        }

        /**
         * @param threshold Specifies the threshold of the metric that triggers the scale action.
         * 
         * @return builder
         * 
         */
        public Builder threshold(Double threshold) {
            return threshold(Output.of(threshold));
        }

        /**
         * @param timeAggregation Specifies how the data that's collected should be combined over time. Possible values include `Average`, `Count`, `Maximum`, `Minimum`, `Last` and `Total`.
         * 
         * @return builder
         * 
         */
        public Builder timeAggregation(Output timeAggregation) {
            $.timeAggregation = timeAggregation;
            return this;
        }

        /**
         * @param timeAggregation Specifies how the data that's collected should be combined over time. Possible values include `Average`, `Count`, `Maximum`, `Minimum`, `Last` and `Total`.
         * 
         * @return builder
         * 
         */
        public Builder timeAggregation(String timeAggregation) {
            return timeAggregation(Output.of(timeAggregation));
        }

        /**
         * @param timeGrain Specifies the granularity of metrics that the rule monitors, which must be one of the pre-defined values returned from the metric definitions for the metric. This value must be between 1 minute and 12 hours an be formatted as an ISO 8601 string.
         * 
         * @return builder
         * 
         */
        public Builder timeGrain(Output timeGrain) {
            $.timeGrain = timeGrain;
            return this;
        }

        /**
         * @param timeGrain Specifies the granularity of metrics that the rule monitors, which must be one of the pre-defined values returned from the metric definitions for the metric. This value must be between 1 minute and 12 hours an be formatted as an ISO 8601 string.
         * 
         * @return builder
         * 
         */
        public Builder timeGrain(String timeGrain) {
            return timeGrain(Output.of(timeGrain));
        }

        /**
         * @param timeWindow Specifies the time range for which data is collected, which must be greater than the delay in metric collection (which varies from resource to resource). This value must be between 5 minutes and 12 hours and be formatted as an ISO 8601 string.
         * 
         * @return builder
         * 
         */
        public Builder timeWindow(Output timeWindow) {
            $.timeWindow = timeWindow;
            return this;
        }

        /**
         * @param timeWindow Specifies the time range for which data is collected, which must be greater than the delay in metric collection (which varies from resource to resource). This value must be between 5 minutes and 12 hours and be formatted as an ISO 8601 string.
         * 
         * @return builder
         * 
         */
        public Builder timeWindow(String timeWindow) {
            return timeWindow(Output.of(timeWindow));
        }

        public AutoscaleSettingProfileRuleMetricTriggerArgs build() {
            if ($.metricName == null) {
                throw new MissingRequiredPropertyException("AutoscaleSettingProfileRuleMetricTriggerArgs", "metricName");
            }
            if ($.metricResourceId == null) {
                throw new MissingRequiredPropertyException("AutoscaleSettingProfileRuleMetricTriggerArgs", "metricResourceId");
            }
            if ($.operator == null) {
                throw new MissingRequiredPropertyException("AutoscaleSettingProfileRuleMetricTriggerArgs", "operator");
            }
            if ($.statistic == null) {
                throw new MissingRequiredPropertyException("AutoscaleSettingProfileRuleMetricTriggerArgs", "statistic");
            }
            if ($.threshold == null) {
                throw new MissingRequiredPropertyException("AutoscaleSettingProfileRuleMetricTriggerArgs", "threshold");
            }
            if ($.timeAggregation == null) {
                throw new MissingRequiredPropertyException("AutoscaleSettingProfileRuleMetricTriggerArgs", "timeAggregation");
            }
            if ($.timeGrain == null) {
                throw new MissingRequiredPropertyException("AutoscaleSettingProfileRuleMetricTriggerArgs", "timeGrain");
            }
            if ($.timeWindow == null) {
                throw new MissingRequiredPropertyException("AutoscaleSettingProfileRuleMetricTriggerArgs", "timeWindow");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy