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

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

package com.pulumi.aws.batch.kotlin

import com.pulumi.aws.batch.JobQueueArgs.builder
import com.pulumi.aws.batch.kotlin.inputs.JobQueueComputeEnvironmentOrderArgs
import com.pulumi.aws.batch.kotlin.inputs.JobQueueComputeEnvironmentOrderArgsBuilder
import com.pulumi.aws.batch.kotlin.inputs.JobQueueJobStateTimeLimitActionArgs
import com.pulumi.aws.batch.kotlin.inputs.JobQueueJobStateTimeLimitActionArgsBuilder
import com.pulumi.aws.batch.kotlin.inputs.JobQueueTimeoutsArgs
import com.pulumi.aws.batch.kotlin.inputs.JobQueueTimeoutsArgsBuilder
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.Deprecated
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

/**
 * Provides a Batch Job Queue resource.
 * ## Example Usage
 * ### Basic Job Queue
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const testQueue = new aws.batch.JobQueue("test_queue", {
 *     name: "tf-test-batch-job-queue",
 *     state: "ENABLED",
 *     priority: 1,
 *     computeEnvironmentOrders: [
 *         {
 *             order: 1,
 *             computeEnvironment: testEnvironment1.arn,
 *         },
 *         {
 *             order: 2,
 *             computeEnvironment: testEnvironment2.arn,
 *         },
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * test_queue = aws.batch.JobQueue("test_queue",
 *     name="tf-test-batch-job-queue",
 *     state="ENABLED",
 *     priority=1,
 *     compute_environment_orders=[
 *         {
 *             "order": 1,
 *             "compute_environment": test_environment1["arn"],
 *         },
 *         {
 *             "order": 2,
 *             "compute_environment": test_environment2["arn"],
 *         },
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var testQueue = new Aws.Batch.JobQueue("test_queue", new()
 *     {
 *         Name = "tf-test-batch-job-queue",
 *         State = "ENABLED",
 *         Priority = 1,
 *         ComputeEnvironmentOrders = new[]
 *         {
 *             new Aws.Batch.Inputs.JobQueueComputeEnvironmentOrderArgs
 *             {
 *                 Order = 1,
 *                 ComputeEnvironment = testEnvironment1.Arn,
 *             },
 *             new Aws.Batch.Inputs.JobQueueComputeEnvironmentOrderArgs
 *             {
 *                 Order = 2,
 *                 ComputeEnvironment = testEnvironment2.Arn,
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := batch.NewJobQueue(ctx, "test_queue", &batch.JobQueueArgs{
 * 			Name:     pulumi.String("tf-test-batch-job-queue"),
 * 			State:    pulumi.String("ENABLED"),
 * 			Priority: pulumi.Int(1),
 * 			ComputeEnvironmentOrders: batch.JobQueueComputeEnvironmentOrderArray{
 * 				&batch.JobQueueComputeEnvironmentOrderArgs{
 * 					Order:              pulumi.Int(1),
 * 					ComputeEnvironment: pulumi.Any(testEnvironment1.Arn),
 * 				},
 * 				&batch.JobQueueComputeEnvironmentOrderArgs{
 * 					Order:              pulumi.Int(2),
 * 					ComputeEnvironment: pulumi.Any(testEnvironment2.Arn),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.batch.JobQueue;
 * import com.pulumi.aws.batch.JobQueueArgs;
 * import com.pulumi.aws.batch.inputs.JobQueueComputeEnvironmentOrderArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var testQueue = new JobQueue("testQueue", JobQueueArgs.builder()
 *             .name("tf-test-batch-job-queue")
 *             .state("ENABLED")
 *             .priority(1)
 *             .computeEnvironmentOrders(
 *                 JobQueueComputeEnvironmentOrderArgs.builder()
 *                     .order(1)
 *                     .computeEnvironment(testEnvironment1.arn())
 *                     .build(),
 *                 JobQueueComputeEnvironmentOrderArgs.builder()
 *                     .order(2)
 *                     .computeEnvironment(testEnvironment2.arn())
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   testQueue:
 *     type: aws:batch:JobQueue
 *     name: test_queue
 *     properties:
 *       name: tf-test-batch-job-queue
 *       state: ENABLED
 *       priority: 1
 *       computeEnvironmentOrders:
 *         - order: 1
 *           computeEnvironment: ${testEnvironment1.arn}
 *         - order: 2
 *           computeEnvironment: ${testEnvironment2.arn}
 * ```
 * 
 * ### Job Queue with a fair share scheduling policy
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.batch.SchedulingPolicy("example", {
 *     name: "example",
 *     fairSharePolicy: {
 *         computeReservation: 1,
 *         shareDecaySeconds: 3600,
 *         shareDistributions: [{
 *             shareIdentifier: "A1*",
 *             weightFactor: 0.1,
 *         }],
 *     },
 * });
 * const exampleJobQueue = new aws.batch.JobQueue("example", {
 *     name: "tf-test-batch-job-queue",
 *     schedulingPolicyArn: example.arn,
 *     state: "ENABLED",
 *     priority: 1,
 *     computeEnvironmentOrders: [
 *         {
 *             order: 1,
 *             computeEnvironment: testEnvironment1.arn,
 *         },
 *         {
 *             order: 2,
 *             computeEnvironment: testEnvironment2.arn,
 *         },
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.batch.SchedulingPolicy("example",
 *     name="example",
 *     fair_share_policy={
 *         "compute_reservation": 1,
 *         "share_decay_seconds": 3600,
 *         "share_distributions": [{
 *             "share_identifier": "A1*",
 *             "weight_factor": 0.1,
 *         }],
 *     })
 * example_job_queue = aws.batch.JobQueue("example",
 *     name="tf-test-batch-job-queue",
 *     scheduling_policy_arn=example.arn,
 *     state="ENABLED",
 *     priority=1,
 *     compute_environment_orders=[
 *         {
 *             "order": 1,
 *             "compute_environment": test_environment1["arn"],
 *         },
 *         {
 *             "order": 2,
 *             "compute_environment": test_environment2["arn"],
 *         },
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Batch.SchedulingPolicy("example", new()
 *     {
 *         Name = "example",
 *         FairSharePolicy = new Aws.Batch.Inputs.SchedulingPolicyFairSharePolicyArgs
 *         {
 *             ComputeReservation = 1,
 *             ShareDecaySeconds = 3600,
 *             ShareDistributions = new[]
 *             {
 *                 new Aws.Batch.Inputs.SchedulingPolicyFairSharePolicyShareDistributionArgs
 *                 {
 *                     ShareIdentifier = "A1*",
 *                     WeightFactor = 0.1,
 *                 },
 *             },
 *         },
 *     });
 *     var exampleJobQueue = new Aws.Batch.JobQueue("example", new()
 *     {
 *         Name = "tf-test-batch-job-queue",
 *         SchedulingPolicyArn = example.Arn,
 *         State = "ENABLED",
 *         Priority = 1,
 *         ComputeEnvironmentOrders = new[]
 *         {
 *             new Aws.Batch.Inputs.JobQueueComputeEnvironmentOrderArgs
 *             {
 *                 Order = 1,
 *                 ComputeEnvironment = testEnvironment1.Arn,
 *             },
 *             new Aws.Batch.Inputs.JobQueueComputeEnvironmentOrderArgs
 *             {
 *                 Order = 2,
 *                 ComputeEnvironment = testEnvironment2.Arn,
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := batch.NewSchedulingPolicy(ctx, "example", &batch.SchedulingPolicyArgs{
 * 			Name: pulumi.String("example"),
 * 			FairSharePolicy: &batch.SchedulingPolicyFairSharePolicyArgs{
 * 				ComputeReservation: pulumi.Int(1),
 * 				ShareDecaySeconds:  pulumi.Int(3600),
 * 				ShareDistributions: batch.SchedulingPolicyFairSharePolicyShareDistributionArray{
 * 					&batch.SchedulingPolicyFairSharePolicyShareDistributionArgs{
 * 						ShareIdentifier: pulumi.String("A1*"),
 * 						WeightFactor:    pulumi.Float64(0.1),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = batch.NewJobQueue(ctx, "example", &batch.JobQueueArgs{
 * 			Name:                pulumi.String("tf-test-batch-job-queue"),
 * 			SchedulingPolicyArn: example.Arn,
 * 			State:               pulumi.String("ENABLED"),
 * 			Priority:            pulumi.Int(1),
 * 			ComputeEnvironmentOrders: batch.JobQueueComputeEnvironmentOrderArray{
 * 				&batch.JobQueueComputeEnvironmentOrderArgs{
 * 					Order:              pulumi.Int(1),
 * 					ComputeEnvironment: pulumi.Any(testEnvironment1.Arn),
 * 				},
 * 				&batch.JobQueueComputeEnvironmentOrderArgs{
 * 					Order:              pulumi.Int(2),
 * 					ComputeEnvironment: pulumi.Any(testEnvironment2.Arn),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.batch.SchedulingPolicy;
 * import com.pulumi.aws.batch.SchedulingPolicyArgs;
 * import com.pulumi.aws.batch.inputs.SchedulingPolicyFairSharePolicyArgs;
 * import com.pulumi.aws.batch.JobQueue;
 * import com.pulumi.aws.batch.JobQueueArgs;
 * import com.pulumi.aws.batch.inputs.JobQueueComputeEnvironmentOrderArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new SchedulingPolicy("example", SchedulingPolicyArgs.builder()
 *             .name("example")
 *             .fairSharePolicy(SchedulingPolicyFairSharePolicyArgs.builder()
 *                 .computeReservation(1)
 *                 .shareDecaySeconds(3600)
 *                 .shareDistributions(SchedulingPolicyFairSharePolicyShareDistributionArgs.builder()
 *                     .shareIdentifier("A1*")
 *                     .weightFactor(0.1)
 *                     .build())
 *                 .build())
 *             .build());
 *         var exampleJobQueue = new JobQueue("exampleJobQueue", JobQueueArgs.builder()
 *             .name("tf-test-batch-job-queue")
 *             .schedulingPolicyArn(example.arn())
 *             .state("ENABLED")
 *             .priority(1)
 *             .computeEnvironmentOrders(
 *                 JobQueueComputeEnvironmentOrderArgs.builder()
 *                     .order(1)
 *                     .computeEnvironment(testEnvironment1.arn())
 *                     .build(),
 *                 JobQueueComputeEnvironmentOrderArgs.builder()
 *                     .order(2)
 *                     .computeEnvironment(testEnvironment2.arn())
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:batch:SchedulingPolicy
 *     properties:
 *       name: example
 *       fairSharePolicy:
 *         computeReservation: 1
 *         shareDecaySeconds: 3600
 *         shareDistributions:
 *           - shareIdentifier: A1*
 *             weightFactor: 0.1
 *   exampleJobQueue:
 *     type: aws:batch:JobQueue
 *     name: example
 *     properties:
 *       name: tf-test-batch-job-queue
 *       schedulingPolicyArn: ${example.arn}
 *       state: ENABLED
 *       priority: 1
 *       computeEnvironmentOrders:
 *         - order: 1
 *           computeEnvironment: ${testEnvironment1.arn}
 *         - order: 2
 *           computeEnvironment: ${testEnvironment2.arn}
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Batch Job Queue using the `arn`. For example:
 * ```sh
 * $ pulumi import aws:batch/jobQueue:JobQueue test_queue arn:aws:batch:us-east-1:123456789012:job-queue/sample
 * ```
 * @property computeEnvironmentOrders 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.
 * @property computeEnvironments (Optional) This parameter is deprecated, please use `compute_environment_order` instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter `compute_environments` will always be used over `compute_environment_order`. Please adjust your HCL accordingly.
 * @property jobStateTimeLimitActions The set of job state time limit actions mapped to a job queue. Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.
 * @property name Specifies the name of the job queue.
 * @property priority The priority of the job queue. Job queues with a higher priority
 * are evaluated first when associated with the same compute environment.
 * @property schedulingPolicyArn The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
 * @property state The state of the job queue. Must be one of: `ENABLED` or `DISABLED`
 * @property tags Key-value map of resource tags. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property timeouts
 */
public data class JobQueueArgs(
    public val computeEnvironmentOrders: Output>? = null,
    @Deprecated(
        message = """
  This parameter will be replaced by `compute_environment_order`.
  """,
    )
    public val computeEnvironments: Output>? = null,
    public val jobStateTimeLimitActions: Output>? = null,
    public val name: Output? = null,
    public val priority: Output? = null,
    public val schedulingPolicyArn: Output? = null,
    public val state: Output? = null,
    public val tags: Output>? = null,
    public val timeouts: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.batch.JobQueueArgs =
        com.pulumi.aws.batch.JobQueueArgs.builder()
            .computeEnvironmentOrders(
                computeEnvironmentOrders?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .computeEnvironments(computeEnvironments?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .jobStateTimeLimitActions(
                jobStateTimeLimitActions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .priority(priority?.applyValue({ args0 -> args0 }))
            .schedulingPolicyArn(schedulingPolicyArn?.applyValue({ args0 -> args0 }))
            .state(state?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .timeouts(timeouts?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

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

    private var computeEnvironments: Output>? = null

    private var jobStateTimeLimitActions: Output>? = null

    private var name: Output? = null

    private var priority: Output? = null

    private var schedulingPolicyArn: Output? = null

    private var state: Output? = null

    private var tags: Output>? = null

    private var timeouts: 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.
     */
    @JvmName("jgmwwrbwjdicyqwv")
    public suspend fun computeEnvironmentOrders(`value`: Output>) {
        this.computeEnvironmentOrders = value
    }

    @JvmName("phmmwurbgmrgcmqp")
    public suspend fun computeEnvironmentOrders(vararg values: Output) {
        this.computeEnvironmentOrders = 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.
     */
    @JvmName("maurllvaehdyqevi")
    public suspend fun computeEnvironmentOrders(values: List>) {
        this.computeEnvironmentOrders = Output.all(values)
    }

    /**
     * @param value (Optional) This parameter is deprecated, please use `compute_environment_order` instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter `compute_environments` will always be used over `compute_environment_order`. Please adjust your HCL accordingly.
     */
    @Deprecated(
        message = """
  This parameter will be replaced by `compute_environment_order`.
  """,
    )
    @JvmName("dwfdqnfyhawdngja")
    public suspend fun computeEnvironments(`value`: Output>) {
        this.computeEnvironments = value
    }

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

    /**
     * @param values (Optional) This parameter is deprecated, please use `compute_environment_order` instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter `compute_environments` will always be used over `compute_environment_order`. Please adjust your HCL accordingly.
     */
    @Deprecated(
        message = """
  This parameter will be replaced by `compute_environment_order`.
  """,
    )
    @JvmName("huortrnnfghsfbxo")
    public suspend fun computeEnvironments(values: List>) {
        this.computeEnvironments = Output.all(values)
    }

    /**
     * @param value The set of job state time limit actions mapped to a job queue. Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.
     */
    @JvmName("rxuteynnmpofuvkn")
    public suspend fun jobStateTimeLimitActions(`value`: Output>) {
        this.jobStateTimeLimitActions = value
    }

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

    /**
     * @param values The set of job state time limit actions mapped to a job queue. Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.
     */
    @JvmName("jexgatejsamgptwo")
    public suspend fun jobStateTimeLimitActions(values: List>) {
        this.jobStateTimeLimitActions = Output.all(values)
    }

    /**
     * @param value Specifies the name of the job queue.
     */
    @JvmName("yeiifnyvyvtyapee")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The priority of the job queue. Job queues with a higher priority
     * are evaluated first when associated with the same compute environment.
     */
    @JvmName("yanycdrtywuwfduv")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
     */
    @JvmName("fkgjqtwfvrplyojk")
    public suspend fun schedulingPolicyArn(`value`: Output) {
        this.schedulingPolicyArn = value
    }

    /**
     * @param value The state of the job queue. Must be one of: `ENABLED` or `DISABLED`
     */
    @JvmName("yisnybneliqdnloa")
    public suspend fun state(`value`: Output) {
        this.state = value
    }

    /**
     * @param value Key-value map of resource tags. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("yeacxiakysgqwvai")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value
     */
    @JvmName("hpiewgjsqibwkpai")
    public suspend fun timeouts(`value`: Output) {
        this.timeouts = 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.
     */
    @JvmName("pmphjxpuhdrvfibq")
    public suspend fun computeEnvironmentOrders(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.computeEnvironmentOrders = 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.
     */
    @JvmName("aoybxgsonorislsg")
    public suspend fun computeEnvironmentOrders(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobQueueComputeEnvironmentOrderArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.computeEnvironmentOrders = 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.
     */
    @JvmName("rvjsomctohhaikbu")
    public suspend fun computeEnvironmentOrders(vararg argument: suspend JobQueueComputeEnvironmentOrderArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobQueueComputeEnvironmentOrderArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.computeEnvironmentOrders = 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.
     */
    @JvmName("hkafigioqtbiuymg")
    public suspend fun computeEnvironmentOrders(argument: suspend JobQueueComputeEnvironmentOrderArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            JobQueueComputeEnvironmentOrderArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.computeEnvironmentOrders = 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.
     */
    @JvmName("wadvmfjacqyvacyh")
    public suspend fun computeEnvironmentOrders(vararg values: JobQueueComputeEnvironmentOrderArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.computeEnvironmentOrders = mapped
    }

    /**
     * @param value (Optional) This parameter is deprecated, please use `compute_environment_order` instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter `compute_environments` will always be used over `compute_environment_order`. Please adjust your HCL accordingly.
     */
    @Deprecated(
        message = """
  This parameter will be replaced by `compute_environment_order`.
  """,
    )
    @JvmName("notdivmwkokwneuw")
    public suspend fun computeEnvironments(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.computeEnvironments = mapped
    }

    /**
     * @param values (Optional) This parameter is deprecated, please use `compute_environment_order` instead. List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order. When importing a AWS Batch Job Queue, the parameter `compute_environments` will always be used over `compute_environment_order`. Please adjust your HCL accordingly.
     */
    @Deprecated(
        message = """
  This parameter will be replaced by `compute_environment_order`.
  """,
    )
    @JvmName("ofisyakqioprhivi")
    public suspend fun computeEnvironments(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.computeEnvironments = mapped
    }

    /**
     * @param value The set of job state time limit actions mapped to a job queue. Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.
     */
    @JvmName("bcmvtulhwcqpxuta")
    public suspend fun jobStateTimeLimitActions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobStateTimeLimitActions = mapped
    }

    /**
     * @param argument The set of job state time limit actions mapped to a job queue. Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.
     */
    @JvmName("sinokyvesiflgiap")
    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 job state time limit actions mapped to a job queue. Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.
     */
    @JvmName("uccxdacisdqiswde")
    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 job state time limit actions mapped to a job queue. Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.
     */
    @JvmName("sciqfeihxdgnkxwf")
    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 job state time limit actions mapped to a job queue. Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.
     */
    @JvmName("esrtnliyyyfdqtdm")
    public suspend fun jobStateTimeLimitActions(vararg values: JobQueueJobStateTimeLimitActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.jobStateTimeLimitActions = mapped
    }

    /**
     * @param value Specifies the name of the job queue.
     */
    @JvmName("xbawiiyomhsqwkth")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The priority of the job queue. Job queues with a higher priority
     * are evaluated first when associated with the same compute environment.
     */
    @JvmName("vldmwishkolopxwf")
    public suspend fun priority(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.priority = mapped
    }

    /**
     * @param value The ARN of the fair share scheduling policy. If this parameter is specified, the job queue uses a fair share scheduling policy. If this parameter isn't specified, the job queue uses a first in, first out (FIFO) scheduling policy. After a job queue is created, you can replace but can't remove the fair share scheduling policy.
     */
    @JvmName("nfsqjncqsbtjsrms")
    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. Must be one of: `ENABLED` or `DISABLED`
     */
    @JvmName("mtkynifpirxygesp")
    public suspend fun state(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.state = mapped
    }

    /**
     * @param value Key-value map of resource tags. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("nftmaduxcvnrpsgi")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Key-value map of resource tags. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("qdbseuwthmrlfyvq")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value
     */
    @JvmName("ktkmwuqmxuqtaxoq")
    public suspend fun timeouts(`value`: JobQueueTimeoutsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeouts = mapped
    }

    /**
     * @param argument
     */
    @JvmName("wwcdaldoanoxfgrh")
    public suspend fun timeouts(argument: suspend JobQueueTimeoutsArgsBuilder.() -> Unit) {
        val toBeMapped = JobQueueTimeoutsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.timeouts = mapped
    }

    internal fun build(): JobQueueArgs = JobQueueArgs(
        computeEnvironmentOrders = computeEnvironmentOrders,
        computeEnvironments = computeEnvironments,
        jobStateTimeLimitActions = jobStateTimeLimitActions,
        name = name,
        priority = priority,
        schedulingPolicyArn = schedulingPolicyArn,
        state = state,
        tags = tags,
        timeouts = timeouts,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy