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

com.pulumi.awsnative.cloudwatch.kotlin.CompositeAlarmArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.cloudwatch.kotlin

import com.pulumi.awsnative.cloudwatch.CompositeAlarmArgs.builder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The AWS::CloudWatch::CompositeAlarm type specifies an alarm which aggregates the states of other Alarms (Metric or Composite Alarms) as defined by the AlarmRule expression
 * @property actionsEnabled Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
 * @property actionsSuppressor Actions will be suppressed if the suppressor alarm is in the ALARM state. ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
 * @property actionsSuppressorExtensionPeriod Actions will be suppressed if WaitPeriod is active. The length of time that actions are suppressed is in seconds.
 * @property actionsSuppressorWaitPeriod Actions will be suppressed if ExtensionPeriod is active. The length of time that actions are suppressed is in seconds.
 * @property alarmActions The list of actions to execute when this alarm transitions into an ALARM state from any other state. Specify each action as an Amazon Resource Name (ARN).
 * @property alarmDescription The description of the alarm
 * @property alarmName The name of the Composite Alarm
 * @property alarmRule Expression which aggregates the state of other Alarms (Metric or Composite Alarms)
 * @property insufficientDataActions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
 * @property okActions The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
 * @property tags A list of key-value pairs to associate with the composite alarm. You can associate as many as 50 tags with an alarm.
 */
public data class CompositeAlarmArgs(
    public val actionsEnabled: Output? = null,
    public val actionsSuppressor: Output? = null,
    public val actionsSuppressorExtensionPeriod: Output? = null,
    public val actionsSuppressorWaitPeriod: Output? = null,
    public val alarmActions: Output>? = null,
    public val alarmDescription: Output? = null,
    public val alarmName: Output? = null,
    public val alarmRule: Output? = null,
    public val insufficientDataActions: Output>? = null,
    public val okActions: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cloudwatch.CompositeAlarmArgs =
        com.pulumi.awsnative.cloudwatch.CompositeAlarmArgs.builder()
            .actionsEnabled(actionsEnabled?.applyValue({ args0 -> args0 }))
            .actionsSuppressor(actionsSuppressor?.applyValue({ args0 -> args0 }))
            .actionsSuppressorExtensionPeriod(actionsSuppressorExtensionPeriod?.applyValue({ args0 -> args0 }))
            .actionsSuppressorWaitPeriod(actionsSuppressorWaitPeriod?.applyValue({ args0 -> args0 }))
            .alarmActions(alarmActions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .alarmDescription(alarmDescription?.applyValue({ args0 -> args0 }))
            .alarmName(alarmName?.applyValue({ args0 -> args0 }))
            .alarmRule(alarmRule?.applyValue({ args0 -> args0 }))
            .insufficientDataActions(
                insufficientDataActions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .okActions(okActions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [CompositeAlarmArgs].
 */
@PulumiTagMarker
public class CompositeAlarmArgsBuilder internal constructor() {
    private var actionsEnabled: Output? = null

    private var actionsSuppressor: Output? = null

    private var actionsSuppressorExtensionPeriod: Output? = null

    private var actionsSuppressorWaitPeriod: Output? = null

    private var alarmActions: Output>? = null

    private var alarmDescription: Output? = null

    private var alarmName: Output? = null

    private var alarmRule: Output? = null

    private var insufficientDataActions: Output>? = null

    private var okActions: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
     */
    @JvmName("yifkmqasbvmukmax")
    public suspend fun actionsEnabled(`value`: Output) {
        this.actionsEnabled = value
    }

    /**
     * @param value Actions will be suppressed if the suppressor alarm is in the ALARM state. ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
     */
    @JvmName("dmaqvvqfemmbmrrx")
    public suspend fun actionsSuppressor(`value`: Output) {
        this.actionsSuppressor = value
    }

    /**
     * @param value Actions will be suppressed if WaitPeriod is active. The length of time that actions are suppressed is in seconds.
     */
    @JvmName("hivtsrluaponxpyd")
    public suspend fun actionsSuppressorExtensionPeriod(`value`: Output) {
        this.actionsSuppressorExtensionPeriod = value
    }

    /**
     * @param value Actions will be suppressed if ExtensionPeriod is active. The length of time that actions are suppressed is in seconds.
     */
    @JvmName("gxmxtvydmubnamus")
    public suspend fun actionsSuppressorWaitPeriod(`value`: Output) {
        this.actionsSuppressorWaitPeriod = value
    }

    /**
     * @param value The list of actions to execute when this alarm transitions into an ALARM state from any other state. Specify each action as an Amazon Resource Name (ARN).
     */
    @JvmName("lwvgqiwlxpabtfiw")
    public suspend fun alarmActions(`value`: Output>) {
        this.alarmActions = value
    }

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

    /**
     * @param values The list of actions to execute when this alarm transitions into an ALARM state from any other state. Specify each action as an Amazon Resource Name (ARN).
     */
    @JvmName("txmglrrhwwlmyxqd")
    public suspend fun alarmActions(values: List>) {
        this.alarmActions = Output.all(values)
    }

    /**
     * @param value The description of the alarm
     */
    @JvmName("citfyaeicblqhrls")
    public suspend fun alarmDescription(`value`: Output) {
        this.alarmDescription = value
    }

    /**
     * @param value The name of the Composite Alarm
     */
    @JvmName("oghisyelfabpnook")
    public suspend fun alarmName(`value`: Output) {
        this.alarmName = value
    }

    /**
     * @param value Expression which aggregates the state of other Alarms (Metric or Composite Alarms)
     */
    @JvmName("nqgeegsfrpmjneyf")
    public suspend fun alarmRule(`value`: Output) {
        this.alarmRule = value
    }

    /**
     * @param value The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
     */
    @JvmName("skeobieplwlwccar")
    public suspend fun insufficientDataActions(`value`: Output>) {
        this.insufficientDataActions = value
    }

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

    /**
     * @param values The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
     */
    @JvmName("dgxhqyjmxvofaknn")
    public suspend fun insufficientDataActions(values: List>) {
        this.insufficientDataActions = Output.all(values)
    }

    /**
     * @param value The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
     */
    @JvmName("alchyqnhtbhjyqlw")
    public suspend fun okActions(`value`: Output>) {
        this.okActions = value
    }

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

    /**
     * @param values The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
     */
    @JvmName("owciyjfcquvygnul")
    public suspend fun okActions(values: List>) {
        this.okActions = Output.all(values)
    }

    /**
     * @param value A list of key-value pairs to associate with the composite alarm. You can associate as many as 50 tags with an alarm.
     */
    @JvmName("vjitwfndbokbtqff")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values A list of key-value pairs to associate with the composite alarm. You can associate as many as 50 tags with an alarm.
     */
    @JvmName("yeswcmvsompuvcvi")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
     */
    @JvmName("hlkhtnotxhmnaooq")
    public suspend fun actionsEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actionsEnabled = mapped
    }

    /**
     * @param value Actions will be suppressed if the suppressor alarm is in the ALARM state. ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
     */
    @JvmName("iudjjggqaevjjogw")
    public suspend fun actionsSuppressor(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actionsSuppressor = mapped
    }

    /**
     * @param value Actions will be suppressed if WaitPeriod is active. The length of time that actions are suppressed is in seconds.
     */
    @JvmName("stckruyancqcmtbs")
    public suspend fun actionsSuppressorExtensionPeriod(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actionsSuppressorExtensionPeriod = mapped
    }

    /**
     * @param value Actions will be suppressed if ExtensionPeriod is active. The length of time that actions are suppressed is in seconds.
     */
    @JvmName("hlnariiyfyjqsils")
    public suspend fun actionsSuppressorWaitPeriod(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actionsSuppressorWaitPeriod = mapped
    }

    /**
     * @param value The list of actions to execute when this alarm transitions into an ALARM state from any other state. Specify each action as an Amazon Resource Name (ARN).
     */
    @JvmName("kgpuuistvhjoeiwo")
    public suspend fun alarmActions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alarmActions = mapped
    }

    /**
     * @param values The list of actions to execute when this alarm transitions into an ALARM state from any other state. Specify each action as an Amazon Resource Name (ARN).
     */
    @JvmName("bfpuwmjlqchglkmc")
    public suspend fun alarmActions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.alarmActions = mapped
    }

    /**
     * @param value The description of the alarm
     */
    @JvmName("mapuwojpknljoivk")
    public suspend fun alarmDescription(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alarmDescription = mapped
    }

    /**
     * @param value The name of the Composite Alarm
     */
    @JvmName("aotvcoyoilathfin")
    public suspend fun alarmName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alarmName = mapped
    }

    /**
     * @param value Expression which aggregates the state of other Alarms (Metric or Composite Alarms)
     */
    @JvmName("vntwmxeppewgvbim")
    public suspend fun alarmRule(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alarmRule = mapped
    }

    /**
     * @param value The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
     */
    @JvmName("ruuskatwbtsuwglr")
    public suspend fun insufficientDataActions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.insufficientDataActions = mapped
    }

    /**
     * @param values The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
     */
    @JvmName("elapftfgewnvmnoy")
    public suspend fun insufficientDataActions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.insufficientDataActions = mapped
    }

    /**
     * @param value The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
     */
    @JvmName("rqftikahhnmbwtdk")
    public suspend fun okActions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.okActions = mapped
    }

    /**
     * @param values The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
     */
    @JvmName("rstusagaekmylswd")
    public suspend fun okActions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.okActions = mapped
    }

    /**
     * @param value A list of key-value pairs to associate with the composite alarm. You can associate as many as 50 tags with an alarm.
     */
    @JvmName("nqgwhxskwbxgjrle")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument A list of key-value pairs to associate with the composite alarm. You can associate as many as 50 tags with an alarm.
     */
    @JvmName("fyfnheejrjilcpxe")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A list of key-value pairs to associate with the composite alarm. You can associate as many as 50 tags with an alarm.
     */
    @JvmName("vivqhpgavqauixhl")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A list of key-value pairs to associate with the composite alarm. You can associate as many as 50 tags with an alarm.
     */
    @JvmName("kmsbdaybtrmkwjxa")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values A list of key-value pairs to associate with the composite alarm. You can associate as many as 50 tags with an alarm.
     */
    @JvmName("macprftoqxboubac")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): CompositeAlarmArgs = CompositeAlarmArgs(
        actionsEnabled = actionsEnabled,
        actionsSuppressor = actionsSuppressor,
        actionsSuppressorExtensionPeriod = actionsSuppressorExtensionPeriod,
        actionsSuppressorWaitPeriod = actionsSuppressorWaitPeriod,
        alarmActions = alarmActions,
        alarmDescription = alarmDescription,
        alarmName = alarmName,
        alarmRule = alarmRule,
        insufficientDataActions = insufficientDataActions,
        okActions = okActions,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy