Class JobQueue


  • public class JobQueue
    extends com.pulumi.resources.CustomResource
    Provides a Batch Job Queue resource. ## Example Usage ### Basic Job Queue ```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 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 ```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 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 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 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • 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.List<java.lang.String>> computeEnvironments()  
      static JobQueue get​(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.lang.String> name()  
      com.pulumi.core.Output<java.lang.Integer> priority()  
      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()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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:
        The Amazon Resource Name of the job queue.
      • computeEnvironments

        public com.pulumi.core.Output<java.util.List<java.lang.String>> computeEnvironments()
        Returns:
        List of compute environment ARNs mapped to a job queue. The position of the compute environments in the list will dictate the order.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Specifies the name of the job queue.
      • priority

        public com.pulumi.core.Output<java.lang.Integer> priority()
        Returns:
        The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment.
      • schedulingPolicyArn

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> schedulingPolicyArn()
        Returns:
        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.
      • state

        public com.pulumi.core.Output<java.lang.String> state()
        Returns:
        The 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 `default_tags` 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:
        A map of tags assigned to the resource, including those inherited from the provider `default_tags` 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.