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

com.pulumi.awsnative.cloudwatch.kotlin.CompositeAlarmArgs.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: 1.11.0.0
Show newest version
@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("weguvhwldsrspdpd")
    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("pncemxjqlejofnmr")
    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("jwsosgwhlmkawmjs")
    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("mmpndbvliegplitf")
    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("tftcpftysdebtklt")
    public suspend fun alarmActions(`value`: Output>) {
        this.alarmActions = value
    }

    @JvmName("msvypvncngggownd")
    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("dtfqdthovrtfecdl")
    public suspend fun alarmActions(values: List>) {
        this.alarmActions = Output.all(values)
    }

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

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

    /**
     * @param value Expression which aggregates the state of other Alarms (Metric or Composite Alarms)
     */
    @JvmName("alakbhcemaxaunad")
    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("rxsoaftdldxbwxyt")
    public suspend fun insufficientDataActions(`value`: Output>) {
        this.insufficientDataActions = value
    }

    @JvmName("pjpvmqqtfskksaei")
    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("yymutomwhhyekxmn")
    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("hcnacoecphianolj")
    public suspend fun okActions(`value`: Output>) {
        this.okActions = value
    }

    @JvmName("gnbxtfjailcddlpx")
    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("hxesbxgmjhkraxxw")
    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("xnaimiwcivdqygxn")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("bcfqyeesrhtlddwa")
    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("cjevtyyydgaikgmq")
    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("lumyyqorfkabhggp")
    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("uidteksonxgvohxt")
    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("hlgytxpyndjgmsbl")
    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("ewjbgbmianyxwglo")
    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("ytqwvpfnjegswefq")
    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("idodfbbuleetirin")
    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("wgoepejphppfikcr")
    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("iuuiulwbrxathdvf")
    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("ygicimhrrkrxsvko")
    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("gmbxcnforekuvhsw")
    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("hhakhysehfurrkrr")
    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("jfkcnksyuedhmhow")
    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("ngdfbtcxvwyrdojf")
    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("bbbghxpgqytcovpq")
    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("bgduavbnikcxjkpg")
    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("uaoljtstvuyxgwwq")
    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("buatwuxhdeueggnv")
    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("hneaomcmtgenycll")
    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 - 2024 Weber Informatics LLC | Privacy Policy