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

com.pulumi.azurenative.insights.ActivityLogAlertArgs Maven / Gradle / Ivy

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

import com.pulumi.azurenative.insights.inputs.ActionListArgs;
import com.pulumi.azurenative.insights.inputs.AlertRuleAllOfConditionArgs;
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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ActivityLogAlertArgs Empty = new ActivityLogAlertArgs();

    /**
     * The actions that will activate when the condition is met.
     * 
     */
    @Import(name="actions", required=true)
    private Output actions;

    /**
     * @return The actions that will activate when the condition is met.
     * 
     */
    public Output actions() {
        return this.actions;
    }

    /**
     * The name of the Activity Log Alert rule.
     * 
     */
    @Import(name="activityLogAlertName")
    private @Nullable Output activityLogAlertName;

    /**
     * @return The name of the Activity Log Alert rule.
     * 
     */
    public Optional> activityLogAlertName() {
        return Optional.ofNullable(this.activityLogAlertName);
    }

    /**
     * The condition that will cause this alert to activate.
     * 
     */
    @Import(name="condition", required=true)
    private Output condition;

    /**
     * @return The condition that will cause this alert to activate.
     * 
     */
    public Output condition() {
        return this.condition;
    }

    /**
     * A description of this Activity Log Alert rule.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return A description of this Activity Log Alert rule.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * The location of the resource. Azure Activity Log Alert rules are supported on Global, West Europe and North Europe regions.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The location of the resource. Azure Activity Log Alert rules are supported on Global, West Europe and North Europe regions.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

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

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

    /**
     * A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item.
     * 
     */
    @Import(name="scopes", required=true)
    private Output> scopes;

    /**
     * @return A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item.
     * 
     */
    public Output> scopes() {
        return this.scopes;
    }

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

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

    private ActivityLogAlertArgs() {}

    private ActivityLogAlertArgs(ActivityLogAlertArgs $) {
        this.actions = $.actions;
        this.activityLogAlertName = $.activityLogAlertName;
        this.condition = $.condition;
        this.description = $.description;
        this.enabled = $.enabled;
        this.location = $.location;
        this.resourceGroupName = $.resourceGroupName;
        this.scopes = $.scopes;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private ActivityLogAlertArgs $;

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

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

        /**
         * @param actions The actions that will activate when the condition is met.
         * 
         * @return builder
         * 
         */
        public Builder actions(Output actions) {
            $.actions = actions;
            return this;
        }

        /**
         * @param actions The actions that will activate when the condition is met.
         * 
         * @return builder
         * 
         */
        public Builder actions(ActionListArgs actions) {
            return actions(Output.of(actions));
        }

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

        /**
         * @param activityLogAlertName The name of the Activity Log Alert rule.
         * 
         * @return builder
         * 
         */
        public Builder activityLogAlertName(String activityLogAlertName) {
            return activityLogAlertName(Output.of(activityLogAlertName));
        }

        /**
         * @param condition The condition that will cause this alert to activate.
         * 
         * @return builder
         * 
         */
        public Builder condition(Output condition) {
            $.condition = condition;
            return this;
        }

        /**
         * @param condition The condition that will cause this alert to activate.
         * 
         * @return builder
         * 
         */
        public Builder condition(AlertRuleAllOfConditionArgs condition) {
            return condition(Output.of(condition));
        }

        /**
         * @param description A description of this Activity Log Alert rule.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description A description of this Activity Log Alert rule.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param enabled Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param location The location of the resource. Azure Activity Log Alert rules are supported on Global, West Europe and North Europe regions.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The location of the resource. Azure Activity Log Alert rules are supported on Global, West Europe and North Europe regions.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

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

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

        /**
         * @param scopes A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item.
         * 
         * @return builder
         * 
         */
        public Builder scopes(Output> scopes) {
            $.scopes = scopes;
            return this;
        }

        /**
         * @param scopes A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item.
         * 
         * @return builder
         * 
         */
        public Builder scopes(List scopes) {
            return scopes(Output.of(scopes));
        }

        /**
         * @param scopes A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item.
         * 
         * @return builder
         * 
         */
        public Builder scopes(String... scopes) {
            return scopes(List.of(scopes));
        }

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

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

        public ActivityLogAlertArgs build() {
            if ($.actions == null) {
                throw new MissingRequiredPropertyException("ActivityLogAlertArgs", "actions");
            }
            if ($.condition == null) {
                throw new MissingRequiredPropertyException("ActivityLogAlertArgs", "condition");
            }
            $.enabled = Codegen.booleanProp("enabled").output().arg($.enabled).def(true).getNullable();
            $.location = Codegen.stringProp("location").output().arg($.location).def("global").getNullable();
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ActivityLogAlertArgs", "resourceGroupName");
            }
            if ($.scopes == null) {
                throw new MissingRequiredPropertyException("ActivityLogAlertArgs", "scopes");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy