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

com.pulumi.awsnative.iotevents.kotlin.outputs.AlarmModelAlarmAction.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.iotevents.kotlin.outputs

import kotlin.Suppress

/**
 * Specifies one of the following actions to receive notifications when the alarm state changes.
 * @property dynamoDBv2 Defines an action to write to the Amazon DynamoDB table that you created. The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the [payload](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html). A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.
 *  You must use expressions for all parameters in ``DynamoDBv2Action``. The expressions accept literals, operators, functions, references, and substitution templates.
 *   **Examples**
 *  +  For literal values, the expressions must contain single quotes. For example, the value for the ``tableName`` parameter can be ``'GreenhouseTemperatureTable'``.
 *   +  For references, you must specify either variables or input values. For example, the value for the ``tableName`` parameter can be ``$variable.ddbtableName``.
 *   +  For a substitution template, you must use ``${}``, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
 *  In the following example, the value for the ``contentExpression`` parameter in ``Payload`` uses a substitution template.
 *   ``'{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'``
 *   +  For a string concatenation, you must use ``+``. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.
 *  In the following example, the value for the ``tableName`` parameter uses a string concatenation.
 *   ``'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date``
 *  For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *Developer Guide*.
 *  The value for the ``type`` parameter in ``Payload`` must be ``JSON``.
 * @property dynamoDb Defines an action to write to the Amazon DynamoDB table that you created. The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the [payload](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html). One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.
 *  You must use expressions for all parameters in ``DynamoDBAction``. The expressions accept literals, operators, functions, references, and substitution templates.
 *   **Examples**
 *  +  For literal values, the expressions must contain single quotes. For example, the value for the ``hashKeyType`` parameter can be ``'STRING'``.
 *   +  For references, you must specify either variables or input values. For example, the value for the ``hashKeyField`` parameter can be ``$input.GreenhouseInput.name``.
 *   +  For a substitution template, you must use ``${}``, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
 *  In the following example, the value for the ``hashKeyValue`` parameter uses a substitution template.
 *   ``'${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'``
 *   +  For a string concatenation, you must use ``+``. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.
 *  In the following example, the value for the ``tableName`` parameter uses a string concatenation.
 *   ``'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date``
 *  For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *Developer Guide*.
 *  If the defined payload type is a string, ``DynamoDBAction`` writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for the ``payloadField`` parameter is ``_raw``.
 * @property firehose Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
 * @property iotEvents Sends an ITE input, passing in information about the detector model instance and the event that triggered the action.
 * @property iotSiteWise Sends information about the detector model instance and the event that triggered the action to a specified asset property in ITSW.
 *  You must use expressions for all parameters in ``IotSiteWiseAction``. The expressions accept literals, operators, functions, references, and substitutions templates.
 *   **Examples**
 *  +  For literal values, the expressions must contain single quotes. For example, the value for the ``propertyAlias`` parameter can be ``'/company/windfarm/3/turbine/7/temperature'``.
 *   +  For references, you must specify either variables or input values. For example, the value for the ``assetId`` parameter can be ``$input.TurbineInput.assetId1``.
 *   +  For a substitution template, you must use ``${}``, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
 *  In the following example, the value for the ``propertyAlias`` parameter uses a substitution template.
 *   ``'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'``
 *  You must specify either ``propertyAlias`` or both ``assetId`` and ``propertyId`` to identify the target asset property in ITSW.
 *  For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *Developer Guide*.
 * @property iotTopicPublish Information required to publish the MQTT message through the IoT message broker.
 * @property lambda Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
 * @property sns Information required to publish the Amazon SNS message.
 * @property sqs Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
 */
public data class AlarmModelAlarmAction(
    public val dynamoDBv2: AlarmModelDynamoDBv2? = null,
    public val dynamoDb: AlarmModelDynamoDb? = null,
    public val firehose: AlarmModelFirehose? = null,
    public val iotEvents: AlarmModelIotEvents? = null,
    public val iotSiteWise: AlarmModelIotSiteWise? = null,
    public val iotTopicPublish: AlarmModelIotTopicPublish? = null,
    public val lambda: AlarmModelLambda? = null,
    public val sns: AlarmModelSns? = null,
    public val sqs: AlarmModelSqs? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.iotevents.outputs.AlarmModelAlarmAction): AlarmModelAlarmAction = AlarmModelAlarmAction(
            dynamoDBv2 = javaType.dynamoDBv2().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.iotevents.kotlin.outputs.AlarmModelDynamoDBv2.Companion.toKotlin(args0)
                })
            }).orElse(null),
            dynamoDb = javaType.dynamoDb().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.iotevents.kotlin.outputs.AlarmModelDynamoDb.Companion.toKotlin(args0)
                })
            }).orElse(null),
            firehose = javaType.firehose().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.iotevents.kotlin.outputs.AlarmModelFirehose.Companion.toKotlin(args0)
                })
            }).orElse(null),
            iotEvents = javaType.iotEvents().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.iotevents.kotlin.outputs.AlarmModelIotEvents.Companion.toKotlin(args0)
                })
            }).orElse(null),
            iotSiteWise = javaType.iotSiteWise().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.iotevents.kotlin.outputs.AlarmModelIotSiteWise.Companion.toKotlin(args0)
                })
            }).orElse(null),
            iotTopicPublish = javaType.iotTopicPublish().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.iotevents.kotlin.outputs.AlarmModelIotTopicPublish.Companion.toKotlin(args0)
                })
            }).orElse(null),
            lambda = javaType.lambda().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.iotevents.kotlin.outputs.AlarmModelLambda.Companion.toKotlin(args0)
                })
            }).orElse(null),
            sns = javaType.sns().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.iotevents.kotlin.outputs.AlarmModelSns.Companion.toKotlin(args0)
                })
            }).orElse(null),
            sqs = javaType.sqs().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.iotevents.kotlin.outputs.AlarmModelSqs.Companion.toKotlin(args0)
                })
            }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy