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

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

package com.pulumi.awsnative.budgets.kotlin

import com.pulumi.awsnative.budgets.BudgetsActionArgs.builder
import com.pulumi.awsnative.budgets.kotlin.enums.BudgetsActionActionType
import com.pulumi.awsnative.budgets.kotlin.enums.BudgetsActionApprovalModel
import com.pulumi.awsnative.budgets.kotlin.enums.BudgetsActionNotificationType
import com.pulumi.awsnative.budgets.kotlin.inputs.BudgetsActionActionThresholdArgs
import com.pulumi.awsnative.budgets.kotlin.inputs.BudgetsActionActionThresholdArgsBuilder
import com.pulumi.awsnative.budgets.kotlin.inputs.BudgetsActionDefinitionArgs
import com.pulumi.awsnative.budgets.kotlin.inputs.BudgetsActionDefinitionArgsBuilder
import com.pulumi.awsnative.budgets.kotlin.inputs.BudgetsActionSubscriberArgs
import com.pulumi.awsnative.budgets.kotlin.inputs.BudgetsActionSubscriberArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * An example resource schema demonstrating some basic constructs and validation rules.
 * @property actionThreshold The trigger threshold of the action.
 * @property actionType The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.
 * @property approvalModel This specifies if the action needs manual or automatic approval.
 * @property budgetName A string that represents the budget name. ":" and "\" characters aren't allowed.
 * @property definition Specifies all of the type-specific parameters.
 * @property executionRoleArn The role passed for action execution and reversion. Roles and actions must be in the same account.
 * @property notificationType The type of a notification.
 * @property resourceTags An optional list of tags to associate with the specified budget action. Each tag consists of a key and a value, and each key must be unique for the resource.
 * @property subscribers A list of subscribers.
 */
public data class BudgetsActionArgs(
    public val actionThreshold: Output? = null,
    public val actionType: Output? = null,
    public val approvalModel: Output? = null,
    public val budgetName: Output? = null,
    public val definition: Output? = null,
    public val executionRoleArn: Output? = null,
    public val notificationType: Output? = null,
    public val resourceTags: Output>? = null,
    public val subscribers: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.budgets.BudgetsActionArgs =
        com.pulumi.awsnative.budgets.BudgetsActionArgs.builder()
            .actionThreshold(actionThreshold?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .actionType(actionType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .approvalModel(approvalModel?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .budgetName(budgetName?.applyValue({ args0 -> args0 }))
            .definition(definition?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .executionRoleArn(executionRoleArn?.applyValue({ args0 -> args0 }))
            .notificationType(notificationType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceTags(
                resourceTags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .subscribers(
                subscribers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [BudgetsActionArgs].
 */
@PulumiTagMarker
public class BudgetsActionArgsBuilder internal constructor() {
    private var actionThreshold: Output? = null

    private var actionType: Output? = null

    private var approvalModel: Output? = null

    private var budgetName: Output? = null

    private var definition: Output? = null

    private var executionRoleArn: Output? = null

    private var notificationType: Output? = null

    private var resourceTags: Output>? = null

    private var subscribers: Output>? = null

    /**
     * @param value The trigger threshold of the action.
     */
    @JvmName("tcyqfrrvyiksywel")
    public suspend fun actionThreshold(`value`: Output) {
        this.actionThreshold = value
    }

    /**
     * @param value The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.
     */
    @JvmName("saydljresqdqiaav")
    public suspend fun actionType(`value`: Output) {
        this.actionType = value
    }

    /**
     * @param value This specifies if the action needs manual or automatic approval.
     */
    @JvmName("mcmtgvgttvwqhjos")
    public suspend fun approvalModel(`value`: Output) {
        this.approvalModel = value
    }

    /**
     * @param value A string that represents the budget name. ":" and "\" characters aren't allowed.
     */
    @JvmName("fpgmqidggtbykajs")
    public suspend fun budgetName(`value`: Output) {
        this.budgetName = value
    }

    /**
     * @param value Specifies all of the type-specific parameters.
     */
    @JvmName("ppnkqrdxvpifuorj")
    public suspend fun definition(`value`: Output) {
        this.definition = value
    }

    /**
     * @param value The role passed for action execution and reversion. Roles and actions must be in the same account.
     */
    @JvmName("rmabelgupgfdxjjw")
    public suspend fun executionRoleArn(`value`: Output) {
        this.executionRoleArn = value
    }

    /**
     * @param value The type of a notification.
     */
    @JvmName("wgwifmwrucpmmvwb")
    public suspend fun notificationType(`value`: Output) {
        this.notificationType = value
    }

    /**
     * @param value An optional list of tags to associate with the specified budget action. Each tag consists of a key and a value, and each key must be unique for the resource.
     */
    @JvmName("haseghsirbfvuiyw")
    public suspend fun resourceTags(`value`: Output>) {
        this.resourceTags = value
    }

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

    /**
     * @param values An optional list of tags to associate with the specified budget action. Each tag consists of a key and a value, and each key must be unique for the resource.
     */
    @JvmName("mtaaeahtcqqqynjj")
    public suspend fun resourceTags(values: List>) {
        this.resourceTags = Output.all(values)
    }

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

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

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

    /**
     * @param value The trigger threshold of the action.
     */
    @JvmName("fwgifbxqqyvpluoy")
    public suspend fun actionThreshold(`value`: BudgetsActionActionThresholdArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actionThreshold = mapped
    }

    /**
     * @param argument The trigger threshold of the action.
     */
    @JvmName("sxdtyqbdeakfbtmn")
    public suspend fun actionThreshold(argument: suspend BudgetsActionActionThresholdArgsBuilder.() -> Unit) {
        val toBeMapped = BudgetsActionActionThresholdArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.actionThreshold = mapped
    }

    /**
     * @param value The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.
     */
    @JvmName("aluscffjcelvcrdk")
    public suspend fun actionType(`value`: BudgetsActionActionType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actionType = mapped
    }

    /**
     * @param value This specifies if the action needs manual or automatic approval.
     */
    @JvmName("vnpfckxorrmnuhaw")
    public suspend fun approvalModel(`value`: BudgetsActionApprovalModel?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.approvalModel = mapped
    }

    /**
     * @param value A string that represents the budget name. ":" and "\" characters aren't allowed.
     */
    @JvmName("rwkddlqljivnjgcl")
    public suspend fun budgetName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.budgetName = mapped
    }

    /**
     * @param value Specifies all of the type-specific parameters.
     */
    @JvmName("jfctgdxnmwmrvglc")
    public suspend fun definition(`value`: BudgetsActionDefinitionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.definition = mapped
    }

    /**
     * @param argument Specifies all of the type-specific parameters.
     */
    @JvmName("uelfemmguqaoouln")
    public suspend fun definition(argument: suspend BudgetsActionDefinitionArgsBuilder.() -> Unit) {
        val toBeMapped = BudgetsActionDefinitionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.definition = mapped
    }

    /**
     * @param value The role passed for action execution and reversion. Roles and actions must be in the same account.
     */
    @JvmName("yvufiggdgsmishac")
    public suspend fun executionRoleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.executionRoleArn = mapped
    }

    /**
     * @param value The type of a notification.
     */
    @JvmName("eiisvnsarilnubjo")
    public suspend fun notificationType(`value`: BudgetsActionNotificationType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notificationType = mapped
    }

    /**
     * @param value An optional list of tags to associate with the specified budget action. Each tag consists of a key and a value, and each key must be unique for the resource.
     */
    @JvmName("thespqfphxmfqdng")
    public suspend fun resourceTags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceTags = mapped
    }

    /**
     * @param argument An optional list of tags to associate with the specified budget action. Each tag consists of a key and a value, and each key must be unique for the resource.
     */
    @JvmName("mrhcpxgislgjmfck")
    public suspend fun resourceTags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.resourceTags = mapped
    }

    /**
     * @param argument An optional list of tags to associate with the specified budget action. Each tag consists of a key and a value, and each key must be unique for the resource.
     */
    @JvmName("lmpyjoyriothdpxe")
    public suspend fun resourceTags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.resourceTags = mapped
    }

    /**
     * @param argument An optional list of tags to associate with the specified budget action. Each tag consists of a key and a value, and each key must be unique for the resource.
     */
    @JvmName("isjdafwqybnscpar")
    public suspend fun resourceTags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.resourceTags = mapped
    }

    /**
     * @param values An optional list of tags to associate with the specified budget action. Each tag consists of a key and a value, and each key must be unique for the resource.
     */
    @JvmName("nsxbmpyhouqegajb")
    public suspend fun resourceTags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceTags = mapped
    }

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

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

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

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

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

    internal fun build(): BudgetsActionArgs = BudgetsActionArgs(
        actionThreshold = actionThreshold,
        actionType = actionType,
        approvalModel = approvalModel,
        budgetName = budgetName,
        definition = definition,
        executionRoleArn = executionRoleArn,
        notificationType = notificationType,
        resourceTags = resourceTags,
        subscribers = subscribers,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy