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

com.pulumi.gcp.monitoring.kotlin.inputs.AlertPolicyAlertStrategyArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.monitoring.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.monitoring.inputs.AlertPolicyAlertStrategyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property autoClose If an alert policy that was active has no data for this long, any open incidents will close.
 * @property notificationChannelStrategies Control over how the notification channels in `notification_channels`
 * are notified when this alert fires, on a per-channel basis.
 * Structure is documented below.
 * @property notificationRateLimit Required for alert policies with a LogMatch condition.
 * This limit is not implemented for alert policies that are not log-based.
 * Structure is documented below.
 */
public data class AlertPolicyAlertStrategyArgs(
    public val autoClose: Output? = null,
    public val notificationChannelStrategies: Output>? = null,
    public val notificationRateLimit: Output? =
        null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.monitoring.inputs.AlertPolicyAlertStrategyArgs =
        com.pulumi.gcp.monitoring.inputs.AlertPolicyAlertStrategyArgs.builder()
            .autoClose(autoClose?.applyValue({ args0 -> args0 }))
            .notificationChannelStrategies(
                notificationChannelStrategies?.applyValue({ args0 ->
                    args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .notificationRateLimit(
                notificationRateLimit?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [AlertPolicyAlertStrategyArgs].
 */
@PulumiTagMarker
public class AlertPolicyAlertStrategyArgsBuilder internal constructor() {
    private var autoClose: Output? = null

    private var notificationChannelStrategies:
        Output>? = null

    private var notificationRateLimit: Output? =
        null

    /**
     * @param value If an alert policy that was active has no data for this long, any open incidents will close.
     */
    @JvmName("pgmdbytoincedqmi")
    public suspend fun autoClose(`value`: Output) {
        this.autoClose = value
    }

    /**
     * @param value Control over how the notification channels in `notification_channels`
     * are notified when this alert fires, on a per-channel basis.
     * Structure is documented below.
     */
    @JvmName("rwqvahqmnowleusm")
    public suspend fun notificationChannelStrategies(`value`: Output>) {
        this.notificationChannelStrategies = value
    }

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

    /**
     * @param values Control over how the notification channels in `notification_channels`
     * are notified when this alert fires, on a per-channel basis.
     * Structure is documented below.
     */
    @JvmName("ulwmsohxxqingwdj")
    public suspend fun notificationChannelStrategies(values: List>) {
        this.notificationChannelStrategies = Output.all(values)
    }

    /**
     * @param value Required for alert policies with a LogMatch condition.
     * This limit is not implemented for alert policies that are not log-based.
     * Structure is documented below.
     */
    @JvmName("wsiarfuriaqcmpwo")
    public suspend fun notificationRateLimit(`value`: Output) {
        this.notificationRateLimit = value
    }

    /**
     * @param value If an alert policy that was active has no data for this long, any open incidents will close.
     */
    @JvmName("akiynptliyjrshye")
    public suspend fun autoClose(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoClose = mapped
    }

    /**
     * @param value Control over how the notification channels in `notification_channels`
     * are notified when this alert fires, on a per-channel basis.
     * Structure is documented below.
     */
    @JvmName("aftvydkykuebkpth")
    public suspend fun notificationChannelStrategies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notificationChannelStrategies = mapped
    }

    /**
     * @param argument Control over how the notification channels in `notification_channels`
     * are notified when this alert fires, on a per-channel basis.
     * Structure is documented below.
     */
    @JvmName("stsjtbkpjwetlrle")
    public suspend fun notificationChannelStrategies(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AlertPolicyAlertStrategyNotificationChannelStrategyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.notificationChannelStrategies = mapped
    }

    /**
     * @param argument Control over how the notification channels in `notification_channels`
     * are notified when this alert fires, on a per-channel basis.
     * Structure is documented below.
     */
    @JvmName("alxioadbcbmshiba")
    public suspend fun notificationChannelStrategies(vararg argument: suspend AlertPolicyAlertStrategyNotificationChannelStrategyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AlertPolicyAlertStrategyNotificationChannelStrategyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.notificationChannelStrategies = mapped
    }

    /**
     * @param argument Control over how the notification channels in `notification_channels`
     * are notified when this alert fires, on a per-channel basis.
     * Structure is documented below.
     */
    @JvmName("wuojdgjddoypublb")
    public suspend fun notificationChannelStrategies(argument: suspend AlertPolicyAlertStrategyNotificationChannelStrategyArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                AlertPolicyAlertStrategyNotificationChannelStrategyArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.notificationChannelStrategies = mapped
    }

    /**
     * @param values Control over how the notification channels in `notification_channels`
     * are notified when this alert fires, on a per-channel basis.
     * Structure is documented below.
     */
    @JvmName("ggqrtoapcatmokhl")
    public suspend fun notificationChannelStrategies(vararg values: AlertPolicyAlertStrategyNotificationChannelStrategyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.notificationChannelStrategies = mapped
    }

    /**
     * @param value Required for alert policies with a LogMatch condition.
     * This limit is not implemented for alert policies that are not log-based.
     * Structure is documented below.
     */
    @JvmName("oocoopjdcoornbdr")
    public suspend fun notificationRateLimit(`value`: AlertPolicyAlertStrategyNotificationRateLimitArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notificationRateLimit = mapped
    }

    /**
     * @param argument Required for alert policies with a LogMatch condition.
     * This limit is not implemented for alert policies that are not log-based.
     * Structure is documented below.
     */
    @JvmName("bqilqwdhtoaympqi")
    public suspend fun notificationRateLimit(argument: suspend AlertPolicyAlertStrategyNotificationRateLimitArgsBuilder.() -> Unit) {
        val toBeMapped = AlertPolicyAlertStrategyNotificationRateLimitArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.notificationRateLimit = mapped
    }

    internal fun build(): AlertPolicyAlertStrategyArgs = AlertPolicyAlertStrategyArgs(
        autoClose = autoClose,
        notificationChannelStrategies = notificationChannelStrategies,
        notificationRateLimit = notificationRateLimit,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy