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

com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionPlacementConstraintArgs.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.TaskDefinitionPlacementConstraintArgs.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.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property expression Cluster Query Language expression to apply to the constraint. For more information, see [Cluster Query Language in the Amazon EC2 Container Service Developer Guide](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html).
 * @property type Type of constraint. Use `memberOf` to restrict selection to a group of valid candidates. Note that `distinctInstance` is not supported in task definitions.
 */
public data class TaskDefinitionPlacementConstraintArgs(
    public val expression: Output? = null,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ecs.inputs.TaskDefinitionPlacementConstraintArgs =
        com.pulumi.aws.ecs.inputs.TaskDefinitionPlacementConstraintArgs.builder()
            .expression(expression?.applyValue({ args0 -> args0 }))
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TaskDefinitionPlacementConstraintArgs].
 */
@PulumiTagMarker
public class TaskDefinitionPlacementConstraintArgsBuilder internal constructor() {
    private var expression: Output? = null

    private var type: Output? = null

    /**
     * @param value Cluster Query Language expression to apply to the constraint. For more information, see [Cluster Query Language in the Amazon EC2 Container Service Developer Guide](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html).
     */
    @JvmName("qqtmrferjmjwcawt")
    public suspend fun expression(`value`: Output) {
        this.expression = value
    }

    /**
     * @param value Type of constraint. Use `memberOf` to restrict selection to a group of valid candidates. Note that `distinctInstance` is not supported in task definitions.
     */
    @JvmName("oyruadxnqevwaabd")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Cluster Query Language expression to apply to the constraint. For more information, see [Cluster Query Language in the Amazon EC2 Container Service Developer Guide](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html).
     */
    @JvmName("ogsxoasfqvkivafe")
    public suspend fun expression(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expression = mapped
    }

    /**
     * @param value Type of constraint. Use `memberOf` to restrict selection to a group of valid candidates. Note that `distinctInstance` is not supported in task definitions.
     */
    @JvmName("ymskpubmwsbefpqm")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): TaskDefinitionPlacementConstraintArgs =
        TaskDefinitionPlacementConstraintArgs(
            expression = expression,
            type = type ?: throw PulumiNullFieldException("type"),
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy