
com.pulumi.azurenative.insights.outputs.GetAlertRuleResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.LocationThresholdRuleConditionResponse;
import com.pulumi.azurenative.insights.outputs.ManagementEventRuleConditionResponse;
import com.pulumi.azurenative.insights.outputs.RuleEmailActionResponse;
import com.pulumi.azurenative.insights.outputs.RuleWebhookActionResponse;
import com.pulumi.azurenative.insights.outputs.ThresholdRuleConditionResponse;
import com.pulumi.core.Either;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Object;
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 GetAlertRuleResult {
/**
* @return action that is performed when the alert rule becomes active, and when an alert condition is resolved.
*
*/
private @Nullable Either action;
/**
* @return the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
*
*/
private @Nullable List> actions;
/**
* @return the condition that results in the alert rule being activated.
*
*/
private Object condition;
/**
* @return the description of the alert rule that will be included in the alert email.
*
*/
private @Nullable String description;
/**
* @return Azure resource Id
*
*/
private String id;
/**
* @return the flag that indicates whether the alert rule is enabled.
*
*/
private Boolean isEnabled;
/**
* @return Last time the rule was updated in ISO8601 format.
*
*/
private String lastUpdatedTime;
/**
* @return Resource location
*
*/
private String location;
/**
* @return Azure resource name
*
*/
private String name;
/**
* @return the provisioning state.
*
*/
private @Nullable String provisioningState;
/**
* @return Resource tags
*
*/
private @Nullable Map tags;
/**
* @return Azure resource type
*
*/
private String type;
private GetAlertRuleResult() {}
/**
* @return action that is performed when the alert rule becomes active, and when an alert condition is resolved.
*
*/
public Optional> action() {
return Optional.ofNullable(this.action);
}
/**
* @return the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
*
*/
public List> actions() {
return this.actions == null ? List.of() : this.actions;
}
/**
* @return the condition that results in the alert rule being activated.
*
*/
public Object condition() {
return this.condition;
}
/**
* @return the description of the alert rule that will be included in the alert email.
*
*/
public Optional description() {
return Optional.ofNullable(this.description);
}
/**
* @return Azure resource Id
*
*/
public String id() {
return this.id;
}
/**
* @return the flag that indicates whether the alert rule is enabled.
*
*/
public Boolean isEnabled() {
return this.isEnabled;
}
/**
* @return Last time the rule was updated in ISO8601 format.
*
*/
public String lastUpdatedTime() {
return this.lastUpdatedTime;
}
/**
* @return Resource location
*
*/
public String location() {
return this.location;
}
/**
* @return Azure resource name
*
*/
public String name() {
return this.name;
}
/**
* @return the provisioning state.
*
*/
public Optional provisioningState() {
return Optional.ofNullable(this.provisioningState);
}
/**
* @return Resource tags
*
*/
public Map tags() {
return this.tags == null ? Map.of() : this.tags;
}
/**
* @return Azure resource type
*
*/
public String type() {
return this.type;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetAlertRuleResult defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Either action;
private @Nullable List> actions;
private Object condition;
private @Nullable String description;
private String id;
private Boolean isEnabled;
private String lastUpdatedTime;
private String location;
private String name;
private @Nullable String provisioningState;
private @Nullable Map tags;
private String type;
public Builder() {}
public Builder(GetAlertRuleResult defaults) {
Objects.requireNonNull(defaults);
this.action = defaults.action;
this.actions = defaults.actions;
this.condition = defaults.condition;
this.description = defaults.description;
this.id = defaults.id;
this.isEnabled = defaults.isEnabled;
this.lastUpdatedTime = defaults.lastUpdatedTime;
this.location = defaults.location;
this.name = defaults.name;
this.provisioningState = defaults.provisioningState;
this.tags = defaults.tags;
this.type = defaults.type;
}
@CustomType.Setter
public Builder action(@Nullable Either action) {
this.action = action;
return this;
}
@CustomType.Setter
public Builder actions(@Nullable List> actions) {
this.actions = actions;
return this;
}
public Builder actions(Either... actions) {
return actions(List.of(actions));
}
@CustomType.Setter
public Builder condition(Object condition) {
if (condition == null) {
throw new MissingRequiredPropertyException("GetAlertRuleResult", "condition");
}
this.condition = condition;
return this;
}
@CustomType.Setter
public Builder description(@Nullable String description) {
this.description = description;
return this;
}
@CustomType.Setter
public Builder id(String id) {
if (id == null) {
throw new MissingRequiredPropertyException("GetAlertRuleResult", "id");
}
this.id = id;
return this;
}
@CustomType.Setter
public Builder isEnabled(Boolean isEnabled) {
if (isEnabled == null) {
throw new MissingRequiredPropertyException("GetAlertRuleResult", "isEnabled");
}
this.isEnabled = isEnabled;
return this;
}
@CustomType.Setter
public Builder lastUpdatedTime(String lastUpdatedTime) {
if (lastUpdatedTime == null) {
throw new MissingRequiredPropertyException("GetAlertRuleResult", "lastUpdatedTime");
}
this.lastUpdatedTime = lastUpdatedTime;
return this;
}
@CustomType.Setter
public Builder location(String location) {
if (location == null) {
throw new MissingRequiredPropertyException("GetAlertRuleResult", "location");
}
this.location = location;
return this;
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("GetAlertRuleResult", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder provisioningState(@Nullable String provisioningState) {
this.provisioningState = provisioningState;
return this;
}
@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("GetAlertRuleResult", "type");
}
this.type = type;
return this;
}
public GetAlertRuleResult build() {
final var _resultValue = new GetAlertRuleResult();
_resultValue.action = action;
_resultValue.actions = actions;
_resultValue.condition = condition;
_resultValue.description = description;
_resultValue.id = id;
_resultValue.isEnabled = isEnabled;
_resultValue.lastUpdatedTime = lastUpdatedTime;
_resultValue.location = location;
_resultValue.name = name;
_resultValue.provisioningState = provisioningState;
_resultValue.tags = tags;
_resultValue.type = type;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy