JobQueueArgs

data class JobQueueArgs(val computeEnvironments: Output<List<String>>? = null, val name: Output<String>? = null, val priority: Output<Int>? = null, val schedulingPolicyArn: Output<String>? = null, val state: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<JobQueueArgs>

Provides a Batch Job Queue resource.

Example Usage

Basic Job Queue

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 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()
.state("ENABLED")
.priority(1)
.computeEnvironments(
aws_batch_compute_environment.test_environment_1().arn(),
aws_batch_compute_environment.test_environment_2().arn())
.build());
}
}

Job Queue with a fair share scheduling policy

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 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 exampleSchedulingPolicy = new SchedulingPolicy("exampleSchedulingPolicy", SchedulingPolicyArgs.builder()
.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()
.schedulingPolicyArn(exampleSchedulingPolicy.arn())
.state("ENABLED")
.priority(1)
.computeEnvironments(
aws_batch_compute_environment.test_environment_1().arn(),
aws_batch_compute_environment.test_environment_2().arn())
.build());
}
}

Import

Batch Job Queue can be imported using the arn, e.g.,

$ pulumi import aws:batch/jobQueue:JobQueue test_queue arn:aws:batch:us-east-1:123456789012:job-queue/sample

Constructors

Link copied to clipboard
constructor(computeEnvironments: Output<List<String>>? = null, name: Output<String>? = null, priority: Output<Int>? = null, schedulingPolicyArn: Output<String>? = null, state: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val computeEnvironments: Output<List<String>>? = null

Specifies the set of compute environments mapped to a job queue and their order. The position of the compute environments in the list will dictate the order.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the job queue.

Link copied to clipboard
val priority: Output<Int>? = null

The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.

Link copied to clipboard
val schedulingPolicyArn: Output<String>? = null

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.

Link copied to clipboard
val state: Output<String>? = null

The state of the job queue. Must be one of: ENABLED or DISABLED

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

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.

Functions

Link copied to clipboard
open override fun toJava(): JobQueueArgs