JobQueue

class JobQueue : KotlinCustomResource

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

Properties

Link copied to clipboard
val arn: Output<String>

The Amazon Resource Name of the job queue.

Link copied to clipboard

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 id: Output<String>
Link copied to clipboard
val name: Output<String>

Specifies the name of the job queue.

Link copied to clipboard
val priority: Output<Int>

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 pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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>

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

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

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.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>