Package com.pulumi.aws.batch
Class JobQueue
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.batch.JobQueue
-
public class JobQueue extends com.pulumi.resources.CustomResourceProvides a Batch Job Queue resource. ## Example Usage ### Basic Job Queue
### Job Queue with a fair share scheduling policypackage 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.ArrayList; import java.util.Arrays; 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() .computeEnvironmentOrders( JobQueueComputeEnvironmentOrderArgs.builder() .order(1) .computeEnvironment(testEnvironment1.arn()) .build(), JobQueueComputeEnvironmentOrderArgs.builder() .order(2) .computeEnvironment(testEnvironment2.arn()) .build()) .name("tf-test-batch-job-queue") .state("ENABLED") .priority(1) .build()); } }
## Import ### Identity Schema #### Required - `arn` (String) ARN of the job queue. 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 ```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.inputs.SchedulingPolicyFairSharePolicyShareDistributionArgs; import com.pulumi.aws.batch.JobQueue; import com.pulumi.aws.batch.JobQueueArgs; import com.pulumi.aws.batch.inputs.JobQueueComputeEnvironmentOrderArgs; import java.util.ArrayList; import java.util.Arrays; 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() .fairSharePolicy(SchedulingPolicyFairSharePolicyArgs.builder() .shareDistributions(SchedulingPolicyFairSharePolicyShareDistributionArgs.builder() .shareIdentifier("A1*") .weightFactor(0.1) .build()) .computeReservation(1) .shareDecaySeconds(3600) .build()) .name("example") .build()); var exampleJobQueue = new JobQueue("exampleJobQueue", JobQueueArgs.builder() .computeEnvironmentOrders( JobQueueComputeEnvironmentOrderArgs.builder() .order(1) .computeEnvironment(testEnvironment1.arn()) .build(), JobQueueComputeEnvironmentOrderArgs.builder() .order(2) .computeEnvironment(testEnvironment2.arn()) .build()) .name("tf-test-batch-job-queue") .schedulingPolicyArn(example.arn()) .state("ENABLED") .priority(1) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description JobQueue(java.lang.String name)JobQueue(java.lang.String name, JobQueueArgs args)JobQueue(java.lang.String name, JobQueueArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.util.Optional<java.util.List<JobQueueComputeEnvironmentOrder>>>computeEnvironmentOrders()static JobQueueget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, JobQueueState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.util.List<JobQueueJobStateTimeLimitAction>>>jobStateTimeLimitActions()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.Integer>priority()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.lang.String>>schedulingPolicyArn()com.pulumi.core.Output<java.lang.String>state()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.util.Optional<JobQueueTimeouts>>timeouts()
-
-
-
Constructor Detail
-
JobQueue
public JobQueue(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
JobQueue
public JobQueue(java.lang.String name, JobQueueArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
JobQueue
public JobQueue(java.lang.String name, JobQueueArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the job queue.
-
computeEnvironmentOrders
public com.pulumi.core.Output<java.util.Optional<java.util.List<JobQueueComputeEnvironmentOrder>>> computeEnvironmentOrders()
- Returns:
- 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.
-
jobStateTimeLimitActions
public com.pulumi.core.Output<java.util.Optional<java.util.List<JobQueueJobStateTimeLimitAction>>> jobStateTimeLimitActions()
- Returns:
- 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.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name of the job queue.
-
priority
public com.pulumi.core.Output<java.lang.Integer> priority()
- Returns:
- Priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
schedulingPolicyArn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> schedulingPolicyArn()
- Returns:
- 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.
-
state
public com.pulumi.core.Output<java.lang.String> state()
- Returns:
- State of the job queue. Must be one of: `ENABLED` or `DISABLED`
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
timeouts
public com.pulumi.core.Output<java.util.Optional<JobQueueTimeouts>> timeouts()
-
get
public static JobQueue get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable JobQueueState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-