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

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

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

package com.pulumi.awsnative.cloudwatch.kotlin

import com.pulumi.awsnative.cloudwatch.AlarmArgs.builder
import com.pulumi.awsnative.cloudwatch.kotlin.inputs.AlarmDimensionArgs
import com.pulumi.awsnative.cloudwatch.kotlin.inputs.AlarmDimensionArgsBuilder
import com.pulumi.awsnative.cloudwatch.kotlin.inputs.AlarmMetricDataQueryArgs
import com.pulumi.awsnative.cloudwatch.kotlin.inputs.AlarmMetricDataQueryArgsBuilder
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.Double
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The ``AWS::CloudWatch::Alarm`` type specifies an alarm and associates it with the specified metric or metric math expression.
 *  When this operation creates an alarm, the alarm state is immediately set to ``INSUFFICIENT_DATA``. The alarm is then evaluated and its state is set appropriately. Any actions associated with the new state are then executed.
 *  When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm.
 * @property actionsEnabled Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
 * @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). For more information about creating alarms and the actions that you can specify, see [PutMetricAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html) in the *API Reference*.
 * @property alarmDescription The description of the alarm.
 * @property alarmName The name of the alarm. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the alarm name.
 *   If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
 * @property comparisonOperator The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
 * @property datapointsToAlarm The number of datapoints that must be breaching to trigger the alarm. This is used only if you are setting an "M out of N" alarm. In that case, this value is the M, and the value that you set for ``EvaluationPeriods`` is the N value. For more information, see [Evaluating an Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) in the *User Guide*.
 *  If you omit this parameter, CW uses the same value here that you set for ``EvaluationPeriods``, and the alarm goes to alarm state if that many consecutive periods are breaching.
 * @property dimensions The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify ``Dimensions``. Instead, you use ``Metrics``.
 * @property evaluateLowSampleCountPercentile Used only for alarms based on percentiles. If ``ignore``, the alarm state does not change during periods with too few data points to be statistically significant. If ``evaluate`` or this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available.
 * @property evaluationPeriods The number of periods over which data is compared to the specified threshold. If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N, and ``DatapointsToAlarm`` is the M.
 *  For more information, see [Evaluating an Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) in the *User Guide*.
 * @property extendedStatistic The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
 *  For an alarm based on a metric, you must specify either ``Statistic`` or ``ExtendedStatistic`` but not both.
 *  For an alarm based on a math expression, you can't specify ``ExtendedStatistic``. Instead, you use ``Metrics``.
 * @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 metricName The name of the metric associated with the alarm. This is required for an alarm based on a metric. For an alarm based on a math expression, you use ``Metrics`` instead and you can't specify ``MetricName``.
 * @property metrics An array that enables you to create an alarm based on the result of a metric math expression. Each item in the array either retrieves a metric or performs a math expression.
 *  If you specify the ``Metrics`` parameter, you cannot specify ``MetricName``, ``Dimensions``, ``Period``, ``Namespace``, ``Statistic``, ``ExtendedStatistic``, or ``Unit``.
 * @property namespace The namespace of the metric associated with the alarm. This is required for an alarm based on a metric. For an alarm based on a math expression, you can't specify ``Namespace`` and you use ``Metrics`` instead.
 *  For a list of namespaces for metrics from AWS services, see [Services That Publish Metrics.](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html)
 * @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 period The period, in seconds, over which the statistic is applied. This is required for an alarm based on a metric. Valid values are 10, 30, 60, and any multiple of 60.
 *  For an alarm based on a math expression, you can't specify ``Period``, and instead you use the ``Metrics`` parameter.
 *   *Minimum:* 10
 * @property statistic The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use ``ExtendedStatistic``.
 *  For an alarm based on a metric, you must specify either ``Statistic`` or ``ExtendedStatistic`` but not both.
 *  For an alarm based on a math expression, you can't specify ``Statistic``. Instead, you use ``Metrics``.
 * @property tags A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm. To be able to associate tags with the alarm when you create the alarm, you must have the ``cloudwatch:TagResource`` permission.
 *  Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
 * @property threshold The value to compare with the specified statistic.
 * @property thresholdMetricId In an alarm based on an anomaly detection model, this is the ID of the ``ANOMALY_DETECTION_BAND`` function used as the threshold for the alarm.
 * @property treatMissingData Sets how this alarm is to handle missing data points. Valid values are ``breaching``, ``notBreaching``, ``ignore``, and ``missing``. For more information, see [Configuring How Alarms Treat Missing Data](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data) in the *Amazon User Guide*.
 *  If you omit this parameter, the default behavior of ``missing`` is used.
 * @property unit The unit of the metric associated with the alarm. Specify this only if you are creating an alarm based on a single metric. Do not specify this if you are specifying a ``Metrics`` array.
 *   You can specify the following values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, or None.
 */
public data class AlarmArgs(
    public val actionsEnabled: Output? = null,
    public val alarmActions: Output>? = null,
    public val alarmDescription: Output? = null,
    public val alarmName: Output? = null,
    public val comparisonOperator: Output? = null,
    public val datapointsToAlarm: Output? = null,
    public val dimensions: Output>? = null,
    public val evaluateLowSampleCountPercentile: Output? = null,
    public val evaluationPeriods: Output? = null,
    public val extendedStatistic: Output? = null,
    public val insufficientDataActions: Output>? = null,
    public val metricName: Output? = null,
    public val metrics: Output>? = null,
    public val namespace: Output? = null,
    public val okActions: Output>? = null,
    public val period: Output? = null,
    public val statistic: Output? = null,
    public val tags: Output>? = null,
    public val threshold: Output? = null,
    public val thresholdMetricId: Output? = null,
    public val treatMissingData: Output? = null,
    public val unit: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cloudwatch.AlarmArgs =
        com.pulumi.awsnative.cloudwatch.AlarmArgs.builder()
            .actionsEnabled(actionsEnabled?.applyValue({ args0 -> args0 }))
            .alarmActions(alarmActions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .alarmDescription(alarmDescription?.applyValue({ args0 -> args0 }))
            .alarmName(alarmName?.applyValue({ args0 -> args0 }))
            .comparisonOperator(comparisonOperator?.applyValue({ args0 -> args0 }))
            .datapointsToAlarm(datapointsToAlarm?.applyValue({ args0 -> args0 }))
            .dimensions(
                dimensions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .evaluateLowSampleCountPercentile(evaluateLowSampleCountPercentile?.applyValue({ args0 -> args0 }))
            .evaluationPeriods(evaluationPeriods?.applyValue({ args0 -> args0 }))
            .extendedStatistic(extendedStatistic?.applyValue({ args0 -> args0 }))
            .insufficientDataActions(
                insufficientDataActions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .metricName(metricName?.applyValue({ args0 -> args0 }))
            .metrics(
                metrics?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .namespace(namespace?.applyValue({ args0 -> args0 }))
            .okActions(okActions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .period(period?.applyValue({ args0 -> args0 }))
            .statistic(statistic?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .threshold(threshold?.applyValue({ args0 -> args0 }))
            .thresholdMetricId(thresholdMetricId?.applyValue({ args0 -> args0 }))
            .treatMissingData(treatMissingData?.applyValue({ args0 -> args0 }))
            .unit(unit?.applyValue({ args0 -> args0 })).build()
}

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

    private var alarmActions: Output>? = null

    private var alarmDescription: Output? = null

    private var alarmName: Output? = null

    private var comparisonOperator: Output? = null

    private var datapointsToAlarm: Output? = null

    private var dimensions: Output>? = null

    private var evaluateLowSampleCountPercentile: Output? = null

    private var evaluationPeriods: Output? = null

    private var extendedStatistic: Output? = null

    private var insufficientDataActions: Output>? = null

    private var metricName: Output? = null

    private var metrics: Output>? = null

    private var namespace: Output? = null

    private var okActions: Output>? = null

    private var period: Output? = null

    private var statistic: Output? = null

    private var tags: Output>? = null

    private var threshold: Output? = null

    private var thresholdMetricId: Output? = null

    private var treatMissingData: Output? = null

    private var unit: Output? = null

    /**
     * @param value Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
     */
    @JvmName("gdemgdsxakglgvcs")
    public suspend fun actionsEnabled(`value`: Output) {
        this.actionsEnabled = 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). For more information about creating alarms and the actions that you can specify, see [PutMetricAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html) in the *API Reference*.
     */
    @JvmName("gceapgophljfdwup")
    public suspend fun alarmActions(`value`: Output>) {
        this.alarmActions = value
    }

    @JvmName("daqmtamjmxftcktq")
    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). For more information about creating alarms and the actions that you can specify, see [PutMetricAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html) in the *API Reference*.
     */
    @JvmName("lvtogsifxcackueb")
    public suspend fun alarmActions(values: List>) {
        this.alarmActions = Output.all(values)
    }

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

    /**
     * @param value The name of the alarm. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the alarm name.
     *   If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
     */
    @JvmName("gvxrlgkrunicepdh")
    public suspend fun alarmName(`value`: Output) {
        this.alarmName = value
    }

    /**
     * @param value The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
     */
    @JvmName("mrfpjjuhfuugfbcs")
    public suspend fun comparisonOperator(`value`: Output) {
        this.comparisonOperator = value
    }

    /**
     * @param value The number of datapoints that must be breaching to trigger the alarm. This is used only if you are setting an "M out of N" alarm. In that case, this value is the M, and the value that you set for ``EvaluationPeriods`` is the N value. For more information, see [Evaluating an Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) in the *User Guide*.
     *  If you omit this parameter, CW uses the same value here that you set for ``EvaluationPeriods``, and the alarm goes to alarm state if that many consecutive periods are breaching.
     */
    @JvmName("cfrkgouqeuyocomo")
    public suspend fun datapointsToAlarm(`value`: Output) {
        this.datapointsToAlarm = value
    }

    /**
     * @param value The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify ``Dimensions``. Instead, you use ``Metrics``.
     */
    @JvmName("itaushxcdnugppdb")
    public suspend fun dimensions(`value`: Output>) {
        this.dimensions = value
    }

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

    /**
     * @param values The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify ``Dimensions``. Instead, you use ``Metrics``.
     */
    @JvmName("mcossbyvggskjcsq")
    public suspend fun dimensions(values: List>) {
        this.dimensions = Output.all(values)
    }

    /**
     * @param value Used only for alarms based on percentiles. If ``ignore``, the alarm state does not change during periods with too few data points to be statistically significant. If ``evaluate`` or this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available.
     */
    @JvmName("rqcpvttsipilfias")
    public suspend fun evaluateLowSampleCountPercentile(`value`: Output) {
        this.evaluateLowSampleCountPercentile = value
    }

    /**
     * @param value The number of periods over which data is compared to the specified threshold. If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N, and ``DatapointsToAlarm`` is the M.
     *  For more information, see [Evaluating an Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) in the *User Guide*.
     */
    @JvmName("dpswbnwdykiblmvi")
    public suspend fun evaluationPeriods(`value`: Output) {
        this.evaluationPeriods = value
    }

    /**
     * @param value The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
     *  For an alarm based on a metric, you must specify either ``Statistic`` or ``ExtendedStatistic`` but not both.
     *  For an alarm based on a math expression, you can't specify ``ExtendedStatistic``. Instead, you use ``Metrics``.
     */
    @JvmName("fcpnmjtllppmcsyj")
    public suspend fun extendedStatistic(`value`: Output) {
        this.extendedStatistic = 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("qubffffihqdnntgw")
    public suspend fun insufficientDataActions(`value`: Output>) {
        this.insufficientDataActions = value
    }

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

    /**
     * @param value The name of the metric associated with the alarm. This is required for an alarm based on a metric. For an alarm based on a math expression, you use ``Metrics`` instead and you can't specify ``MetricName``.
     */
    @JvmName("xoqsmyblpbnagpjc")
    public suspend fun metricName(`value`: Output) {
        this.metricName = value
    }

    /**
     * @param value An array that enables you to create an alarm based on the result of a metric math expression. Each item in the array either retrieves a metric or performs a math expression.
     *  If you specify the ``Metrics`` parameter, you cannot specify ``MetricName``, ``Dimensions``, ``Period``, ``Namespace``, ``Statistic``, ``ExtendedStatistic``, or ``Unit``.
     */
    @JvmName("qqhbtgnovmjbcidf")
    public suspend fun metrics(`value`: Output>) {
        this.metrics = value
    }

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

    /**
     * @param values An array that enables you to create an alarm based on the result of a metric math expression. Each item in the array either retrieves a metric or performs a math expression.
     *  If you specify the ``Metrics`` parameter, you cannot specify ``MetricName``, ``Dimensions``, ``Period``, ``Namespace``, ``Statistic``, ``ExtendedStatistic``, or ``Unit``.
     */
    @JvmName("eslrjgdxpgidhhfa")
    public suspend fun metrics(values: List>) {
        this.metrics = Output.all(values)
    }

    /**
     * @param value The namespace of the metric associated with the alarm. This is required for an alarm based on a metric. For an alarm based on a math expression, you can't specify ``Namespace`` and you use ``Metrics`` instead.
     *  For a list of namespaces for metrics from AWS services, see [Services That Publish Metrics.](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html)
     */
    @JvmName("arvgfbbihlnisjyd")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @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("akbvdghlgbccfsbn")
    public suspend fun okActions(`value`: Output>) {
        this.okActions = value
    }

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

    /**
     * @param value The period, in seconds, over which the statistic is applied. This is required for an alarm based on a metric. Valid values are 10, 30, 60, and any multiple of 60.
     *  For an alarm based on a math expression, you can't specify ``Period``, and instead you use the ``Metrics`` parameter.
     *   *Minimum:* 10
     */
    @JvmName("jgwwujihyotnropu")
    public suspend fun period(`value`: Output) {
        this.period = value
    }

    /**
     * @param value The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use ``ExtendedStatistic``.
     *  For an alarm based on a metric, you must specify either ``Statistic`` or ``ExtendedStatistic`` but not both.
     *  For an alarm based on a math expression, you can't specify ``Statistic``. Instead, you use ``Metrics``.
     */
    @JvmName("wdbqvitnxemcmghg")
    public suspend fun statistic(`value`: Output) {
        this.statistic = value
    }

    /**
     * @param value A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm. To be able to associate tags with the alarm when you create the alarm, you must have the ``cloudwatch:TagResource`` permission.
     *  Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("bphjmktomaawtrsu")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("sokefipyeagdckoo")
    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 alarm. You can associate as many as 50 tags with an alarm. To be able to associate tags with the alarm when you create the alarm, you must have the ``cloudwatch:TagResource`` permission.
     *  Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("yobmfvqmihikorjg")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The value to compare with the specified statistic.
     */
    @JvmName("orwaatpkxsgjwvmo")
    public suspend fun threshold(`value`: Output) {
        this.threshold = value
    }

    /**
     * @param value In an alarm based on an anomaly detection model, this is the ID of the ``ANOMALY_DETECTION_BAND`` function used as the threshold for the alarm.
     */
    @JvmName("dpptnpptcnscttvd")
    public suspend fun thresholdMetricId(`value`: Output) {
        this.thresholdMetricId = value
    }

    /**
     * @param value Sets how this alarm is to handle missing data points. Valid values are ``breaching``, ``notBreaching``, ``ignore``, and ``missing``. For more information, see [Configuring How Alarms Treat Missing Data](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data) in the *Amazon User Guide*.
     *  If you omit this parameter, the default behavior of ``missing`` is used.
     */
    @JvmName("elwhuvgirsrdpirp")
    public suspend fun treatMissingData(`value`: Output) {
        this.treatMissingData = value
    }

    /**
     * @param value The unit of the metric associated with the alarm. Specify this only if you are creating an alarm based on a single metric. Do not specify this if you are specifying a ``Metrics`` array.
     *   You can specify the following values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, or None.
     */
    @JvmName("lbcyrheaaemhcdlq")
    public suspend fun unit(`value`: Output) {
        this.unit = value
    }

    /**
     * @param value Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
     */
    @JvmName("soifgkxctblvpmtc")
    public suspend fun actionsEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actionsEnabled = 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). For more information about creating alarms and the actions that you can specify, see [PutMetricAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html) in the *API Reference*.
     */
    @JvmName("lxofechnidalpdov")
    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). For more information about creating alarms and the actions that you can specify, see [PutMetricAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html) in the *API Reference*.
     */
    @JvmName("hheodxdebnngjwgd")
    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("rvemucparanttlkn")
    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 alarm. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the alarm name.
     *   If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
     */
    @JvmName("mwwneygmjuflyorp")
    public suspend fun alarmName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alarmName = mapped
    }

    /**
     * @param value The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
     */
    @JvmName("myyirgulhlfnvptt")
    public suspend fun comparisonOperator(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.comparisonOperator = mapped
    }

    /**
     * @param value The number of datapoints that must be breaching to trigger the alarm. This is used only if you are setting an "M out of N" alarm. In that case, this value is the M, and the value that you set for ``EvaluationPeriods`` is the N value. For more information, see [Evaluating an Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) in the *User Guide*.
     *  If you omit this parameter, CW uses the same value here that you set for ``EvaluationPeriods``, and the alarm goes to alarm state if that many consecutive periods are breaching.
     */
    @JvmName("xxoeukrynmvkdacb")
    public suspend fun datapointsToAlarm(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.datapointsToAlarm = mapped
    }

    /**
     * @param value The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify ``Dimensions``. Instead, you use ``Metrics``.
     */
    @JvmName("lcjqxxttnaicqfly")
    public suspend fun dimensions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dimensions = mapped
    }

    /**
     * @param argument The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify ``Dimensions``. Instead, you use ``Metrics``.
     */
    @JvmName("efvocsrsmxomajrf")
    public suspend fun dimensions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AlarmDimensionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.dimensions = mapped
    }

    /**
     * @param argument The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify ``Dimensions``. Instead, you use ``Metrics``.
     */
    @JvmName("tpaldhrwgcrehhac")
    public suspend fun dimensions(vararg argument: suspend AlarmDimensionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AlarmDimensionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.dimensions = mapped
    }

    /**
     * @param argument The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify ``Dimensions``. Instead, you use ``Metrics``.
     */
    @JvmName("wxwlglvbrutmelsu")
    public suspend fun dimensions(argument: suspend AlarmDimensionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AlarmDimensionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.dimensions = mapped
    }

    /**
     * @param values The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify ``Dimensions``. Instead, you use ``Metrics``.
     */
    @JvmName("octmtjxtpcujyunj")
    public suspend fun dimensions(vararg values: AlarmDimensionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dimensions = mapped
    }

    /**
     * @param value Used only for alarms based on percentiles. If ``ignore``, the alarm state does not change during periods with too few data points to be statistically significant. If ``evaluate`` or this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available.
     */
    @JvmName("froywybecmawyfaw")
    public suspend fun evaluateLowSampleCountPercentile(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.evaluateLowSampleCountPercentile = mapped
    }

    /**
     * @param value The number of periods over which data is compared to the specified threshold. If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N, and ``DatapointsToAlarm`` is the M.
     *  For more information, see [Evaluating an Alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) in the *User Guide*.
     */
    @JvmName("liqrebqvfspobqie")
    public suspend fun evaluationPeriods(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.evaluationPeriods = mapped
    }

    /**
     * @param value The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
     *  For an alarm based on a metric, you must specify either ``Statistic`` or ``ExtendedStatistic`` but not both.
     *  For an alarm based on a math expression, you can't specify ``ExtendedStatistic``. Instead, you use ``Metrics``.
     */
    @JvmName("fnmplxhfvxyvalws")
    public suspend fun extendedStatistic(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.extendedStatistic = 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("bokhgkrfurtvowcg")
    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("qyaqowxddcxspbby")
    public suspend fun insufficientDataActions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.insufficientDataActions = mapped
    }

    /**
     * @param value The name of the metric associated with the alarm. This is required for an alarm based on a metric. For an alarm based on a math expression, you use ``Metrics`` instead and you can't specify ``MetricName``.
     */
    @JvmName("xjbyruudelhxopig")
    public suspend fun metricName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metricName = mapped
    }

    /**
     * @param value An array that enables you to create an alarm based on the result of a metric math expression. Each item in the array either retrieves a metric or performs a math expression.
     *  If you specify the ``Metrics`` parameter, you cannot specify ``MetricName``, ``Dimensions``, ``Period``, ``Namespace``, ``Statistic``, ``ExtendedStatistic``, or ``Unit``.
     */
    @JvmName("htmnbvqhmjoujbvk")
    public suspend fun metrics(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metrics = mapped
    }

    /**
     * @param argument An array that enables you to create an alarm based on the result of a metric math expression. Each item in the array either retrieves a metric or performs a math expression.
     *  If you specify the ``Metrics`` parameter, you cannot specify ``MetricName``, ``Dimensions``, ``Period``, ``Namespace``, ``Statistic``, ``ExtendedStatistic``, or ``Unit``.
     */
    @JvmName("ycdoqpaarlexmuji")
    public suspend fun metrics(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AlarmMetricDataQueryArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.metrics = mapped
    }

    /**
     * @param argument An array that enables you to create an alarm based on the result of a metric math expression. Each item in the array either retrieves a metric or performs a math expression.
     *  If you specify the ``Metrics`` parameter, you cannot specify ``MetricName``, ``Dimensions``, ``Period``, ``Namespace``, ``Statistic``, ``ExtendedStatistic``, or ``Unit``.
     */
    @JvmName("oqijtwpgwwifvjla")
    public suspend fun metrics(vararg argument: suspend AlarmMetricDataQueryArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AlarmMetricDataQueryArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.metrics = mapped
    }

    /**
     * @param argument An array that enables you to create an alarm based on the result of a metric math expression. Each item in the array either retrieves a metric or performs a math expression.
     *  If you specify the ``Metrics`` parameter, you cannot specify ``MetricName``, ``Dimensions``, ``Period``, ``Namespace``, ``Statistic``, ``ExtendedStatistic``, or ``Unit``.
     */
    @JvmName("cqdmkfdljicyobba")
    public suspend fun metrics(argument: suspend AlarmMetricDataQueryArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AlarmMetricDataQueryArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.metrics = mapped
    }

    /**
     * @param values An array that enables you to create an alarm based on the result of a metric math expression. Each item in the array either retrieves a metric or performs a math expression.
     *  If you specify the ``Metrics`` parameter, you cannot specify ``MetricName``, ``Dimensions``, ``Period``, ``Namespace``, ``Statistic``, ``ExtendedStatistic``, or ``Unit``.
     */
    @JvmName("haqvivpmuaigvrnx")
    public suspend fun metrics(vararg values: AlarmMetricDataQueryArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metrics = mapped
    }

    /**
     * @param value The namespace of the metric associated with the alarm. This is required for an alarm based on a metric. For an alarm based on a math expression, you can't specify ``Namespace`` and you use ``Metrics`` instead.
     *  For a list of namespaces for metrics from AWS services, see [Services That Publish Metrics.](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html)
     */
    @JvmName("vgrrycpnaavsymic")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = 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("sevxrfajrjdfjwjy")
    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("cnorcsxcgopydjcd")
    public suspend fun okActions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.okActions = mapped
    }

    /**
     * @param value The period, in seconds, over which the statistic is applied. This is required for an alarm based on a metric. Valid values are 10, 30, 60, and any multiple of 60.
     *  For an alarm based on a math expression, you can't specify ``Period``, and instead you use the ``Metrics`` parameter.
     *   *Minimum:* 10
     */
    @JvmName("ruejmowuatxmqwtv")
    public suspend fun period(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.period = mapped
    }

    /**
     * @param value The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use ``ExtendedStatistic``.
     *  For an alarm based on a metric, you must specify either ``Statistic`` or ``ExtendedStatistic`` but not both.
     *  For an alarm based on a math expression, you can't specify ``Statistic``. Instead, you use ``Metrics``.
     */
    @JvmName("rcyirqlnltbrbvgl")
    public suspend fun statistic(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statistic = mapped
    }

    /**
     * @param value A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm. To be able to associate tags with the alarm when you create the alarm, you must have the ``cloudwatch:TagResource`` permission.
     *  Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("yhkqfqscutxqxrwk")
    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 alarm. You can associate as many as 50 tags with an alarm. To be able to associate tags with the alarm when you create the alarm, you must have the ``cloudwatch:TagResource`` permission.
     *  Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("sfofsralruawjnqs")
    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 alarm. You can associate as many as 50 tags with an alarm. To be able to associate tags with the alarm when you create the alarm, you must have the ``cloudwatch:TagResource`` permission.
     *  Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("cqboqlnmvelsxoqt")
    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 alarm. You can associate as many as 50 tags with an alarm. To be able to associate tags with the alarm when you create the alarm, you must have the ``cloudwatch:TagResource`` permission.
     *  Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("njcdpbskjdetrfen")
    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 alarm. You can associate as many as 50 tags with an alarm. To be able to associate tags with the alarm when you create the alarm, you must have the ``cloudwatch:TagResource`` permission.
     *  Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("wbrlobystyfmfxlw")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The value to compare with the specified statistic.
     */
    @JvmName("bcmltbpnrcfoeefl")
    public suspend fun threshold(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.threshold = mapped
    }

    /**
     * @param value In an alarm based on an anomaly detection model, this is the ID of the ``ANOMALY_DETECTION_BAND`` function used as the threshold for the alarm.
     */
    @JvmName("rejtmiipaxaeeoqr")
    public suspend fun thresholdMetricId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.thresholdMetricId = mapped
    }

    /**
     * @param value Sets how this alarm is to handle missing data points. Valid values are ``breaching``, ``notBreaching``, ``ignore``, and ``missing``. For more information, see [Configuring How Alarms Treat Missing Data](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data) in the *Amazon User Guide*.
     *  If you omit this parameter, the default behavior of ``missing`` is used.
     */
    @JvmName("wesvymuylxvdlaap")
    public suspend fun treatMissingData(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.treatMissingData = mapped
    }

    /**
     * @param value The unit of the metric associated with the alarm. Specify this only if you are creating an alarm based on a single metric. Do not specify this if you are specifying a ``Metrics`` array.
     *   You can specify the following values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, or None.
     */
    @JvmName("cmmrcbyguvritjgr")
    public suspend fun unit(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.unit = mapped
    }

    internal fun build(): AlarmArgs = AlarmArgs(
        actionsEnabled = actionsEnabled,
        alarmActions = alarmActions,
        alarmDescription = alarmDescription,
        alarmName = alarmName,
        comparisonOperator = comparisonOperator,
        datapointsToAlarm = datapointsToAlarm,
        dimensions = dimensions,
        evaluateLowSampleCountPercentile = evaluateLowSampleCountPercentile,
        evaluationPeriods = evaluationPeriods,
        extendedStatistic = extendedStatistic,
        insufficientDataActions = insufficientDataActions,
        metricName = metricName,
        metrics = metrics,
        namespace = namespace,
        okActions = okActions,
        period = period,
        statistic = statistic,
        tags = tags,
        threshold = threshold,
        thresholdMetricId = thresholdMetricId,
        treatMissingData = treatMissingData,
        unit = unit,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy