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

com.pulumi.azurenative.alertsmanagement.SmartDetectorAlertRuleArgs Maven / Gradle / Ivy

There is a newer version: 2.89.2
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.alertsmanagement;

import com.pulumi.azurenative.alertsmanagement.enums.AlertRuleState;
import com.pulumi.azurenative.alertsmanagement.enums.Severity;
import com.pulumi.azurenative.alertsmanagement.inputs.ActionGroupsInformationArgs;
import com.pulumi.azurenative.alertsmanagement.inputs.DetectorArgs;
import com.pulumi.azurenative.alertsmanagement.inputs.ThrottlingInformationArgs;
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.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SmartDetectorAlertRuleArgs Empty = new SmartDetectorAlertRuleArgs();

    /**
     * The alert rule actions.
     * 
     */
    @Import(name="actionGroups", required=true)
    private Output actionGroups;

    /**
     * @return The alert rule actions.
     * 
     */
    public Output actionGroups() {
        return this.actionGroups;
    }

    /**
     * The name of the alert rule.
     * 
     */
    @Import(name="alertRuleName")
    private @Nullable Output alertRuleName;

    /**
     * @return The name of the alert rule.
     * 
     */
    public Optional> alertRuleName() {
        return Optional.ofNullable(this.alertRuleName);
    }

    /**
     * The alert rule description.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return The alert rule description.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The alert rule's detector.
     * 
     */
    @Import(name="detector", required=true)
    private Output detector;

    /**
     * @return The alert rule's detector.
     * 
     */
    public Output detector() {
        return this.detector;
    }

    /**
     * The alert rule frequency in ISO8601 format. The time granularity must be in minutes and minimum value is 1 minute, depending on the detector.
     * 
     */
    @Import(name="frequency", required=true)
    private Output frequency;

    /**
     * @return The alert rule frequency in ISO8601 format. The time granularity must be in minutes and minimum value is 1 minute, depending on the detector.
     * 
     */
    public Output frequency() {
        return this.frequency;
    }

    /**
     * The resource location.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The resource location.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The name of the resource group.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The alert rule resources scope.
     * 
     */
    @Import(name="scope", required=true)
    private Output> scope;

    /**
     * @return The alert rule resources scope.
     * 
     */
    public Output> scope() {
        return this.scope;
    }

    /**
     * The alert rule severity.
     * 
     */
    @Import(name="severity", required=true)
    private Output> severity;

    /**
     * @return The alert rule severity.
     * 
     */
    public Output> severity() {
        return this.severity;
    }

    /**
     * The alert rule state.
     * 
     */
    @Import(name="state", required=true)
    private Output> state;

    /**
     * @return The alert rule state.
     * 
     */
    public Output> state() {
        return this.state;
    }

    /**
     * The resource tags.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return The resource tags.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The alert rule throttling information.
     * 
     */
    @Import(name="throttling")
    private @Nullable Output throttling;

    /**
     * @return The alert rule throttling information.
     * 
     */
    public Optional> throttling() {
        return Optional.ofNullable(this.throttling);
    }

    private SmartDetectorAlertRuleArgs() {}

    private SmartDetectorAlertRuleArgs(SmartDetectorAlertRuleArgs $) {
        this.actionGroups = $.actionGroups;
        this.alertRuleName = $.alertRuleName;
        this.description = $.description;
        this.detector = $.detector;
        this.frequency = $.frequency;
        this.location = $.location;
        this.resourceGroupName = $.resourceGroupName;
        this.scope = $.scope;
        this.severity = $.severity;
        this.state = $.state;
        this.tags = $.tags;
        this.throttling = $.throttling;
    }

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

    public static final class Builder {
        private SmartDetectorAlertRuleArgs $;

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

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

        /**
         * @param actionGroups The alert rule actions.
         * 
         * @return builder
         * 
         */
        public Builder actionGroups(Output actionGroups) {
            $.actionGroups = actionGroups;
            return this;
        }

        /**
         * @param actionGroups The alert rule actions.
         * 
         * @return builder
         * 
         */
        public Builder actionGroups(ActionGroupsInformationArgs actionGroups) {
            return actionGroups(Output.of(actionGroups));
        }

        /**
         * @param alertRuleName The name of the alert rule.
         * 
         * @return builder
         * 
         */
        public Builder alertRuleName(@Nullable Output alertRuleName) {
            $.alertRuleName = alertRuleName;
            return this;
        }

        /**
         * @param alertRuleName The name of the alert rule.
         * 
         * @return builder
         * 
         */
        public Builder alertRuleName(String alertRuleName) {
            return alertRuleName(Output.of(alertRuleName));
        }

        /**
         * @param description The alert rule description.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description The alert rule description.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param detector The alert rule's detector.
         * 
         * @return builder
         * 
         */
        public Builder detector(Output detector) {
            $.detector = detector;
            return this;
        }

        /**
         * @param detector The alert rule's detector.
         * 
         * @return builder
         * 
         */
        public Builder detector(DetectorArgs detector) {
            return detector(Output.of(detector));
        }

        /**
         * @param frequency The alert rule frequency in ISO8601 format. The time granularity must be in minutes and minimum value is 1 minute, depending on the detector.
         * 
         * @return builder
         * 
         */
        public Builder frequency(Output frequency) {
            $.frequency = frequency;
            return this;
        }

        /**
         * @param frequency The alert rule frequency in ISO8601 format. The time granularity must be in minutes and minimum value is 1 minute, depending on the detector.
         * 
         * @return builder
         * 
         */
        public Builder frequency(String frequency) {
            return frequency(Output.of(frequency));
        }

        /**
         * @param location The resource location.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The resource location.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param scope The alert rule resources scope.
         * 
         * @return builder
         * 
         */
        public Builder scope(Output> scope) {
            $.scope = scope;
            return this;
        }

        /**
         * @param scope The alert rule resources scope.
         * 
         * @return builder
         * 
         */
        public Builder scope(List scope) {
            return scope(Output.of(scope));
        }

        /**
         * @param scope The alert rule resources scope.
         * 
         * @return builder
         * 
         */
        public Builder scope(String... scope) {
            return scope(List.of(scope));
        }

        /**
         * @param severity The alert rule severity.
         * 
         * @return builder
         * 
         */
        public Builder severity(Output> severity) {
            $.severity = severity;
            return this;
        }

        /**
         * @param severity The alert rule severity.
         * 
         * @return builder
         * 
         */
        public Builder severity(Either severity) {
            return severity(Output.of(severity));
        }

        /**
         * @param severity The alert rule severity.
         * 
         * @return builder
         * 
         */
        public Builder severity(String severity) {
            return severity(Either.ofLeft(severity));
        }

        /**
         * @param severity The alert rule severity.
         * 
         * @return builder
         * 
         */
        public Builder severity(Severity severity) {
            return severity(Either.ofRight(severity));
        }

        /**
         * @param state The alert rule state.
         * 
         * @return builder
         * 
         */
        public Builder state(Output> state) {
            $.state = state;
            return this;
        }

        /**
         * @param state The alert rule state.
         * 
         * @return builder
         * 
         */
        public Builder state(Either state) {
            return state(Output.of(state));
        }

        /**
         * @param state The alert rule state.
         * 
         * @return builder
         * 
         */
        public Builder state(String state) {
            return state(Either.ofLeft(state));
        }

        /**
         * @param state The alert rule state.
         * 
         * @return builder
         * 
         */
        public Builder state(AlertRuleState state) {
            return state(Either.ofRight(state));
        }

        /**
         * @param tags The resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags The resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param throttling The alert rule throttling information.
         * 
         * @return builder
         * 
         */
        public Builder throttling(@Nullable Output throttling) {
            $.throttling = throttling;
            return this;
        }

        /**
         * @param throttling The alert rule throttling information.
         * 
         * @return builder
         * 
         */
        public Builder throttling(ThrottlingInformationArgs throttling) {
            return throttling(Output.of(throttling));
        }

        public SmartDetectorAlertRuleArgs build() {
            if ($.actionGroups == null) {
                throw new MissingRequiredPropertyException("SmartDetectorAlertRuleArgs", "actionGroups");
            }
            if ($.detector == null) {
                throw new MissingRequiredPropertyException("SmartDetectorAlertRuleArgs", "detector");
            }
            if ($.frequency == null) {
                throw new MissingRequiredPropertyException("SmartDetectorAlertRuleArgs", "frequency");
            }
            $.location = Codegen.stringProp("location").output().arg($.location).def("global").getNullable();
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("SmartDetectorAlertRuleArgs", "resourceGroupName");
            }
            if ($.scope == null) {
                throw new MissingRequiredPropertyException("SmartDetectorAlertRuleArgs", "scope");
            }
            if ($.severity == null) {
                throw new MissingRequiredPropertyException("SmartDetectorAlertRuleArgs", "severity");
            }
            if ($.state == null) {
                throw new MissingRequiredPropertyException("SmartDetectorAlertRuleArgs", "state");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy