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

com.pulumi.awsnative.ce.kotlin.AnomalySubscriptionArgs.kt Maven / Gradle / Ivy

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @param value The dollar value that triggers a notification if the threshold is exceeded.
     */
    @JvmName("xccdcvjmdtgduwex")
    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("itkurbbbuftuinyv")
    public suspend fun thresholdExpression(`value`: Output) {
        this.thresholdExpression = value
    }

    /**
     * @param value The frequency at which anomaly reports are sent over email.
     */
    @JvmName("hdkisermomiyasct")
    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("vuqlwdukppbjgtyh")
    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("anghadufnhpgkcxp")
    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("ehbngenoflxepeju")
    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("hbtrxxxpacpsjjux")
    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("uljabbeilrejbxam")
    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("bwarimumjbdjussn")
    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("dcogggipssnjymbm")
    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("dvsuxrlqvnlfqhof")
    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("ygvisrkujrfdjvui")
    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("ejmjqhyhhucaqcnn")
    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("oexoxnfjllonfard")
    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("bisfsbmxdwkraqpb")
    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("tfowrxulysoootiy")
    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("bpwlatbaxfssfonn")
    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("kiqwqykgexkxidvg")
    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 - 2024 Weber Informatics LLC | Privacy Policy