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

com.pulumi.awsnative.ce.kotlin.AnomalySubscriptionArgs.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.ce.kotlin

import com.pulumi.awsnative.ce.AnomalySubscriptionArgs.builder
import com.pulumi.awsnative.ce.kotlin.enums.AnomalySubscriptionFrequency
import com.pulumi.awsnative.ce.kotlin.inputs.AnomalySubscriptionResourceTagArgs
import com.pulumi.awsnative.ce.kotlin.inputs.AnomalySubscriptionResourceTagArgsBuilder
import com.pulumi.awsnative.ce.kotlin.inputs.AnomalySubscriptionSubscriberArgs
import com.pulumi.awsnative.ce.kotlin.inputs.AnomalySubscriptionSubscriberArgsBuilder
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.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * AWS Cost Anomaly Detection leverages advanced Machine Learning technologies to identify anomalous spend and root causes, so you can quickly take action. Create subscription to be notified
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * @property frequency The frequency at which anomaly reports are sent over email.
 * @property monitorArnList A list of cost anomaly monitors.
 * @property resourceTags Tags to assign to subscription.
 * @property subscribers A list of subscriber
 * @property subscriptionName The name of the subscription.
 * @property threshold The dollar value that triggers a notification if the threshold is exceeded.
 * @property thresholdExpression An Expression object in JSON String format used to specify the anomalies that you want to generate alerts for.
 */
public data class AnomalySubscriptionArgs(
    public val frequency: Output? = null,
    public val monitorArnList: Output>? = null,
    public val resourceTags: Output>? = null,
    public val subscribers: Output>? = null,
    public val subscriptionName: Output? = null,
    public val threshold: Output? = null,
    public val thresholdExpression: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ce.AnomalySubscriptionArgs =
        com.pulumi.awsnative.ce.AnomalySubscriptionArgs.builder()
            .frequency(frequency?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .monitorArnList(monitorArnList?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .resourceTags(
                resourceTags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .subscribers(
                subscribers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .subscriptionName(subscriptionName?.applyValue({ args0 -> args0 }))
            .threshold(threshold?.applyValue({ args0 -> args0 }))
            .thresholdExpression(thresholdExpression?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AnomalySubscriptionArgs].
 */
@PulumiTagMarker
public class AnomalySubscriptionArgsBuilder internal constructor() {
    private var frequency: Output? = null

    private var monitorArnList: Output>? = null

    private var resourceTags: Output>? = null

    private var subscribers: Output>? = null

    private var subscriptionName: Output? = null

    private var threshold: Output? = null

    private var thresholdExpression: Output? = null

    /**
     * @param value The frequency at which anomaly reports are sent over email.
     */
    @JvmName("mnmurbklqoytbynk")
    public suspend fun frequency(`value`: Output) {
        this.frequency = value
    }

    /**
     * @param value A list of cost anomaly monitors.
     */
    @JvmName("rvkghykvkrjojdjp")
    public suspend fun monitorArnList(`value`: Output>) {
        this.monitorArnList = value
    }

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

    /**
     * @param values A list of cost anomaly monitors.
     */
    @JvmName("kgetovqoefebajly")
    public suspend fun monitorArnList(values: List>) {
        this.monitorArnList = Output.all(values)
    }

    /**
     * @param value Tags to assign to subscription.
     */
    @JvmName("djwjsytrweoeeacf")
    public suspend fun resourceTags(`value`: Output>) {
        this.resourceTags = value
    }

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

    /**
     * @param values Tags to assign to subscription.
     */
    @JvmName("gyftxpivbsfntdtn")
    public suspend fun resourceTags(values: List>) {
        this.resourceTags = Output.all(values)
    }

    /**
     * @param value A list of subscriber
     */
    @JvmName("qmvnsqodsxuwtopc")
    public suspend fun subscribers(`value`: Output>) {
        this.subscribers = value
    }

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

    /**
     * @param values A list of subscriber
     */
    @JvmName("ardehfciuamlkmia")
    public suspend fun subscribers(values: List>) {
        this.subscribers = Output.all(values)
    }

    /**
     * @param value The name of the subscription.
     */
    @JvmName("xgpvprnlgwitxdvm")
    public suspend fun subscriptionName(`value`: Output) {
        this.subscriptionName = value
    }

    /**
     * @param value The dollar value that triggers a notification if the threshold is exceeded.
     */
    @JvmName("tdeygktlvppghxel")
    public suspend fun threshold(`value`: Output) {
        this.threshold = value
    }

    /**
     * @param value An Expression object in JSON String format used to specify the anomalies that you want to generate alerts for.
     */
    @JvmName("vylwoxacmjjpvyfr")
    public suspend fun thresholdExpression(`value`: Output) {
        this.thresholdExpression = value
    }

    /**
     * @param value The frequency at which anomaly reports are sent over email.
     */
    @JvmName("aliakrtxcevdiywc")
    public suspend fun frequency(`value`: AnomalySubscriptionFrequency?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.frequency = mapped
    }

    /**
     * @param value A list of cost anomaly monitors.
     */
    @JvmName("ydefepaucmmgoofh")
    public suspend fun monitorArnList(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.monitorArnList = mapped
    }

    /**
     * @param values A list of cost anomaly monitors.
     */
    @JvmName("xodsttkbebfukqxw")
    public suspend fun monitorArnList(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.monitorArnList = mapped
    }

    /**
     * @param value Tags to assign to subscription.
     */
    @JvmName("jjooawldnflkmfic")
    public suspend fun resourceTags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceTags = mapped
    }

    /**
     * @param argument Tags to assign to subscription.
     */
    @JvmName("bqmbakjpphmdnhak")
    public suspend fun resourceTags(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AnomalySubscriptionResourceTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.resourceTags = mapped
    }

    /**
     * @param argument Tags to assign to subscription.
     */
    @JvmName("bvhhttgcabfusaig")
    public suspend fun resourceTags(vararg argument: suspend AnomalySubscriptionResourceTagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AnomalySubscriptionResourceTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.resourceTags = mapped
    }

    /**
     * @param argument Tags to assign to subscription.
     */
    @JvmName("gcbglgornxegyywm")
    public suspend fun resourceTags(argument: suspend AnomalySubscriptionResourceTagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AnomalySubscriptionResourceTagArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.resourceTags = mapped
    }

    /**
     * @param values Tags to assign to subscription.
     */
    @JvmName("uqgnqyueduiplajl")
    public suspend fun resourceTags(vararg values: AnomalySubscriptionResourceTagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceTags = mapped
    }

    /**
     * @param value A list of subscriber
     */
    @JvmName("nwnynpxetstrxjys")
    public suspend fun subscribers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subscribers = mapped
    }

    /**
     * @param argument A list of subscriber
     */
    @JvmName("htquqypqbkxebuit")
    public suspend fun subscribers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AnomalySubscriptionSubscriberArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.subscribers = mapped
    }

    /**
     * @param argument A list of subscriber
     */
    @JvmName("mglphkwdyygwpcnj")
    public suspend fun subscribers(vararg argument: suspend AnomalySubscriptionSubscriberArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AnomalySubscriptionSubscriberArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.subscribers = mapped
    }

    /**
     * @param argument A list of subscriber
     */
    @JvmName("aogrghkhyixpgxgb")
    public suspend fun subscribers(argument: suspend AnomalySubscriptionSubscriberArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AnomalySubscriptionSubscriberArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.subscribers = mapped
    }

    /**
     * @param values A list of subscriber
     */
    @JvmName("vnvtkjopueshoany")
    public suspend fun subscribers(vararg values: AnomalySubscriptionSubscriberArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subscribers = mapped
    }

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

    /**
     * @param value The dollar value that triggers a notification if the threshold is exceeded.
     */
    @JvmName("sqjawkmfgqykabvx")
    public suspend fun threshold(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.threshold = mapped
    }

    /**
     * @param value An Expression object in JSON String format used to specify the anomalies that you want to generate alerts for.
     */
    @JvmName("vxoitfdeooxoboqn")
    public suspend fun thresholdExpression(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.thresholdExpression = mapped
    }

    internal fun build(): AnomalySubscriptionArgs = AnomalySubscriptionArgs(
        frequency = frequency,
        monitorArnList = monitorArnList,
        resourceTags = resourceTags,
        subscribers = subscribers,
        subscriptionName = subscriptionName,
        threshold = threshold,
        thresholdExpression = thresholdExpression,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy