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

com.pulumi.awsnative.iotevents.kotlin.AlarmModelArgs.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.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.iotevents.kotlin

import com.pulumi.awsnative.iotevents.AlarmModelArgs.builder
import com.pulumi.awsnative.iotevents.kotlin.inputs.AlarmModelAlarmCapabilitiesArgs
import com.pulumi.awsnative.iotevents.kotlin.inputs.AlarmModelAlarmCapabilitiesArgsBuilder
import com.pulumi.awsnative.iotevents.kotlin.inputs.AlarmModelAlarmEventActionsArgs
import com.pulumi.awsnative.iotevents.kotlin.inputs.AlarmModelAlarmEventActionsArgsBuilder
import com.pulumi.awsnative.iotevents.kotlin.inputs.AlarmModelAlarmRuleArgs
import com.pulumi.awsnative.iotevents.kotlin.inputs.AlarmModelAlarmRuleArgsBuilder
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The AWS::IoTEvents::AlarmModel resource creates a alarm model. AWS IoT Events alarms help you monitor your data for changes. The data can be metrics that you measure for your equipment and processes. You can create alarms that send notifications when a threshold is breached. Alarms help you detect issues, streamline maintenance, and optimize performance of your equipment and processes.
 * Alarms are instances of alarm models. The alarm model specifies what to detect, when to send notifications, who gets notified, and more. You can also specify one or more supported actions that occur when the alarm state changes. AWS IoT Events routes input attributes derived from your data to the appropriate alarms. If the data that you're monitoring is outside the specified range, the alarm is invoked. You can also acknowledge the alarms or set them to the snooze mode.
 * @property alarmCapabilities Contains the configuration information of alarm state changes.
 * @property alarmEventActions Contains information about one or more alarm actions.
 * @property alarmModelDescription A brief description of the alarm model.
 * @property alarmModelName The name of the alarm model.
 * @property alarmRule Defines when your alarm is invoked.
 * @property key The value used to identify a alarm instance. When a device or system sends input, a new alarm instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding alarm instance based on this identifying information.
 * This parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct alarm instance, the device must send a message payload that contains the same attribute-value.
 * @property roleArn The ARN of the role that grants permission to AWS IoT Events to perform its operations.
 * @property severity A non-negative integer that reflects the severity level of the alarm.
 * @property tags An array of key-value pairs to apply to this resource.
 * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
 */
public data class AlarmModelArgs(
    public val alarmCapabilities: Output? = null,
    public val alarmEventActions: Output? = null,
    public val alarmModelDescription: Output? = null,
    public val alarmModelName: Output? = null,
    public val alarmRule: Output? = null,
    public val key: Output? = null,
    public val roleArn: Output? = null,
    public val severity: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.iotevents.AlarmModelArgs =
        com.pulumi.awsnative.iotevents.AlarmModelArgs.builder()
            .alarmCapabilities(alarmCapabilities?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .alarmEventActions(alarmEventActions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .alarmModelDescription(alarmModelDescription?.applyValue({ args0 -> args0 }))
            .alarmModelName(alarmModelName?.applyValue({ args0 -> args0 }))
            .alarmRule(alarmRule?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .key(key?.applyValue({ args0 -> args0 }))
            .roleArn(roleArn?.applyValue({ args0 -> args0 }))
            .severity(severity?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AlarmModelArgs].
 */
@PulumiTagMarker
public class AlarmModelArgsBuilder internal constructor() {
    private var alarmCapabilities: Output? = null

    private var alarmEventActions: Output? = null

    private var alarmModelDescription: Output? = null

    private var alarmModelName: Output? = null

    private var alarmRule: Output? = null

    private var key: Output? = null

    private var roleArn: Output? = null

    private var severity: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Contains the configuration information of alarm state changes.
     */
    @JvmName("xivbbwiqllfgmdmt")
    public suspend fun alarmCapabilities(`value`: Output) {
        this.alarmCapabilities = value
    }

    /**
     * @param value Contains information about one or more alarm actions.
     */
    @JvmName("iyitcvopalgtdyku")
    public suspend fun alarmEventActions(`value`: Output) {
        this.alarmEventActions = value
    }

    /**
     * @param value A brief description of the alarm model.
     */
    @JvmName("okugnqbymtfcbegv")
    public suspend fun alarmModelDescription(`value`: Output) {
        this.alarmModelDescription = value
    }

    /**
     * @param value The name of the alarm model.
     */
    @JvmName("gflabgwyrltbwqut")
    public suspend fun alarmModelName(`value`: Output) {
        this.alarmModelName = value
    }

    /**
     * @param value Defines when your alarm is invoked.
     */
    @JvmName("xqdghuajomsqgoyi")
    public suspend fun alarmRule(`value`: Output) {
        this.alarmRule = value
    }

    /**
     * @param value The value used to identify a alarm instance. When a device or system sends input, a new alarm instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding alarm instance based on this identifying information.
     * This parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct alarm instance, the device must send a message payload that contains the same attribute-value.
     */
    @JvmName("mpcmpywxgfmijfuh")
    public suspend fun key(`value`: Output) {
        this.key = value
    }

    /**
     * @param value The ARN of the role that grants permission to AWS IoT Events to perform its operations.
     */
    @JvmName("etacrxupykyuipcc")
    public suspend fun roleArn(`value`: Output) {
        this.roleArn = value
    }

    /**
     * @param value A non-negative integer that reflects the severity level of the alarm.
     */
    @JvmName("srfoxvnapksrdoly")
    public suspend fun severity(`value`: Output) {
        this.severity = value
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("udgfvamejhcrgdtd")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("eqvthrewoakvfevl")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Contains the configuration information of alarm state changes.
     */
    @JvmName("dnglpfpcjrhoswml")
    public suspend fun alarmCapabilities(`value`: AlarmModelAlarmCapabilitiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alarmCapabilities = mapped
    }

    /**
     * @param argument Contains the configuration information of alarm state changes.
     */
    @JvmName("ojotjewapxkexdfc")
    public suspend fun alarmCapabilities(argument: suspend AlarmModelAlarmCapabilitiesArgsBuilder.() -> Unit) {
        val toBeMapped = AlarmModelAlarmCapabilitiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.alarmCapabilities = mapped
    }

    /**
     * @param value Contains information about one or more alarm actions.
     */
    @JvmName("kucugpxfkljxgkci")
    public suspend fun alarmEventActions(`value`: AlarmModelAlarmEventActionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alarmEventActions = mapped
    }

    /**
     * @param argument Contains information about one or more alarm actions.
     */
    @JvmName("fgbmnoikmhmvovpf")
    public suspend fun alarmEventActions(argument: suspend AlarmModelAlarmEventActionsArgsBuilder.() -> Unit) {
        val toBeMapped = AlarmModelAlarmEventActionsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.alarmEventActions = mapped
    }

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

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

    /**
     * @param value Defines when your alarm is invoked.
     */
    @JvmName("diojbthbuyfinjwn")
    public suspend fun alarmRule(`value`: AlarmModelAlarmRuleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alarmRule = mapped
    }

    /**
     * @param argument Defines when your alarm is invoked.
     */
    @JvmName("sqkphixhjmphkiwo")
    public suspend fun alarmRule(argument: suspend AlarmModelAlarmRuleArgsBuilder.() -> Unit) {
        val toBeMapped = AlarmModelAlarmRuleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.alarmRule = mapped
    }

    /**
     * @param value The value used to identify a alarm instance. When a device or system sends input, a new alarm instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding alarm instance based on this identifying information.
     * This parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct alarm instance, the device must send a message payload that contains the same attribute-value.
     */
    @JvmName("tiyfutiuxxjjdsyv")
    public suspend fun key(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.key = mapped
    }

    /**
     * @param value The ARN of the role that grants permission to AWS IoT Events to perform its operations.
     */
    @JvmName("ylbjteyatraihrph")
    public suspend fun roleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleArn = mapped
    }

    /**
     * @param value A non-negative integer that reflects the severity level of the alarm.
     */
    @JvmName("wkjfovpfeuhnkycs")
    public suspend fun severity(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.severity = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("tvastmrtuvpltbdi")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("nsvnxfoerunbqgdu")
    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 An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("pprgtxlicycyuute")
    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 An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("rutehwhknafcufas")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
     */
    @JvmName("gadvxvkyfvtejqef")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AlarmModelArgs = AlarmModelArgs(
        alarmCapabilities = alarmCapabilities,
        alarmEventActions = alarmEventActions,
        alarmModelDescription = alarmModelDescription,
        alarmModelName = alarmModelName,
        alarmRule = alarmRule,
        key = key,
        roleArn = roleArn,
        severity = severity,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy