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

com.pulumi.aws.ecs.kotlin.inputs.ServiceAlarmsArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.ecs.kotlin.inputs

import com.pulumi.aws.ecs.inputs.ServiceAlarmsArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property alarmNames One or more CloudWatch alarm names.
 * @property enable Whether to use the CloudWatch alarm option in the service deployment process.
 * @property rollback Whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
 */
public data class ServiceAlarmsArgs(
    public val alarmNames: Output>,
    public val enable: Output,
    public val rollback: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ecs.inputs.ServiceAlarmsArgs =
        com.pulumi.aws.ecs.inputs.ServiceAlarmsArgs.builder()
            .alarmNames(alarmNames.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .enable(enable.applyValue({ args0 -> args0 }))
            .rollback(rollback.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ServiceAlarmsArgs].
 */
@PulumiTagMarker
public class ServiceAlarmsArgsBuilder internal constructor() {
    private var alarmNames: Output>? = null

    private var enable: Output? = null

    private var rollback: Output? = null

    /**
     * @param value One or more CloudWatch alarm names.
     */
    @JvmName("fsnaidfshcflpwmu")
    public suspend fun alarmNames(`value`: Output>) {
        this.alarmNames = value
    }

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

    /**
     * @param values One or more CloudWatch alarm names.
     */
    @JvmName("pfyotufekvsdqasv")
    public suspend fun alarmNames(values: List>) {
        this.alarmNames = Output.all(values)
    }

    /**
     * @param value Whether to use the CloudWatch alarm option in the service deployment process.
     */
    @JvmName("hlujscadhktragfk")
    public suspend fun enable(`value`: Output) {
        this.enable = value
    }

    /**
     * @param value Whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
     */
    @JvmName("doisldcnmlpvmyqt")
    public suspend fun rollback(`value`: Output) {
        this.rollback = value
    }

    /**
     * @param value One or more CloudWatch alarm names.
     */
    @JvmName("dmowxsmlvuuvvkyr")
    public suspend fun alarmNames(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.alarmNames = mapped
    }

    /**
     * @param values One or more CloudWatch alarm names.
     */
    @JvmName("ikcvwjlkpcjfhonk")
    public suspend fun alarmNames(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.alarmNames = mapped
    }

    /**
     * @param value Whether to use the CloudWatch alarm option in the service deployment process.
     */
    @JvmName("hucmvboxoxharlwd")
    public suspend fun enable(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enable = mapped
    }

    /**
     * @param value Whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
     */
    @JvmName("patnlpqkseimcyky")
    public suspend fun rollback(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rollback = mapped
    }

    internal fun build(): ServiceAlarmsArgs = ServiceAlarmsArgs(
        alarmNames = alarmNames ?: throw PulumiNullFieldException("alarmNames"),
        enable = enable ?: throw PulumiNullFieldException("enable"),
        rollback = rollback ?: throw PulumiNullFieldException("rollback"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy