Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.alicloud.log.AlertArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing AliCloud 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.alicloud.log;
import com.pulumi.alicloud.log.inputs.AlertAnnotationArgs;
import com.pulumi.alicloud.log.inputs.AlertGroupConfigurationArgs;
import com.pulumi.alicloud.log.inputs.AlertJoinConfigurationArgs;
import com.pulumi.alicloud.log.inputs.AlertLabelArgs;
import com.pulumi.alicloud.log.inputs.AlertNotificationListArgs;
import com.pulumi.alicloud.log.inputs.AlertPolicyConfigurationArgs;
import com.pulumi.alicloud.log.inputs.AlertQueryListArgs;
import com.pulumi.alicloud.log.inputs.AlertScheduleArgs;
import com.pulumi.alicloud.log.inputs.AlertSeverityConfigurationArgs;
import com.pulumi.alicloud.log.inputs.AlertTemplateConfigurationArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class AlertArgs extends com.pulumi.resources.ResourceArgs {
public static final AlertArgs Empty = new AlertArgs();
/**
* Alert description.
*
*/
@Import(name="alertDescription")
private @Nullable Output alertDescription;
/**
* @return Alert description.
*
*/
public Optional> alertDescription() {
return Optional.ofNullable(this.alertDescription);
}
/**
* Alert displayname.
*
*/
@Import(name="alertDisplayname", required=true)
private Output alertDisplayname;
/**
* @return Alert displayname.
*
*/
public Output alertDisplayname() {
return this.alertDisplayname;
}
/**
* Name of logstore for configuring alarm service.
*
*/
@Import(name="alertName", required=true)
private Output alertName;
/**
* @return Name of logstore for configuring alarm service.
*
*/
public Output alertName() {
return this.alertName;
}
/**
* Annotations for new alert.
*
*/
@Import(name="annotations")
private @Nullable Output> annotations;
/**
* @return Annotations for new alert.
*
*/
public Optional>> annotations() {
return Optional.ofNullable(this.annotations);
}
/**
* whether to add automatic annotation, default is false.
*
*/
@Import(name="autoAnnotation")
private @Nullable Output autoAnnotation;
/**
* @return whether to add automatic annotation, default is false.
*
*/
public Optional> autoAnnotation() {
return Optional.ofNullable(this.autoAnnotation);
}
/**
* Conditional expression, such as: count> 100, Deprecated from 1.161.0+.
*
* @deprecated
* Deprecated from 1.161.0+, use eval_condition in severity_configurations
*
*/
@Deprecated /* Deprecated from 1.161.0+, use eval_condition in severity_configurations */
@Import(name="condition")
private @Nullable Output condition;
/**
* @return Conditional expression, such as: count> 100, Deprecated from 1.161.0+.
*
* @deprecated
* Deprecated from 1.161.0+, use eval_condition in severity_configurations
*
*/
@Deprecated /* Deprecated from 1.161.0+, use eval_condition in severity_configurations */
public Optional> condition() {
return Optional.ofNullable(this.condition);
}
/**
* @deprecated
* Deprecated from 1.161.0+, use dashboardId in query_list
*
*/
@Deprecated /* Deprecated from 1.161.0+, use dashboardId in query_list */
@Import(name="dashboard")
private @Nullable Output dashboard;
/**
* @deprecated
* Deprecated from 1.161.0+, use dashboardId in query_list
*
*/
@Deprecated /* Deprecated from 1.161.0+, use dashboardId in query_list */
public Optional> dashboard() {
return Optional.ofNullable(this.dashboard);
}
/**
* Group configuration for new alert.
*
*/
@Import(name="groupConfiguration")
private @Nullable Output groupConfiguration;
/**
* @return Group configuration for new alert.
*
*/
public Optional> groupConfiguration() {
return Optional.ofNullable(this.groupConfiguration);
}
/**
* Join configuration for different queries.
*
*/
@Import(name="joinConfigurations")
private @Nullable Output> joinConfigurations;
/**
* @return Join configuration for different queries.
*
*/
public Optional>> joinConfigurations() {
return Optional.ofNullable(this.joinConfigurations);
}
/**
* Labels for new alert.
*
*/
@Import(name="labels")
private @Nullable Output> labels;
/**
* @return Labels for new alert.
*
*/
public Optional>> labels() {
return Optional.ofNullable(this.labels);
}
/**
* Timestamp, notifications before closing again.
*
*/
@Import(name="muteUntil")
private @Nullable Output muteUntil;
/**
* @return Timestamp, notifications before closing again.
*
*/
public Optional> muteUntil() {
return Optional.ofNullable(this.muteUntil);
}
/**
* Switch for whether new alert fires when no data happens, default is false.
*
*/
@Import(name="noDataFire")
private @Nullable Output noDataFire;
/**
* @return Switch for whether new alert fires when no data happens, default is false.
*
*/
public Optional> noDataFire() {
return Optional.ofNullable(this.noDataFire);
}
/**
* when no data happens, the severity of new alert.
*
*/
@Import(name="noDataSeverity")
private @Nullable Output noDataSeverity;
/**
* @return when no data happens, the severity of new alert.
*
*/
public Optional> noDataSeverity() {
return Optional.ofNullable(this.noDataSeverity);
}
/**
* Alarm information notification list, Deprecated from 1.161.0+.
*
* @deprecated
* Deprecated from 1.161.0+, use policy_configuration for notification
*
*/
@Deprecated /* Deprecated from 1.161.0+, use policy_configuration for notification */
@Import(name="notificationLists")
private @Nullable Output> notificationLists;
/**
* @return Alarm information notification list, Deprecated from 1.161.0+.
*
* @deprecated
* Deprecated from 1.161.0+, use policy_configuration for notification
*
*/
@Deprecated /* Deprecated from 1.161.0+, use policy_configuration for notification */
public Optional>> notificationLists() {
return Optional.ofNullable(this.notificationLists);
}
/**
* Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
*
* @deprecated
* Deprecated from 1.161.0+, use threshold
*
*/
@Deprecated /* Deprecated from 1.161.0+, use threshold */
@Import(name="notifyThreshold")
private @Nullable Output notifyThreshold;
/**
* @return Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
*
* @deprecated
* Deprecated from 1.161.0+, use threshold
*
*/
@Deprecated /* Deprecated from 1.161.0+, use threshold */
public Optional> notifyThreshold() {
return Optional.ofNullable(this.notifyThreshold);
}
/**
* Policy configuration for new alert.
*
*/
@Import(name="policyConfiguration")
private @Nullable Output policyConfiguration;
/**
* @return Policy configuration for new alert.
*
*/
public Optional> policyConfiguration() {
return Optional.ofNullable(this.policyConfiguration);
}
/**
* The project name.
*
*/
@Import(name="projectName", required=true)
private Output projectName;
/**
* @return The project name.
*
*/
public Output projectName() {
return this.projectName;
}
/**
* Multiple conditions for configured alarm query.
*
*/
@Import(name="queryLists")
private @Nullable Output> queryLists;
/**
* @return Multiple conditions for configured alarm query.
*
*/
public Optional>> queryLists() {
return Optional.ofNullable(this.queryLists);
}
/**
* schedule for alert.
*
*/
@Import(name="schedule")
private @Nullable Output schedule;
/**
* @return schedule for alert.
*
*/
public Optional> schedule() {
return Optional.ofNullable(this.schedule);
}
/**
* Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
*
* @deprecated
* Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
*
*/
@Deprecated /* Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead. */
@Import(name="scheduleInterval")
private @Nullable Output scheduleInterval;
/**
* @return Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
*
* @deprecated
* Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
*
*/
@Deprecated /* Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead. */
public Optional> scheduleInterval() {
return Optional.ofNullable(this.scheduleInterval);
}
/**
* Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
*
* @deprecated
* Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
*
*/
@Deprecated /* Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead. */
@Import(name="scheduleType")
private @Nullable Output scheduleType;
/**
* @return Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
*
* @deprecated
* Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
*
*/
@Deprecated /* Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead. */
public Optional> scheduleType() {
return Optional.ofNullable(this.scheduleType);
}
/**
* when new alert is resolved, whether to notify, default is false.
*
*/
@Import(name="sendResolved")
private @Nullable Output sendResolved;
/**
* @return when new alert is resolved, whether to notify, default is false.
*
*/
public Optional> sendResolved() {
return Optional.ofNullable(this.sendResolved);
}
/**
* Severity configuration for new alert.
*
*/
@Import(name="severityConfigurations")
private @Nullable Output> severityConfigurations;
/**
* @return Severity configuration for new alert.
*
*/
public Optional>> severityConfigurations() {
return Optional.ofNullable(this.severityConfigurations);
}
/**
* Template configuration for alert, when `type` is `tpl`.
*
*/
@Import(name="templateConfiguration")
private @Nullable Output templateConfiguration;
/**
* @return Template configuration for alert, when `type` is `tpl`.
*
*/
public Optional> templateConfiguration() {
return Optional.ofNullable(this.templateConfiguration);
}
/**
* Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
*
*/
@Import(name="threshold")
private @Nullable Output threshold;
/**
* @return Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
*
*/
public Optional> threshold() {
return Optional.ofNullable(this.threshold);
}
/**
* Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
*
* @deprecated
* Deprecated from 1.161.0+, use repeat_interval in policy_configuration
*
*/
@Deprecated /* Deprecated from 1.161.0+, use repeat_interval in policy_configuration */
@Import(name="throttling")
private @Nullable Output throttling;
/**
* @return Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
*
* @deprecated
* Deprecated from 1.161.0+, use repeat_interval in policy_configuration
*
*/
@Deprecated /* Deprecated from 1.161.0+, use repeat_interval in policy_configuration */
public Optional> throttling() {
return Optional.ofNullable(this.throttling);
}
/**
* The type of new alert, `default` for custom alert, `tpl` for template alert.
*
*/
@Import(name="type")
private @Nullable Output type;
/**
* @return The type of new alert, `default` for custom alert, `tpl` for template alert.
*
*/
public Optional> type() {
return Optional.ofNullable(this.type);
}
/**
* The version of alert, new alert is 2.0.
*
*/
@Import(name="version")
private @Nullable Output version;
/**
* @return The version of alert, new alert is 2.0.
*
*/
public Optional> version() {
return Optional.ofNullable(this.version);
}
private AlertArgs() {}
private AlertArgs(AlertArgs $) {
this.alertDescription = $.alertDescription;
this.alertDisplayname = $.alertDisplayname;
this.alertName = $.alertName;
this.annotations = $.annotations;
this.autoAnnotation = $.autoAnnotation;
this.condition = $.condition;
this.dashboard = $.dashboard;
this.groupConfiguration = $.groupConfiguration;
this.joinConfigurations = $.joinConfigurations;
this.labels = $.labels;
this.muteUntil = $.muteUntil;
this.noDataFire = $.noDataFire;
this.noDataSeverity = $.noDataSeverity;
this.notificationLists = $.notificationLists;
this.notifyThreshold = $.notifyThreshold;
this.policyConfiguration = $.policyConfiguration;
this.projectName = $.projectName;
this.queryLists = $.queryLists;
this.schedule = $.schedule;
this.scheduleInterval = $.scheduleInterval;
this.scheduleType = $.scheduleType;
this.sendResolved = $.sendResolved;
this.severityConfigurations = $.severityConfigurations;
this.templateConfiguration = $.templateConfiguration;
this.threshold = $.threshold;
this.throttling = $.throttling;
this.type = $.type;
this.version = $.version;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(AlertArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private AlertArgs $;
public Builder() {
$ = new AlertArgs();
}
public Builder(AlertArgs defaults) {
$ = new AlertArgs(Objects.requireNonNull(defaults));
}
/**
* @param alertDescription Alert description.
*
* @return builder
*
*/
public Builder alertDescription(@Nullable Output alertDescription) {
$.alertDescription = alertDescription;
return this;
}
/**
* @param alertDescription Alert description.
*
* @return builder
*
*/
public Builder alertDescription(String alertDescription) {
return alertDescription(Output.of(alertDescription));
}
/**
* @param alertDisplayname Alert displayname.
*
* @return builder
*
*/
public Builder alertDisplayname(Output alertDisplayname) {
$.alertDisplayname = alertDisplayname;
return this;
}
/**
* @param alertDisplayname Alert displayname.
*
* @return builder
*
*/
public Builder alertDisplayname(String alertDisplayname) {
return alertDisplayname(Output.of(alertDisplayname));
}
/**
* @param alertName Name of logstore for configuring alarm service.
*
* @return builder
*
*/
public Builder alertName(Output alertName) {
$.alertName = alertName;
return this;
}
/**
* @param alertName Name of logstore for configuring alarm service.
*
* @return builder
*
*/
public Builder alertName(String alertName) {
return alertName(Output.of(alertName));
}
/**
* @param annotations Annotations for new alert.
*
* @return builder
*
*/
public Builder annotations(@Nullable Output> annotations) {
$.annotations = annotations;
return this;
}
/**
* @param annotations Annotations for new alert.
*
* @return builder
*
*/
public Builder annotations(List annotations) {
return annotations(Output.of(annotations));
}
/**
* @param annotations Annotations for new alert.
*
* @return builder
*
*/
public Builder annotations(AlertAnnotationArgs... annotations) {
return annotations(List.of(annotations));
}
/**
* @param autoAnnotation whether to add automatic annotation, default is false.
*
* @return builder
*
*/
public Builder autoAnnotation(@Nullable Output autoAnnotation) {
$.autoAnnotation = autoAnnotation;
return this;
}
/**
* @param autoAnnotation whether to add automatic annotation, default is false.
*
* @return builder
*
*/
public Builder autoAnnotation(Boolean autoAnnotation) {
return autoAnnotation(Output.of(autoAnnotation));
}
/**
* @param condition Conditional expression, such as: count> 100, Deprecated from 1.161.0+.
*
* @return builder
*
* @deprecated
* Deprecated from 1.161.0+, use eval_condition in severity_configurations
*
*/
@Deprecated /* Deprecated from 1.161.0+, use eval_condition in severity_configurations */
public Builder condition(@Nullable Output condition) {
$.condition = condition;
return this;
}
/**
* @param condition Conditional expression, such as: count> 100, Deprecated from 1.161.0+.
*
* @return builder
*
* @deprecated
* Deprecated from 1.161.0+, use eval_condition in severity_configurations
*
*/
@Deprecated /* Deprecated from 1.161.0+, use eval_condition in severity_configurations */
public Builder condition(String condition) {
return condition(Output.of(condition));
}
/**
* @return builder
*
* @deprecated
* Deprecated from 1.161.0+, use dashboardId in query_list
*
*/
@Deprecated /* Deprecated from 1.161.0+, use dashboardId in query_list */
public Builder dashboard(@Nullable Output dashboard) {
$.dashboard = dashboard;
return this;
}
/**
* @return builder
*
* @deprecated
* Deprecated from 1.161.0+, use dashboardId in query_list
*
*/
@Deprecated /* Deprecated from 1.161.0+, use dashboardId in query_list */
public Builder dashboard(String dashboard) {
return dashboard(Output.of(dashboard));
}
/**
* @param groupConfiguration Group configuration for new alert.
*
* @return builder
*
*/
public Builder groupConfiguration(@Nullable Output groupConfiguration) {
$.groupConfiguration = groupConfiguration;
return this;
}
/**
* @param groupConfiguration Group configuration for new alert.
*
* @return builder
*
*/
public Builder groupConfiguration(AlertGroupConfigurationArgs groupConfiguration) {
return groupConfiguration(Output.of(groupConfiguration));
}
/**
* @param joinConfigurations Join configuration for different queries.
*
* @return builder
*
*/
public Builder joinConfigurations(@Nullable Output> joinConfigurations) {
$.joinConfigurations = joinConfigurations;
return this;
}
/**
* @param joinConfigurations Join configuration for different queries.
*
* @return builder
*
*/
public Builder joinConfigurations(List joinConfigurations) {
return joinConfigurations(Output.of(joinConfigurations));
}
/**
* @param joinConfigurations Join configuration for different queries.
*
* @return builder
*
*/
public Builder joinConfigurations(AlertJoinConfigurationArgs... joinConfigurations) {
return joinConfigurations(List.of(joinConfigurations));
}
/**
* @param labels Labels for new alert.
*
* @return builder
*
*/
public Builder labels(@Nullable Output> labels) {
$.labels = labels;
return this;
}
/**
* @param labels Labels for new alert.
*
* @return builder
*
*/
public Builder labels(List labels) {
return labels(Output.of(labels));
}
/**
* @param labels Labels for new alert.
*
* @return builder
*
*/
public Builder labels(AlertLabelArgs... labels) {
return labels(List.of(labels));
}
/**
* @param muteUntil Timestamp, notifications before closing again.
*
* @return builder
*
*/
public Builder muteUntil(@Nullable Output muteUntil) {
$.muteUntil = muteUntil;
return this;
}
/**
* @param muteUntil Timestamp, notifications before closing again.
*
* @return builder
*
*/
public Builder muteUntil(Integer muteUntil) {
return muteUntil(Output.of(muteUntil));
}
/**
* @param noDataFire Switch for whether new alert fires when no data happens, default is false.
*
* @return builder
*
*/
public Builder noDataFire(@Nullable Output noDataFire) {
$.noDataFire = noDataFire;
return this;
}
/**
* @param noDataFire Switch for whether new alert fires when no data happens, default is false.
*
* @return builder
*
*/
public Builder noDataFire(Boolean noDataFire) {
return noDataFire(Output.of(noDataFire));
}
/**
* @param noDataSeverity when no data happens, the severity of new alert.
*
* @return builder
*
*/
public Builder noDataSeverity(@Nullable Output noDataSeverity) {
$.noDataSeverity = noDataSeverity;
return this;
}
/**
* @param noDataSeverity when no data happens, the severity of new alert.
*
* @return builder
*
*/
public Builder noDataSeverity(Integer noDataSeverity) {
return noDataSeverity(Output.of(noDataSeverity));
}
/**
* @param notificationLists Alarm information notification list, Deprecated from 1.161.0+.
*
* @return builder
*
* @deprecated
* Deprecated from 1.161.0+, use policy_configuration for notification
*
*/
@Deprecated /* Deprecated from 1.161.0+, use policy_configuration for notification */
public Builder notificationLists(@Nullable Output> notificationLists) {
$.notificationLists = notificationLists;
return this;
}
/**
* @param notificationLists Alarm information notification list, Deprecated from 1.161.0+.
*
* @return builder
*
* @deprecated
* Deprecated from 1.161.0+, use policy_configuration for notification
*
*/
@Deprecated /* Deprecated from 1.161.0+, use policy_configuration for notification */
public Builder notificationLists(List notificationLists) {
return notificationLists(Output.of(notificationLists));
}
/**
* @param notificationLists Alarm information notification list, Deprecated from 1.161.0+.
*
* @return builder
*
* @deprecated
* Deprecated from 1.161.0+, use policy_configuration for notification
*
*/
@Deprecated /* Deprecated from 1.161.0+, use policy_configuration for notification */
public Builder notificationLists(AlertNotificationListArgs... notificationLists) {
return notificationLists(List.of(notificationLists));
}
/**
* @param notifyThreshold Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
*
* @return builder
*
* @deprecated
* Deprecated from 1.161.0+, use threshold
*
*/
@Deprecated /* Deprecated from 1.161.0+, use threshold */
public Builder notifyThreshold(@Nullable Output notifyThreshold) {
$.notifyThreshold = notifyThreshold;
return this;
}
/**
* @param notifyThreshold Notification threshold, which is not notified until the number of triggers is reached. The default is 1, Deprecated from 1.161.0+.
*
* @return builder
*
* @deprecated
* Deprecated from 1.161.0+, use threshold
*
*/
@Deprecated /* Deprecated from 1.161.0+, use threshold */
public Builder notifyThreshold(Integer notifyThreshold) {
return notifyThreshold(Output.of(notifyThreshold));
}
/**
* @param policyConfiguration Policy configuration for new alert.
*
* @return builder
*
*/
public Builder policyConfiguration(@Nullable Output policyConfiguration) {
$.policyConfiguration = policyConfiguration;
return this;
}
/**
* @param policyConfiguration Policy configuration for new alert.
*
* @return builder
*
*/
public Builder policyConfiguration(AlertPolicyConfigurationArgs policyConfiguration) {
return policyConfiguration(Output.of(policyConfiguration));
}
/**
* @param projectName The project name.
*
* @return builder
*
*/
public Builder projectName(Output projectName) {
$.projectName = projectName;
return this;
}
/**
* @param projectName The project name.
*
* @return builder
*
*/
public Builder projectName(String projectName) {
return projectName(Output.of(projectName));
}
/**
* @param queryLists Multiple conditions for configured alarm query.
*
* @return builder
*
*/
public Builder queryLists(@Nullable Output> queryLists) {
$.queryLists = queryLists;
return this;
}
/**
* @param queryLists Multiple conditions for configured alarm query.
*
* @return builder
*
*/
public Builder queryLists(List queryLists) {
return queryLists(Output.of(queryLists));
}
/**
* @param queryLists Multiple conditions for configured alarm query.
*
* @return builder
*
*/
public Builder queryLists(AlertQueryListArgs... queryLists) {
return queryLists(List.of(queryLists));
}
/**
* @param schedule schedule for alert.
*
* @return builder
*
*/
public Builder schedule(@Nullable Output schedule) {
$.schedule = schedule;
return this;
}
/**
* @param schedule schedule for alert.
*
* @return builder
*
*/
public Builder schedule(AlertScheduleArgs schedule) {
return schedule(Output.of(schedule));
}
/**
* @param scheduleInterval Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
*
* @return builder
*
* @deprecated
* Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
*
*/
@Deprecated /* Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead. */
public Builder scheduleInterval(@Nullable Output scheduleInterval) {
$.scheduleInterval = scheduleInterval;
return this;
}
/**
* @param scheduleInterval Execution interval. 60 seconds minimum, such as 60s, 1h. Deprecated from 1.176.0+. use interval in schedule.
*
* @return builder
*
* @deprecated
* Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
*
*/
@Deprecated /* Field 'schedule_interval' has been deprecated from provider version 1.176.0. New field 'schedule' instead. */
public Builder scheduleInterval(String scheduleInterval) {
return scheduleInterval(Output.of(scheduleInterval));
}
/**
* @param scheduleType Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
*
* @return builder
*
* @deprecated
* Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
*
*/
@Deprecated /* Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead. */
public Builder scheduleType(@Nullable Output scheduleType) {
$.scheduleType = scheduleType;
return this;
}
/**
* @param scheduleType Default FixedRate. No need to configure this parameter. Deprecated from 1.176.0+. use type in schedule.
*
* @return builder
*
* @deprecated
* Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead.
*
*/
@Deprecated /* Field 'schedule_type' has been deprecated from provider version 1.176.0. New field 'schedule' instead. */
public Builder scheduleType(String scheduleType) {
return scheduleType(Output.of(scheduleType));
}
/**
* @param sendResolved when new alert is resolved, whether to notify, default is false.
*
* @return builder
*
*/
public Builder sendResolved(@Nullable Output sendResolved) {
$.sendResolved = sendResolved;
return this;
}
/**
* @param sendResolved when new alert is resolved, whether to notify, default is false.
*
* @return builder
*
*/
public Builder sendResolved(Boolean sendResolved) {
return sendResolved(Output.of(sendResolved));
}
/**
* @param severityConfigurations Severity configuration for new alert.
*
* @return builder
*
*/
public Builder severityConfigurations(@Nullable Output> severityConfigurations) {
$.severityConfigurations = severityConfigurations;
return this;
}
/**
* @param severityConfigurations Severity configuration for new alert.
*
* @return builder
*
*/
public Builder severityConfigurations(List severityConfigurations) {
return severityConfigurations(Output.of(severityConfigurations));
}
/**
* @param severityConfigurations Severity configuration for new alert.
*
* @return builder
*
*/
public Builder severityConfigurations(AlertSeverityConfigurationArgs... severityConfigurations) {
return severityConfigurations(List.of(severityConfigurations));
}
/**
* @param templateConfiguration Template configuration for alert, when `type` is `tpl`.
*
* @return builder
*
*/
public Builder templateConfiguration(@Nullable Output templateConfiguration) {
$.templateConfiguration = templateConfiguration;
return this;
}
/**
* @param templateConfiguration Template configuration for alert, when `type` is `tpl`.
*
* @return builder
*
*/
public Builder templateConfiguration(AlertTemplateConfigurationArgs templateConfiguration) {
return templateConfiguration(Output.of(templateConfiguration));
}
/**
* @param threshold Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
*
* @return builder
*
*/
public Builder threshold(@Nullable Output threshold) {
$.threshold = threshold;
return this;
}
/**
* @param threshold Evaluation threshold, alert will not fire until the number of triggers is reached. The default is 1.
*
* @return builder
*
*/
public Builder threshold(Integer threshold) {
return threshold(Output.of(threshold));
}
/**
* @param throttling Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
*
* @return builder
*
* @deprecated
* Deprecated from 1.161.0+, use repeat_interval in policy_configuration
*
*/
@Deprecated /* Deprecated from 1.161.0+, use repeat_interval in policy_configuration */
public Builder throttling(@Nullable Output throttling) {
$.throttling = throttling;
return this;
}
/**
* @param throttling Notification interval, default is no interval. Support number + unit type, for example 60s, 1h, Deprecated from 1.161.0+.
*
* @return builder
*
* @deprecated
* Deprecated from 1.161.0+, use repeat_interval in policy_configuration
*
*/
@Deprecated /* Deprecated from 1.161.0+, use repeat_interval in policy_configuration */
public Builder throttling(String throttling) {
return throttling(Output.of(throttling));
}
/**
* @param type The type of new alert, `default` for custom alert, `tpl` for template alert.
*
* @return builder
*
*/
public Builder type(@Nullable Output type) {
$.type = type;
return this;
}
/**
* @param type The type of new alert, `default` for custom alert, `tpl` for template alert.
*
* @return builder
*
*/
public Builder type(String type) {
return type(Output.of(type));
}
/**
* @param version The version of alert, new alert is 2.0.
*
* @return builder
*
*/
public Builder version(@Nullable Output version) {
$.version = version;
return this;
}
/**
* @param version The version of alert, new alert is 2.0.
*
* @return builder
*
*/
public Builder version(String version) {
return version(Output.of(version));
}
public AlertArgs build() {
if ($.alertDisplayname == null) {
throw new MissingRequiredPropertyException("AlertArgs", "alertDisplayname");
}
if ($.alertName == null) {
throw new MissingRequiredPropertyException("AlertArgs", "alertName");
}
if ($.projectName == null) {
throw new MissingRequiredPropertyException("AlertArgs", "projectName");
}
return $;
}
}
}