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

com.pulumi.azure.consumption.outputs.BudgetResourceGroupNotification Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
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.azure.consumption.outputs;

import com.pulumi.core.annotations.CustomType;
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;

@CustomType
public final class BudgetResourceGroupNotification {
    /**
     * @return Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.
     * 
     */
    private @Nullable List contactEmails;
    /**
     * @return Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.
     * 
     */
    private @Nullable List contactGroups;
    /**
     * @return Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.
     * 
     */
    private @Nullable List contactRoles;
    /**
     * @return Should the notification be enabled? Defaults to `true`.
     * 
     * > **NOTE:** A `notification` block cannot have all of `contact_emails`, `contact_roles`, and `contact_groups` empty. This means that at least one of the three must be specified.
     * 
     */
    private @Nullable Boolean enabled;
    /**
     * @return The comparison operator for the notification. Must be one of `EqualTo`, `GreaterThan`, or `GreaterThanOrEqualTo`.
     * 
     */
    private String operator;
    /**
     * @return Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.
     * 
     */
    private Integer threshold;
    /**
     * @return The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are `Actual` and `Forecasted`. Default is `Actual`. Changing this forces a new resource to be created.
     * 
     */
    private @Nullable String thresholdType;

    private BudgetResourceGroupNotification() {}
    /**
     * @return Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.
     * 
     */
    public List contactEmails() {
        return this.contactEmails == null ? List.of() : this.contactEmails;
    }
    /**
     * @return Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.
     * 
     */
    public List contactGroups() {
        return this.contactGroups == null ? List.of() : this.contactGroups;
    }
    /**
     * @return Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.
     * 
     */
    public List contactRoles() {
        return this.contactRoles == null ? List.of() : this.contactRoles;
    }
    /**
     * @return Should the notification be enabled? Defaults to `true`.
     * 
     * > **NOTE:** A `notification` block cannot have all of `contact_emails`, `contact_roles`, and `contact_groups` empty. This means that at least one of the three must be specified.
     * 
     */
    public Optional enabled() {
        return Optional.ofNullable(this.enabled);
    }
    /**
     * @return The comparison operator for the notification. Must be one of `EqualTo`, `GreaterThan`, or `GreaterThanOrEqualTo`.
     * 
     */
    public String operator() {
        return this.operator;
    }
    /**
     * @return Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.
     * 
     */
    public Integer threshold() {
        return this.threshold;
    }
    /**
     * @return The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are `Actual` and `Forecasted`. Default is `Actual`. Changing this forces a new resource to be created.
     * 
     */
    public Optional thresholdType() {
        return Optional.ofNullable(this.thresholdType);
    }

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

    public static Builder builder(BudgetResourceGroupNotification defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List contactEmails;
        private @Nullable List contactGroups;
        private @Nullable List contactRoles;
        private @Nullable Boolean enabled;
        private String operator;
        private Integer threshold;
        private @Nullable String thresholdType;
        public Builder() {}
        public Builder(BudgetResourceGroupNotification defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.contactEmails = defaults.contactEmails;
    	      this.contactGroups = defaults.contactGroups;
    	      this.contactRoles = defaults.contactRoles;
    	      this.enabled = defaults.enabled;
    	      this.operator = defaults.operator;
    	      this.threshold = defaults.threshold;
    	      this.thresholdType = defaults.thresholdType;
        }

        @CustomType.Setter
        public Builder contactEmails(@Nullable List contactEmails) {

            this.contactEmails = contactEmails;
            return this;
        }
        public Builder contactEmails(String... contactEmails) {
            return contactEmails(List.of(contactEmails));
        }
        @CustomType.Setter
        public Builder contactGroups(@Nullable List contactGroups) {

            this.contactGroups = contactGroups;
            return this;
        }
        public Builder contactGroups(String... contactGroups) {
            return contactGroups(List.of(contactGroups));
        }
        @CustomType.Setter
        public Builder contactRoles(@Nullable List contactRoles) {

            this.contactRoles = contactRoles;
            return this;
        }
        public Builder contactRoles(String... contactRoles) {
            return contactRoles(List.of(contactRoles));
        }
        @CustomType.Setter
        public Builder enabled(@Nullable Boolean enabled) {

            this.enabled = enabled;
            return this;
        }
        @CustomType.Setter
        public Builder operator(String operator) {
            if (operator == null) {
              throw new MissingRequiredPropertyException("BudgetResourceGroupNotification", "operator");
            }
            this.operator = operator;
            return this;
        }
        @CustomType.Setter
        public Builder threshold(Integer threshold) {
            if (threshold == null) {
              throw new MissingRequiredPropertyException("BudgetResourceGroupNotification", "threshold");
            }
            this.threshold = threshold;
            return this;
        }
        @CustomType.Setter
        public Builder thresholdType(@Nullable String thresholdType) {

            this.thresholdType = thresholdType;
            return this;
        }
        public BudgetResourceGroupNotification build() {
            final var _resultValue = new BudgetResourceGroupNotification();
            _resultValue.contactEmails = contactEmails;
            _resultValue.contactGroups = contactGroups;
            _resultValue.contactRoles = contactRoles;
            _resultValue.enabled = enabled;
            _resultValue.operator = operator;
            _resultValue.threshold = threshold;
            _resultValue.thresholdType = thresholdType;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy