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

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

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.azure.consumption.inputs.BudgetSubscriptionNotificationArgs.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 BudgetSubscriptionNotificationArgs(
    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.BudgetSubscriptionNotificationArgs =
        com.pulumi.azure.consumption.inputs.BudgetSubscriptionNotificationArgs.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 [BudgetSubscriptionNotificationArgs].
 */
@PulumiTagMarker
public class BudgetSubscriptionNotificationArgsBuilder 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("hopoblkflgggsbad")
    public suspend fun contactEmails(`value`: Output>) {
        this.contactEmails = value
    }

    @JvmName("ubogcennrnfankqc")
    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("ppmktpmnlvsyxngn")
    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("dxvjwvjfegdirjyb")
    public suspend fun contactGroups(`value`: Output>) {
        this.contactGroups = value
    }

    @JvmName("qimunatbmgeqmnil")
    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("eyqpfxsxjmncjyea")
    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("qgcchueidwxmpmyf")
    public suspend fun contactRoles(`value`: Output>) {
        this.contactRoles = value
    }

    @JvmName("jtukngvhcbscjftt")
    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("ahqymldyxskhnrvq")
    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("vcekawvbgoiismmw")
    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("yfqpquvkbnecdxdx")
    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("veffkqysbyigkcvb")
    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("xtxctmrxycnuqyun")
    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("tgtuqtuabmplspcj")
    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("bfyttosiirllxerj")
    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("sbxpybgvtfogcgbq")
    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("qwoplyepumpcbpaf")
    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("oxsqdkyjjwlxmlhv")
    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("pvolkpuvbvfmvtia")
    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("fvgexyeqexspglkm")
    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("erqhusoubfdqnutu")
    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("wjjpjglhbjvnavws")
    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("yeamgvlbqimadkrr")
    public suspend fun thresholdType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.thresholdType = mapped
    }

    internal fun build(): BudgetSubscriptionNotificationArgs = BudgetSubscriptionNotificationArgs(
        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