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

com.pulumi.awsnative.batch.kotlin.JobQueueArgs.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.batch.kotlin

import com.pulumi.awsnative.batch.JobQueueArgs.builder
import com.pulumi.awsnative.batch.kotlin.enums.JobQueueState
import com.pulumi.awsnative.batch.kotlin.inputs.JobQueueComputeEnvironmentOrderArgs
import com.pulumi.awsnative.batch.kotlin.inputs.JobQueueComputeEnvironmentOrderArgsBuilder
import com.pulumi.awsnative.batch.kotlin.inputs.JobQueueJobStateTimeLimitActionArgs
import com.pulumi.awsnative.batch.kotlin.inputs.JobQueueJobStateTimeLimitActionArgsBuilder
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.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::Batch::JobQueue
 * @property computeEnvironmentOrder The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the `VALID` state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
 * > All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
 * @property jobQueueName The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
 * @property jobStateTimeLimitActions The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. AWS Batch will perform each action after `maxTimeSeconds` has passed.
 * @property priority The priority of the job queue. Job queues with a higher priority (or a higher integer value for the `priority` parameter) are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority value of `10` is given scheduling preference over a job queue with a priority value of `1` . All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
 * @property schedulingPolicyArn The Amazon Resource Name (ARN) of the scheduling policy. The format is `aws: *Partition* :batch: *Region* : *Account* :scheduling-policy/ *Name*` . For example, `aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy` .
 * @property state The state of the job queue. If the job queue state is `ENABLED` , it is able to accept jobs. If the job queue state is `DISABLED` , new jobs can't be added to the queue, but jobs already in the queue can finish.
 * @property tags A key-value pair to associate with a resource.
 */
public data class JobQueueArgs(
    public val computeEnvironmentOrder: Output>? = null,
    public val jobQueueName: Output? = null,
    public val jobStateTimeLimitActions: Output>? = null,
    public val priority: Output? = null,
    public val schedulingPolicyArn: Output? = null,
    public val state: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.batch.JobQueueArgs =
        com.pulumi.awsnative.batch.JobQueueArgs.builder()
            .computeEnvironmentOrder(
                computeEnvironmentOrder?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .jobQueueName(jobQueueName?.applyValue({ args0 -> args0 }))
            .jobStateTimeLimitActions(
                jobStateTimeLimitActions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .priority(priority?.applyValue({ args0 -> args0 }))
            .schedulingPolicyArn(schedulingPolicyArn?.applyValue({ args0 -> args0 }))
            .state(state?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    private var jobQueueName: Output? = null

    private var jobStateTimeLimitActions: Output>? = null

    private var priority: Output? = null

    private var schedulingPolicyArn: Output? = null

    private var state: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the `VALID` state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
     * > All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
     */
    @JvmName("armsvdmcfwgjjehh")
    public suspend fun computeEnvironmentOrder(`value`: Output>) {
        this.computeEnvironmentOrder = value
    }

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

    /**
     * @param values The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the `VALID` state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
     * > All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
     */
    @JvmName("kcnwtyqktydmbnbu")
    public suspend fun computeEnvironmentOrder(values: List>) {
        this.computeEnvironmentOrder = Output.all(values)
    }

    /**
     * @param value The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
     */
    @JvmName("rdplmwjxvmxpmwsg")
    public suspend fun jobQueueName(`value`: Output) {
        this.jobQueueName = value
    }

    /**
     * @param value The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. AWS Batch will perform each action after `maxTimeSeconds` has passed.
     */
    @JvmName("kkvyjeqowheuvwuj")
    public suspend fun jobStateTimeLimitActions(`value`: Output>) {
        this.jobStateTimeLimitActions = value
    }

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

    /**
     * @param values The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. AWS Batch will perform each action after `maxTimeSeconds` has passed.
     */
    @JvmName("ucbovmeydimkjouv")
    public suspend fun jobStateTimeLimitActions(values: List>) {
        this.jobStateTimeLimitActions = Output.all(values)
    }

    /**
     * @param value The priority of the job queue. Job queues with a higher priority (or a higher integer value for the `priority` parameter) are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority value of `10` is given scheduling preference over a job queue with a priority value of `1` . All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
     */
    @JvmName("mfnsxeiiudnpxnpf")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the scheduling policy. The format is `aws: *Partition* :batch: *Region* : *Account* :scheduling-policy/ *Name*` . For example, `aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy` .
     */
    @JvmName("mbfwbdysystobsly")
    public suspend fun schedulingPolicyArn(`value`: Output) {
        this.schedulingPolicyArn = value
    }

    /**
     * @param value The state of the job queue. If the job queue state is `ENABLED` , it is able to accept jobs. If the job queue state is `DISABLED` , new jobs can't be added to the queue, but jobs already in the queue can finish.
     */
    @JvmName("glcdpclfmvyehdjc")
    public suspend fun state(`value`: Output) {
        this.state = value
    }

    /**
     * @param value A key-value pair to associate with a resource.
     */
    @JvmName("quicefmdvebwcjol")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the `VALID` state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
     * > All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
     */
    @JvmName("ftvmmrxcfxwqugrd")
    public suspend fun computeEnvironmentOrder(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.computeEnvironmentOrder = mapped
    }

    /**
     * @param argument The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the `VALID` state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
     * > All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
     */
    @JvmName("plvkyoontnqujhgg")
    public suspend fun computeEnvironmentOrder(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobQueueComputeEnvironmentOrderArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.computeEnvironmentOrder = mapped
    }

    /**
     * @param argument The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the `VALID` state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
     * > All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
     */
    @JvmName("dxknhypoxboebeui")
    public suspend fun computeEnvironmentOrder(vararg argument: suspend JobQueueComputeEnvironmentOrderArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobQueueComputeEnvironmentOrderArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.computeEnvironmentOrder = mapped
    }

    /**
     * @param argument The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the `VALID` state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
     * > All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
     */
    @JvmName("ywacfonlghrcwapa")
    public suspend fun computeEnvironmentOrder(argument: suspend JobQueueComputeEnvironmentOrderArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            JobQueueComputeEnvironmentOrderArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.computeEnvironmentOrder = mapped
    }

    /**
     * @param values The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the `VALID` state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
     * > All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
     */
    @JvmName("wxofiktkakfcijsn")
    public suspend fun computeEnvironmentOrder(vararg values: JobQueueComputeEnvironmentOrderArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.computeEnvironmentOrder = mapped
    }

    /**
     * @param value The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
     */
    @JvmName("ctrmcfrmyvwjoecd")
    public suspend fun jobQueueName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobQueueName = mapped
    }

    /**
     * @param value The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. AWS Batch will perform each action after `maxTimeSeconds` has passed.
     */
    @JvmName("ejhxhkocolwpewtk")
    public suspend fun jobStateTimeLimitActions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobStateTimeLimitActions = mapped
    }

    /**
     * @param argument The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. AWS Batch will perform each action after `maxTimeSeconds` has passed.
     */
    @JvmName("pohrtbqpijckycoa")
    public suspend fun jobStateTimeLimitActions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobQueueJobStateTimeLimitActionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.jobStateTimeLimitActions = mapped
    }

    /**
     * @param argument The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. AWS Batch will perform each action after `maxTimeSeconds` has passed.
     */
    @JvmName("lkuiatxcygfveghq")
    public suspend fun jobStateTimeLimitActions(vararg argument: suspend JobQueueJobStateTimeLimitActionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobQueueJobStateTimeLimitActionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.jobStateTimeLimitActions = mapped
    }

    /**
     * @param argument The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. AWS Batch will perform each action after `maxTimeSeconds` has passed.
     */
    @JvmName("hxinbafhpefqxnjx")
    public suspend fun jobStateTimeLimitActions(argument: suspend JobQueueJobStateTimeLimitActionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            JobQueueJobStateTimeLimitActionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.jobStateTimeLimitActions = mapped
    }

    /**
     * @param values The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. AWS Batch will perform each action after `maxTimeSeconds` has passed.
     */
    @JvmName("xnymwdrxukdwrjed")
    public suspend fun jobStateTimeLimitActions(vararg values: JobQueueJobStateTimeLimitActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.jobStateTimeLimitActions = mapped
    }

    /**
     * @param value The priority of the job queue. Job queues with a higher priority (or a higher integer value for the `priority` parameter) are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority value of `10` is given scheduling preference over a job queue with a priority value of `1` . All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
     */
    @JvmName("bygmvkglkmvmtuho")
    public suspend fun priority(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.priority = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the scheduling policy. The format is `aws: *Partition* :batch: *Region* : *Account* :scheduling-policy/ *Name*` . For example, `aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy` .
     */
    @JvmName("xkhkwheibyamdtiw")
    public suspend fun schedulingPolicyArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schedulingPolicyArn = mapped
    }

    /**
     * @param value The state of the job queue. If the job queue state is `ENABLED` , it is able to accept jobs. If the job queue state is `DISABLED` , new jobs can't be added to the queue, but jobs already in the queue can finish.
     */
    @JvmName("qywamcumvueoahxr")
    public suspend fun state(`value`: JobQueueState?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.state = mapped
    }

    /**
     * @param value A key-value pair to associate with a resource.
     */
    @JvmName("lbthdafxpxmshdii")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A key-value pair to associate with a resource.
     */
    @JvmName("ncfihsvliqgyedrm")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): JobQueueArgs = JobQueueArgs(
        computeEnvironmentOrder = computeEnvironmentOrder,
        jobQueueName = jobQueueName,
        jobStateTimeLimitActions = jobStateTimeLimitActions,
        priority = priority,
        schedulingPolicyArn = schedulingPolicyArn,
        state = state,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy