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

com.pulumi.azurenative.insights.outputs.GetActivityLogAlertResult Maven / Gradle / Ivy

// *** 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.outputs;

import com.pulumi.azurenative.insights.outputs.ActionListResponse;
import com.pulumi.azurenative.insights.outputs.AlertRuleAllOfConditionResponse;
import com.pulumi.core.annotations.CustomType;
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;

@CustomType
public final class GetActivityLogAlertResult {
    /**
     * @return The actions that will activate when the condition is met.
     * 
     */
    private ActionListResponse actions;
    /**
     * @return The condition that will cause this alert to activate.
     * 
     */
    private AlertRuleAllOfConditionResponse condition;
    /**
     * @return A description of this Activity Log Alert rule.
     * 
     */
    private @Nullable String description;
    /**
     * @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.
     * 
     */
    private @Nullable Boolean enabled;
    /**
     * @return The resource Id.
     * 
     */
    private String id;
    /**
     * @return The location of the resource. Azure Activity Log Alert rules are supported on Global, West Europe and North Europe regions.
     * 
     */
    private @Nullable String location;
    /**
     * @return The name of the resource.
     * 
     */
    private String name;
    /**
     * @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.
     * 
     */
    private List scopes;
    /**
     * @return The tags of the resource.
     * 
     */
    private @Nullable Map tags;
    /**
     * @return The type of the resource.
     * 
     */
    private String type;

    private GetActivityLogAlertResult() {}
    /**
     * @return The actions that will activate when the condition is met.
     * 
     */
    public ActionListResponse actions() {
        return this.actions;
    }
    /**
     * @return The condition that will cause this alert to activate.
     * 
     */
    public AlertRuleAllOfConditionResponse condition() {
        return this.condition;
    }
    /**
     * @return A description of this Activity Log Alert rule.
     * 
     */
    public Optional description() {
        return Optional.ofNullable(this.description);
    }
    /**
     * @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);
    }
    /**
     * @return The resource Id.
     * 
     */
    public String id() {
        return this.id;
    }
    /**
     * @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);
    }
    /**
     * @return The name of the resource.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @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 List scopes() {
        return this.scopes;
    }
    /**
     * @return The tags of the resource.
     * 
     */
    public Map tags() {
        return this.tags == null ? Map.of() : this.tags;
    }
    /**
     * @return The type of the resource.
     * 
     */
    public String type() {
        return this.type;
    }

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

    public static Builder builder(GetActivityLogAlertResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private ActionListResponse actions;
        private AlertRuleAllOfConditionResponse condition;
        private @Nullable String description;
        private @Nullable Boolean enabled;
        private String id;
        private @Nullable String location;
        private String name;
        private List scopes;
        private @Nullable Map tags;
        private String type;
        public Builder() {}
        public Builder(GetActivityLogAlertResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.actions = defaults.actions;
    	      this.condition = defaults.condition;
    	      this.description = defaults.description;
    	      this.enabled = defaults.enabled;
    	      this.id = defaults.id;
    	      this.location = defaults.location;
    	      this.name = defaults.name;
    	      this.scopes = defaults.scopes;
    	      this.tags = defaults.tags;
    	      this.type = defaults.type;
        }

        @CustomType.Setter
        public Builder actions(ActionListResponse actions) {
            if (actions == null) {
              throw new MissingRequiredPropertyException("GetActivityLogAlertResult", "actions");
            }
            this.actions = actions;
            return this;
        }
        @CustomType.Setter
        public Builder condition(AlertRuleAllOfConditionResponse condition) {
            if (condition == null) {
              throw new MissingRequiredPropertyException("GetActivityLogAlertResult", "condition");
            }
            this.condition = condition;
            return this;
        }
        @CustomType.Setter
        public Builder description(@Nullable String description) {

            this.description = description;
            return this;
        }
        @CustomType.Setter
        public Builder enabled(@Nullable Boolean enabled) {

            this.enabled = enabled;
            return this;
        }
        @CustomType.Setter
        public Builder id(String id) {
            if (id == null) {
              throw new MissingRequiredPropertyException("GetActivityLogAlertResult", "id");
            }
            this.id = id;
            return this;
        }
        @CustomType.Setter
        public Builder location(@Nullable String location) {

            this.location = location;
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("GetActivityLogAlertResult", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder scopes(List scopes) {
            if (scopes == null) {
              throw new MissingRequiredPropertyException("GetActivityLogAlertResult", "scopes");
            }
            this.scopes = scopes;
            return this;
        }
        public Builder scopes(String... scopes) {
            return scopes(List.of(scopes));
        }
        @CustomType.Setter
        public Builder tags(@Nullable Map tags) {

            this.tags = tags;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("GetActivityLogAlertResult", "type");
            }
            this.type = type;
            return this;
        }
        public GetActivityLogAlertResult build() {
            final var _resultValue = new GetActivityLogAlertResult();
            _resultValue.actions = actions;
            _resultValue.condition = condition;
            _resultValue.description = description;
            _resultValue.enabled = enabled;
            _resultValue.id = id;
            _resultValue.location = location;
            _resultValue.name = name;
            _resultValue.scopes = scopes;
            _resultValue.tags = tags;
            _resultValue.type = type;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy