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

com.pulumi.azure.consumption.kotlin.inputs.BudgetResourceGroupNotificationArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.consumption.kotlin.inputs

import com.pulumi.azure.consumption.inputs.BudgetResourceGroupNotificationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property contactEmails Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.
 * @property contactGroups Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.
 * @property contactRoles Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.
 * @property enabled 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.
 * @property operator The comparison operator for the notification. Must be one of `EqualTo`, `GreaterThan`, or `GreaterThanOrEqualTo`.
 * @property threshold 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.
 * @property thresholdType 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 data class BudgetResourceGroupNotificationArgs(
    public val contactEmails: Output>? = null,
    public val contactGroups: Output>? = null,
    public val contactRoles: Output>? = null,
    public val enabled: Output? = null,
    public val `operator`: Output,
    public val threshold: Output,
    public val thresholdType: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.consumption.inputs.BudgetResourceGroupNotificationArgs =
        com.pulumi.azure.consumption.inputs.BudgetResourceGroupNotificationArgs.builder()
            .contactEmails(contactEmails?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .contactGroups(contactGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .contactRoles(contactRoles?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .`operator`(`operator`.applyValue({ args0 -> args0 }))
            .threshold(threshold.applyValue({ args0 -> args0 }))
            .thresholdType(thresholdType?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BudgetResourceGroupNotificationArgs].
 */
@PulumiTagMarker
public class BudgetResourceGroupNotificationArgsBuilder internal constructor() {
    private var contactEmails: Output>? = null

    private var contactGroups: Output>? = null

    private var contactRoles: Output>? = null

    private var enabled: Output? = null

    private var `operator`: Output? = null

    private var threshold: Output? = null

    private var thresholdType: Output? = null

    /**
     * @param value Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.
     */
    @JvmName("nqlcwfhpxcuelmat")
    public suspend fun contactEmails(`value`: Output>) {
        this.contactEmails = value
    }

    @JvmName("ocsglpmpkytdlhtm")
    public suspend fun contactEmails(vararg values: Output) {
        this.contactEmails = Output.all(values.asList())
    }

    /**
     * @param values Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.
     */
    @JvmName("atjijvjjuxvnvrbq")
    public suspend fun contactEmails(values: List>) {
        this.contactEmails = Output.all(values)
    }

    /**
     * @param value Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.
     */
    @JvmName("gnqvovjbrvreivqu")
    public suspend fun contactGroups(`value`: Output>) {
        this.contactGroups = value
    }

    @JvmName("dioipbpnhcmphjcy")
    public suspend fun contactGroups(vararg values: Output) {
        this.contactGroups = Output.all(values.asList())
    }

    /**
     * @param values Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.
     */
    @JvmName("eqbdlkhxnbrmarkp")
    public suspend fun contactGroups(values: List>) {
        this.contactGroups = Output.all(values)
    }

    /**
     * @param value Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.
     */
    @JvmName("ybxnpokkqogodiet")
    public suspend fun contactRoles(`value`: Output>) {
        this.contactRoles = value
    }

    @JvmName("dcdfyxxgacokpjdt")
    public suspend fun contactRoles(vararg values: Output) {
        this.contactRoles = Output.all(values.asList())
    }

    /**
     * @param values Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.
     */
    @JvmName("nxcnbrjrhcllqkxo")
    public suspend fun contactRoles(values: List>) {
        this.contactRoles = Output.all(values)
    }

    /**
     * @param value 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.
     */
    @JvmName("xvgborykbmkyiuxq")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value The comparison operator for the notification. Must be one of `EqualTo`, `GreaterThan`, or `GreaterThanOrEqualTo`.
     */
    @JvmName("iilmmdxoeclwavbc")
    public suspend fun `operator`(`value`: Output) {
        this.`operator` = value
    }

    /**
     * @param value 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.
     */
    @JvmName("gitjfynwomngdroo")
    public suspend fun threshold(`value`: Output) {
        this.threshold = value
    }

    /**
     * @param value 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.
     */
    @JvmName("kbnqvtcpjelmutfi")
    public suspend fun thresholdType(`value`: Output) {
        this.thresholdType = value
    }

    /**
     * @param value Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.
     */
    @JvmName("pnoopslsdwvoejin")
    public suspend fun contactEmails(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contactEmails = mapped
    }

    /**
     * @param values Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.
     */
    @JvmName("iaxkprhirejutjys")
    public suspend fun contactEmails(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.contactEmails = mapped
    }

    /**
     * @param value Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.
     */
    @JvmName("vnwyilwdrkovoauu")
    public suspend fun contactGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contactGroups = mapped
    }

    /**
     * @param values Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.
     */
    @JvmName("ewlrpmijxxejwfbx")
    public suspend fun contactGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.contactGroups = mapped
    }

    /**
     * @param value Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.
     */
    @JvmName("frbwcwnrrgyswvkt")
    public suspend fun contactRoles(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contactRoles = mapped
    }

    /**
     * @param values Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.
     */
    @JvmName("crqabnjomitcfncu")
    public suspend fun contactRoles(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.contactRoles = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("uvgrdekcowxbguqo")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value The comparison operator for the notification. Must be one of `EqualTo`, `GreaterThan`, or `GreaterThanOrEqualTo`.
     */
    @JvmName("aadbwkvroidqdfdo")
    public suspend fun `operator`(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("ulwcingdbjeucyua")
    public suspend fun threshold(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.threshold = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("hlqlqxhtkwwqxofj")
    public suspend fun thresholdType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.thresholdType = mapped
    }

    internal fun build(): BudgetResourceGroupNotificationArgs = BudgetResourceGroupNotificationArgs(
        contactEmails = contactEmails,
        contactGroups = contactGroups,
        contactRoles = contactRoles,
        enabled = enabled,
        `operator` = `operator` ?: throw PulumiNullFieldException("operator"),
        threshold = threshold ?: throw PulumiNullFieldException("threshold"),
        thresholdType = thresholdType,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy