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

com.pulumi.azurenative.insights.inputs.DynamicMetricCriteriaArgs Maven / Gradle / Ivy

There is a newer version: 2.82.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.azurenative.insights.inputs;

import com.pulumi.azurenative.insights.enums.AggregationTypeEnum;
import com.pulumi.azurenative.insights.enums.DynamicThresholdOperator;
import com.pulumi.azurenative.insights.enums.DynamicThresholdSensitivity;
import com.pulumi.azurenative.insights.inputs.DynamicThresholdFailingPeriodsArgs;
import com.pulumi.azurenative.insights.inputs.MetricDimensionArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Criterion for dynamic threshold.
 * 
 */
public final class DynamicMetricCriteriaArgs extends com.pulumi.resources.ResourceArgs {

    public static final DynamicMetricCriteriaArgs Empty = new DynamicMetricCriteriaArgs();

    /**
     * The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.
     * 
     */
    @Import(name="alertSensitivity", required=true)
    private Output> alertSensitivity;

    /**
     * @return The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.
     * 
     */
    public Output> alertSensitivity() {
        return this.alertSensitivity;
    }

    /**
     * Specifies the type of threshold criteria
     * Expected value is 'DynamicThresholdCriterion'.
     * 
     */
    @Import(name="criterionType", required=true)
    private Output criterionType;

    /**
     * @return Specifies the type of threshold criteria
     * Expected value is 'DynamicThresholdCriterion'.
     * 
     */
    public Output criterionType() {
        return this.criterionType;
    }

    /**
     * List of dimension conditions.
     * 
     */
    @Import(name="dimensions")
    private @Nullable Output> dimensions;

    /**
     * @return List of dimension conditions.
     * 
     */
    public Optional>> dimensions() {
        return Optional.ofNullable(this.dimensions);
    }

    /**
     * The minimum number of violations required within the selected lookback time window required to raise an alert.
     * 
     */
    @Import(name="failingPeriods", required=true)
    private Output failingPeriods;

    /**
     * @return The minimum number of violations required within the selected lookback time window required to raise an alert.
     * 
     */
    public Output failingPeriods() {
        return this.failingPeriods;
    }

    /**
     * Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)
     * 
     */
    @Import(name="ignoreDataBefore")
    private @Nullable Output ignoreDataBefore;

    /**
     * @return Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)
     * 
     */
    public Optional> ignoreDataBefore() {
        return Optional.ofNullable(this.ignoreDataBefore);
    }

    /**
     * Name of the metric.
     * 
     */
    @Import(name="metricName", required=true)
    private Output metricName;

    /**
     * @return Name of the metric.
     * 
     */
    public Output metricName() {
        return this.metricName;
    }

    /**
     * Namespace of the metric.
     * 
     */
    @Import(name="metricNamespace")
    private @Nullable Output metricNamespace;

    /**
     * @return Namespace of the metric.
     * 
     */
    public Optional> metricNamespace() {
        return Optional.ofNullable(this.metricNamespace);
    }

    /**
     * Name of the criteria.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return Name of the criteria.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * The operator used to compare the metric value against the threshold.
     * 
     */
    @Import(name="operator", required=true)
    private Output> operator;

    /**
     * @return The operator used to compare the metric value against the threshold.
     * 
     */
    public Output> operator() {
        return this.operator;
    }

    /**
     * Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
     * 
     */
    @Import(name="skipMetricValidation")
    private @Nullable Output skipMetricValidation;

    /**
     * @return Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
     * 
     */
    public Optional> skipMetricValidation() {
        return Optional.ofNullable(this.skipMetricValidation);
    }

    /**
     * the criteria time aggregation types.
     * 
     */
    @Import(name="timeAggregation", required=true)
    private Output> timeAggregation;

    /**
     * @return the criteria time aggregation types.
     * 
     */
    public Output> timeAggregation() {
        return this.timeAggregation;
    }

    private DynamicMetricCriteriaArgs() {}

    private DynamicMetricCriteriaArgs(DynamicMetricCriteriaArgs $) {
        this.alertSensitivity = $.alertSensitivity;
        this.criterionType = $.criterionType;
        this.dimensions = $.dimensions;
        this.failingPeriods = $.failingPeriods;
        this.ignoreDataBefore = $.ignoreDataBefore;
        this.metricName = $.metricName;
        this.metricNamespace = $.metricNamespace;
        this.name = $.name;
        this.operator = $.operator;
        this.skipMetricValidation = $.skipMetricValidation;
        this.timeAggregation = $.timeAggregation;
    }

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

    public static final class Builder {
        private DynamicMetricCriteriaArgs $;

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

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

        /**
         * @param alertSensitivity The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.
         * 
         * @return builder
         * 
         */
        public Builder alertSensitivity(Output> alertSensitivity) {
            $.alertSensitivity = alertSensitivity;
            return this;
        }

        /**
         * @param alertSensitivity The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.
         * 
         * @return builder
         * 
         */
        public Builder alertSensitivity(Either alertSensitivity) {
            return alertSensitivity(Output.of(alertSensitivity));
        }

        /**
         * @param alertSensitivity The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.
         * 
         * @return builder
         * 
         */
        public Builder alertSensitivity(String alertSensitivity) {
            return alertSensitivity(Either.ofLeft(alertSensitivity));
        }

        /**
         * @param alertSensitivity The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.
         * 
         * @return builder
         * 
         */
        public Builder alertSensitivity(DynamicThresholdSensitivity alertSensitivity) {
            return alertSensitivity(Either.ofRight(alertSensitivity));
        }

        /**
         * @param criterionType Specifies the type of threshold criteria
         * Expected value is 'DynamicThresholdCriterion'.
         * 
         * @return builder
         * 
         */
        public Builder criterionType(Output criterionType) {
            $.criterionType = criterionType;
            return this;
        }

        /**
         * @param criterionType Specifies the type of threshold criteria
         * Expected value is 'DynamicThresholdCriterion'.
         * 
         * @return builder
         * 
         */
        public Builder criterionType(String criterionType) {
            return criterionType(Output.of(criterionType));
        }

        /**
         * @param dimensions List of dimension conditions.
         * 
         * @return builder
         * 
         */
        public Builder dimensions(@Nullable Output> dimensions) {
            $.dimensions = dimensions;
            return this;
        }

        /**
         * @param dimensions List of dimension conditions.
         * 
         * @return builder
         * 
         */
        public Builder dimensions(List dimensions) {
            return dimensions(Output.of(dimensions));
        }

        /**
         * @param dimensions List of dimension conditions.
         * 
         * @return builder
         * 
         */
        public Builder dimensions(MetricDimensionArgs... dimensions) {
            return dimensions(List.of(dimensions));
        }

        /**
         * @param failingPeriods The minimum number of violations required within the selected lookback time window required to raise an alert.
         * 
         * @return builder
         * 
         */
        public Builder failingPeriods(Output failingPeriods) {
            $.failingPeriods = failingPeriods;
            return this;
        }

        /**
         * @param failingPeriods The minimum number of violations required within the selected lookback time window required to raise an alert.
         * 
         * @return builder
         * 
         */
        public Builder failingPeriods(DynamicThresholdFailingPeriodsArgs failingPeriods) {
            return failingPeriods(Output.of(failingPeriods));
        }

        /**
         * @param ignoreDataBefore Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)
         * 
         * @return builder
         * 
         */
        public Builder ignoreDataBefore(@Nullable Output ignoreDataBefore) {
            $.ignoreDataBefore = ignoreDataBefore;
            return this;
        }

        /**
         * @param ignoreDataBefore Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)
         * 
         * @return builder
         * 
         */
        public Builder ignoreDataBefore(String ignoreDataBefore) {
            return ignoreDataBefore(Output.of(ignoreDataBefore));
        }

        /**
         * @param metricName Name of the metric.
         * 
         * @return builder
         * 
         */
        public Builder metricName(Output metricName) {
            $.metricName = metricName;
            return this;
        }

        /**
         * @param metricName Name of the metric.
         * 
         * @return builder
         * 
         */
        public Builder metricName(String metricName) {
            return metricName(Output.of(metricName));
        }

        /**
         * @param metricNamespace Namespace of the metric.
         * 
         * @return builder
         * 
         */
        public Builder metricNamespace(@Nullable Output metricNamespace) {
            $.metricNamespace = metricNamespace;
            return this;
        }

        /**
         * @param metricNamespace Namespace of the metric.
         * 
         * @return builder
         * 
         */
        public Builder metricNamespace(String metricNamespace) {
            return metricNamespace(Output.of(metricNamespace));
        }

        /**
         * @param name Name of the criteria.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the criteria.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param operator The operator used to compare the metric value against the threshold.
         * 
         * @return builder
         * 
         */
        public Builder operator(Output> operator) {
            $.operator = operator;
            return this;
        }

        /**
         * @param operator The operator used to compare the metric value against the threshold.
         * 
         * @return builder
         * 
         */
        public Builder operator(Either operator) {
            return operator(Output.of(operator));
        }

        /**
         * @param operator The operator used to compare the metric value against the threshold.
         * 
         * @return builder
         * 
         */
        public Builder operator(String operator) {
            return operator(Either.ofLeft(operator));
        }

        /**
         * @param operator The operator used to compare the metric value against the threshold.
         * 
         * @return builder
         * 
         */
        public Builder operator(DynamicThresholdOperator operator) {
            return operator(Either.ofRight(operator));
        }

        /**
         * @param skipMetricValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
         * 
         * @return builder
         * 
         */
        public Builder skipMetricValidation(@Nullable Output skipMetricValidation) {
            $.skipMetricValidation = skipMetricValidation;
            return this;
        }

        /**
         * @param skipMetricValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
         * 
         * @return builder
         * 
         */
        public Builder skipMetricValidation(Boolean skipMetricValidation) {
            return skipMetricValidation(Output.of(skipMetricValidation));
        }

        /**
         * @param timeAggregation the criteria time aggregation types.
         * 
         * @return builder
         * 
         */
        public Builder timeAggregation(Output> timeAggregation) {
            $.timeAggregation = timeAggregation;
            return this;
        }

        /**
         * @param timeAggregation the criteria time aggregation types.
         * 
         * @return builder
         * 
         */
        public Builder timeAggregation(Either timeAggregation) {
            return timeAggregation(Output.of(timeAggregation));
        }

        /**
         * @param timeAggregation the criteria time aggregation types.
         * 
         * @return builder
         * 
         */
        public Builder timeAggregation(String timeAggregation) {
            return timeAggregation(Either.ofLeft(timeAggregation));
        }

        /**
         * @param timeAggregation the criteria time aggregation types.
         * 
         * @return builder
         * 
         */
        public Builder timeAggregation(AggregationTypeEnum timeAggregation) {
            return timeAggregation(Either.ofRight(timeAggregation));
        }

        public DynamicMetricCriteriaArgs build() {
            if ($.alertSensitivity == null) {
                throw new MissingRequiredPropertyException("DynamicMetricCriteriaArgs", "alertSensitivity");
            }
            $.criterionType = Codegen.stringProp("criterionType").output().arg($.criterionType).require();
            if ($.failingPeriods == null) {
                throw new MissingRequiredPropertyException("DynamicMetricCriteriaArgs", "failingPeriods");
            }
            if ($.metricName == null) {
                throw new MissingRequiredPropertyException("DynamicMetricCriteriaArgs", "metricName");
            }
            if ($.name == null) {
                throw new MissingRequiredPropertyException("DynamicMetricCriteriaArgs", "name");
            }
            if ($.operator == null) {
                throw new MissingRequiredPropertyException("DynamicMetricCriteriaArgs", "operator");
            }
            if ($.timeAggregation == null) {
                throw new MissingRequiredPropertyException("DynamicMetricCriteriaArgs", "timeAggregation");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy