com.pulumi.azure.consumption.kotlin.outputs.BudgetResourceGroupNotification.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.consumption.kotlin.outputs
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
*
* @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 BudgetResourceGroupNotification(
public val contactEmails: List? = null,
public val contactGroups: List? = null,
public val contactRoles: List? = null,
public val enabled: Boolean? = null,
public val `operator`: String,
public val threshold: Int,
public val thresholdType: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.azure.consumption.outputs.BudgetResourceGroupNotification): BudgetResourceGroupNotification = BudgetResourceGroupNotification(
contactEmails = javaType.contactEmails().map({ args0 -> args0 }),
contactGroups = javaType.contactGroups().map({ args0 -> args0 }),
contactRoles = javaType.contactRoles().map({ args0 -> args0 }),
enabled = javaType.enabled().map({ args0 -> args0 }).orElse(null),
`operator` = javaType.`operator`(),
threshold = javaType.threshold(),
thresholdType = javaType.thresholdType().map({ args0 -> args0 }).orElse(null),
)
}
}