
com.pulumi.azurenative.insights.outputs.GetMetricAlertResult 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.MetricAlertActionResponse;
import com.pulumi.azurenative.insights.outputs.MetricAlertMultipleResourceMultipleMetricCriteriaResponse;
import com.pulumi.azurenative.insights.outputs.MetricAlertSingleResourceMultipleMetricCriteriaResponse;
import com.pulumi.azurenative.insights.outputs.WebtestLocationAvailabilityCriteriaResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
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 GetMetricAlertResult {
/**
* @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 flag that indicates whether the alert should be auto resolved or not. The default is true.
*
*/
private @Nullable Boolean autoMitigate;
/**
* @return defines the specific alert criteria information.
*
*/
private Object criteria;
/**
* @return the description of the metric alert that will be included in the alert email.
*
*/
private @Nullable String description;
/**
* @return the flag that indicates whether the metric alert is enabled.
*
*/
private Boolean enabled;
/**
* @return how often the metric alert is evaluated represented in ISO 8601 duration format.
*
*/
private String evaluationFrequency;
/**
* @return Azure resource Id
*
*/
private String id;
/**
* @return the value indicating whether this alert rule is migrated.
*
*/
private Boolean isMigrated;
/**
* @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 list of resource id's that this metric alert is scoped to.
*
*/
private List scopes;
/**
* @return Alert severity {0, 1, 2, 3, 4}
*
*/
private Integer severity;
/**
* @return Resource tags
*
*/
private @Nullable Map tags;
/**
* @return the region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
*
*/
private @Nullable String targetResourceRegion;
/**
* @return the resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
*
*/
private @Nullable String targetResourceType;
/**
* @return Azure resource type
*
*/
private String type;
/**
* @return the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
*
*/
private String windowSize;
private GetMetricAlertResult() {}
/**
* @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 flag that indicates whether the alert should be auto resolved or not. The default is true.
*
*/
public Optional autoMitigate() {
return Optional.ofNullable(this.autoMitigate);
}
/**
* @return defines the specific alert criteria information.
*
*/
public Object criteria() {
return this.criteria;
}
/**
* @return the description of the metric alert that will be included in the alert email.
*
*/
public Optional description() {
return Optional.ofNullable(this.description);
}
/**
* @return the flag that indicates whether the metric alert is enabled.
*
*/
public Boolean enabled() {
return this.enabled;
}
/**
* @return how often the metric alert is evaluated represented in ISO 8601 duration format.
*
*/
public String evaluationFrequency() {
return this.evaluationFrequency;
}
/**
* @return Azure resource Id
*
*/
public String id() {
return this.id;
}
/**
* @return the value indicating whether this alert rule is migrated.
*
*/
public Boolean isMigrated() {
return this.isMigrated;
}
/**
* @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 list of resource id's that this metric alert is scoped to.
*
*/
public List scopes() {
return this.scopes;
}
/**
* @return Alert severity {0, 1, 2, 3, 4}
*
*/
public Integer severity() {
return this.severity;
}
/**
* @return Resource tags
*
*/
public Map tags() {
return this.tags == null ? Map.of() : this.tags;
}
/**
* @return the region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
*
*/
public Optional targetResourceRegion() {
return Optional.ofNullable(this.targetResourceRegion);
}
/**
* @return the resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
*
*/
public Optional targetResourceType() {
return Optional.ofNullable(this.targetResourceType);
}
/**
* @return Azure resource type
*
*/
public String type() {
return this.type;
}
/**
* @return the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
*
*/
public String windowSize() {
return this.windowSize;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetMetricAlertResult defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable List actions;
private @Nullable Boolean autoMitigate;
private Object criteria;
private @Nullable String description;
private Boolean enabled;
private String evaluationFrequency;
private String id;
private Boolean isMigrated;
private String lastUpdatedTime;
private String location;
private String name;
private List scopes;
private Integer severity;
private @Nullable Map tags;
private @Nullable String targetResourceRegion;
private @Nullable String targetResourceType;
private String type;
private String windowSize;
public Builder() {}
public Builder(GetMetricAlertResult defaults) {
Objects.requireNonNull(defaults);
this.actions = defaults.actions;
this.autoMitigate = defaults.autoMitigate;
this.criteria = defaults.criteria;
this.description = defaults.description;
this.enabled = defaults.enabled;
this.evaluationFrequency = defaults.evaluationFrequency;
this.id = defaults.id;
this.isMigrated = defaults.isMigrated;
this.lastUpdatedTime = defaults.lastUpdatedTime;
this.location = defaults.location;
this.name = defaults.name;
this.scopes = defaults.scopes;
this.severity = defaults.severity;
this.tags = defaults.tags;
this.targetResourceRegion = defaults.targetResourceRegion;
this.targetResourceType = defaults.targetResourceType;
this.type = defaults.type;
this.windowSize = defaults.windowSize;
}
@CustomType.Setter
public Builder actions(@Nullable List actions) {
this.actions = actions;
return this;
}
public Builder actions(MetricAlertActionResponse... actions) {
return actions(List.of(actions));
}
@CustomType.Setter
public Builder autoMitigate(@Nullable Boolean autoMitigate) {
this.autoMitigate = autoMitigate;
return this;
}
@CustomType.Setter
public Builder criteria(Object criteria) {
if (criteria == null) {
throw new MissingRequiredPropertyException("GetMetricAlertResult", "criteria");
}
this.criteria = criteria;
return this;
}
@CustomType.Setter
public Builder description(@Nullable String description) {
this.description = description;
return this;
}
@CustomType.Setter
public Builder enabled(Boolean enabled) {
if (enabled == null) {
throw new MissingRequiredPropertyException("GetMetricAlertResult", "enabled");
}
this.enabled = enabled;
return this;
}
@CustomType.Setter
public Builder evaluationFrequency(String evaluationFrequency) {
if (evaluationFrequency == null) {
throw new MissingRequiredPropertyException("GetMetricAlertResult", "evaluationFrequency");
}
this.evaluationFrequency = evaluationFrequency;
return this;
}
@CustomType.Setter
public Builder id(String id) {
if (id == null) {
throw new MissingRequiredPropertyException("GetMetricAlertResult", "id");
}
this.id = id;
return this;
}
@CustomType.Setter
public Builder isMigrated(Boolean isMigrated) {
if (isMigrated == null) {
throw new MissingRequiredPropertyException("GetMetricAlertResult", "isMigrated");
}
this.isMigrated = isMigrated;
return this;
}
@CustomType.Setter
public Builder lastUpdatedTime(String lastUpdatedTime) {
if (lastUpdatedTime == null) {
throw new MissingRequiredPropertyException("GetMetricAlertResult", "lastUpdatedTime");
}
this.lastUpdatedTime = lastUpdatedTime;
return this;
}
@CustomType.Setter
public Builder location(String location) {
if (location == null) {
throw new MissingRequiredPropertyException("GetMetricAlertResult", "location");
}
this.location = location;
return this;
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("GetMetricAlertResult", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder scopes(List scopes) {
if (scopes == null) {
throw new MissingRequiredPropertyException("GetMetricAlertResult", "scopes");
}
this.scopes = scopes;
return this;
}
public Builder scopes(String... scopes) {
return scopes(List.of(scopes));
}
@CustomType.Setter
public Builder severity(Integer severity) {
if (severity == null) {
throw new MissingRequiredPropertyException("GetMetricAlertResult", "severity");
}
this.severity = severity;
return this;
}
@CustomType.Setter
public Builder tags(@Nullable Map tags) {
this.tags = tags;
return this;
}
@CustomType.Setter
public Builder targetResourceRegion(@Nullable String targetResourceRegion) {
this.targetResourceRegion = targetResourceRegion;
return this;
}
@CustomType.Setter
public Builder targetResourceType(@Nullable String targetResourceType) {
this.targetResourceType = targetResourceType;
return this;
}
@CustomType.Setter
public Builder type(String type) {
if (type == null) {
throw new MissingRequiredPropertyException("GetMetricAlertResult", "type");
}
this.type = type;
return this;
}
@CustomType.Setter
public Builder windowSize(String windowSize) {
if (windowSize == null) {
throw new MissingRequiredPropertyException("GetMetricAlertResult", "windowSize");
}
this.windowSize = windowSize;
return this;
}
public GetMetricAlertResult build() {
final var _resultValue = new GetMetricAlertResult();
_resultValue.actions = actions;
_resultValue.autoMitigate = autoMitigate;
_resultValue.criteria = criteria;
_resultValue.description = description;
_resultValue.enabled = enabled;
_resultValue.evaluationFrequency = evaluationFrequency;
_resultValue.id = id;
_resultValue.isMigrated = isMigrated;
_resultValue.lastUpdatedTime = lastUpdatedTime;
_resultValue.location = location;
_resultValue.name = name;
_resultValue.scopes = scopes;
_resultValue.severity = severity;
_resultValue.tags = tags;
_resultValue.targetResourceRegion = targetResourceRegion;
_resultValue.targetResourceType = targetResourceType;
_resultValue.type = type;
_resultValue.windowSize = windowSize;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy