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

com.pulumi.awsnative.scheduler.kotlin.outputs.SchedulePlacementConstraint.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.scheduler.kotlin.outputs

import com.pulumi.awsnative.scheduler.kotlin.enums.SchedulePlacementConstraintType
import kotlin.String
import kotlin.Suppress

/**
 * An object representing a constraint on task placement.
 * @property expression A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is distinctInstance. To learn more, see Cluster Query Language in the Amazon Elastic Container Service Developer Guide.
 * @property type The type of constraint. Use `distinctInstance` to ensure that each task in a particular group is running on a different container instance. Use `memberOf` to restrict the selection to a group of valid candidates.
 */
public data class SchedulePlacementConstraint(
    public val expression: String? = null,
    public val type: SchedulePlacementConstraintType? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.scheduler.outputs.SchedulePlacementConstraint): SchedulePlacementConstraint = SchedulePlacementConstraint(
            expression = javaType.expression().map({ args0 -> args0 }).orElse(null),
            type = javaType.type().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.scheduler.kotlin.enums.SchedulePlacementConstraintType.Companion.toKotlin(args0)
                })
            }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy