/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.batch.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *
* Contains the parameters for CreateJobQueue
.
*
* The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase letters, * numbers, hyphens (-), and underscores (_). *
*/ private String jobQueueName; /** *
* The state of the job queue. If the job queue state is ENABLED
, it is able to accept jobs. If the job
* queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in the queue can
* finish.
*
* The Amazon Resource Name (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. The format is
* aws:Partition:batch:Region:Account:scheduling-policy/Name
. An example
* is aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.
*
* The priority of the job queue. Job queues with a higher priority (or a higher integer value for the
* priority
parameter) are evaluated first when associated with the same compute environment. Priority
* is determined in descending order. For example, a job queue with a priority value of 10
is given
* scheduling preference over a job queue with a priority value of 1
. All of the compute environments
* must be either EC2 (EC2
or SPOT
) or Fargate (FARGATE
or
* FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
*
* 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. All of the compute environments must be either EC2 (EC2
or
* SPOT
) or Fargate (FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute
* environments can't be mixed.
*
* All compute environments that are associated with a job queue must share the same architecture. Batch doesn't * support mixing compute environment architecture types in a single job queue. *
** The tags that you apply to the job queue to help you categorize and organize your resources. Each tag consists of * a key and an optional value. For more information, see Tagging your Batch resources in * Batch User Guide. *
*/ private java.util.Map* The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase letters, * numbers, hyphens (-), and underscores (_). *
* * @param jobQueueName * The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase * letters, numbers, hyphens (-), and underscores (_). */ public void setJobQueueName(String jobQueueName) { this.jobQueueName = jobQueueName; } /** ** The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase letters, * numbers, hyphens (-), and underscores (_). *
* * @return The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase * letters, numbers, hyphens (-), and underscores (_). */ public String getJobQueueName() { return this.jobQueueName; } /** ** The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase letters, * numbers, hyphens (-), and underscores (_). *
* * @param jobQueueName * The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase * letters, numbers, hyphens (-), and underscores (_). * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobQueueRequest withJobQueueName(String jobQueueName) { setJobQueueName(jobQueueName); return this; } /** *
* The state of the job queue. If the job queue state is ENABLED
, it is able to accept jobs. If the job
* queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in the queue can
* finish.
*
ENABLED
, it is able to accept jobs. If
* the job queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in
* the queue can finish.
* @see JQState
*/
public void setState(String state) {
this.state = state;
}
/**
*
* The state of the job queue. If the job queue state is ENABLED
, it is able to accept jobs. If the job
* queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in the queue can
* finish.
*
ENABLED
, it is able to accept jobs. If
* the job queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in
* the queue can finish.
* @see JQState
*/
public String getState() {
return this.state;
}
/**
*
* The state of the job queue. If the job queue state is ENABLED
, it is able to accept jobs. If the job
* queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in the queue can
* finish.
*
ENABLED
, it is able to accept jobs. If
* the job queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in
* the queue can finish.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JQState
*/
public CreateJobQueueRequest withState(String state) {
setState(state);
return this;
}
/**
*
* The state of the job queue. If the job queue state is ENABLED
, it is able to accept jobs. If the job
* queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in the queue can
* finish.
*
ENABLED
, it is able to accept jobs. If
* the job queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in
* the queue can finish.
* @see JQState
*/
public void setState(JQState state) {
withState(state);
}
/**
*
* The state of the job queue. If the job queue state is ENABLED
, it is able to accept jobs. If the job
* queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in the queue can
* finish.
*
ENABLED
, it is able to accept jobs. If
* the job queue state is DISABLED
, new jobs can't be added to the queue, but jobs already in
* the queue can finish.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JQState
*/
public CreateJobQueueRequest withState(JQState state) {
this.state = state.toString();
return this;
}
/**
*
* The Amazon Resource Name (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. The format is
* aws:Partition:batch:Region:Account:scheduling-policy/Name
. An example
* is aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.
*
aws:Partition:batch:Region:Account:scheduling-policy/Name
. An
* example is aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.
*/
public void setSchedulingPolicyArn(String schedulingPolicyArn) {
this.schedulingPolicyArn = schedulingPolicyArn;
}
/**
*
* The Amazon Resource Name (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. The format is
* aws:Partition:batch:Region:Account:scheduling-policy/Name
. An example
* is aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.
*
aws:Partition:batch:Region:Account:scheduling-policy/Name
. An
* example is aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.
*/
public String getSchedulingPolicyArn() {
return this.schedulingPolicyArn;
}
/**
*
* The Amazon Resource Name (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. The format is
* aws:Partition:batch:Region:Account:scheduling-policy/Name
. An example
* is aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.
*
aws:Partition:batch:Region:Account:scheduling-policy/Name
. An
* example is aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateJobQueueRequest withSchedulingPolicyArn(String schedulingPolicyArn) {
setSchedulingPolicyArn(schedulingPolicyArn);
return this;
}
/**
*
* The priority of the job queue. Job queues with a higher priority (or a higher integer value for the
* priority
parameter) are evaluated first when associated with the same compute environment. Priority
* is determined in descending order. For example, a job queue with a priority value of 10
is given
* scheduling preference over a job queue with a priority value of 1
. All of the compute environments
* must be either EC2 (EC2
or SPOT
) or Fargate (FARGATE
or
* FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
*
priority
parameter) are evaluated first when associated with the same compute environment.
* Priority is determined in descending order. For example, a job queue with a priority value of
* 10
is given scheduling preference over a job queue with a priority value of 1
.
* All of the compute environments must be either EC2 (EC2
or SPOT
) or Fargate (
* FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
*/
public void setPriority(Integer priority) {
this.priority = priority;
}
/**
*
* The priority of the job queue. Job queues with a higher priority (or a higher integer value for the
* priority
parameter) are evaluated first when associated with the same compute environment. Priority
* is determined in descending order. For example, a job queue with a priority value of 10
is given
* scheduling preference over a job queue with a priority value of 1
. All of the compute environments
* must be either EC2 (EC2
or SPOT
) or Fargate (FARGATE
or
* FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
*
priority
parameter) are evaluated first when associated with the same compute environment.
* Priority is determined in descending order. For example, a job queue with a priority value of
* 10
is given scheduling preference over a job queue with a priority value of 1
.
* All of the compute environments must be either EC2 (EC2
or SPOT
) or Fargate (
* FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
*/
public Integer getPriority() {
return this.priority;
}
/**
*
* The priority of the job queue. Job queues with a higher priority (or a higher integer value for the
* priority
parameter) are evaluated first when associated with the same compute environment. Priority
* is determined in descending order. For example, a job queue with a priority value of 10
is given
* scheduling preference over a job queue with a priority value of 1
. All of the compute environments
* must be either EC2 (EC2
or SPOT
) or Fargate (FARGATE
or
* FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
*
priority
parameter) are evaluated first when associated with the same compute environment.
* Priority is determined in descending order. For example, a job queue with a priority value of
* 10
is given scheduling preference over a job queue with a priority value of 1
.
* All of the compute environments must be either EC2 (EC2
or SPOT
) or Fargate (
* FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateJobQueueRequest withPriority(Integer priority) {
setPriority(priority);
return this;
}
/**
*
* 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. All of the compute environments must be either EC2 (EC2
or
* SPOT
) or Fargate (FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute
* environments can't be mixed.
*
* All compute environments that are associated with a job queue must share the same architecture. Batch doesn't * support mixing compute environment architecture types in a single job queue. *
*VALID
state before you can associate them with a job queue. You
* can associate up to three compute environments with a job queue. All of the compute environments must be
* either EC2 (EC2
or SPOT
) or Fargate (FARGATE
or
* FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed. * All compute environments that are associated with a job queue must share the same architecture. Batch * doesn't support mixing compute environment architecture types in a single job queue. *
*/ public java.util.List
* 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. All of the compute environments must be either EC2 (EC2
or
* SPOT
) or Fargate (FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute
* environments can't be mixed.
*
* All compute environments that are associated with a job queue must share the same architecture. Batch doesn't * support mixing compute environment architecture types in a single job queue. *
*VALID
state before you can associate them with a job queue. You
* can associate up to three compute environments with a job queue. All of the compute environments must be
* either EC2 (EC2
or SPOT
) or Fargate (FARGATE
or
* FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed. * All compute environments that are associated with a job queue must share the same architecture. Batch * doesn't support mixing compute environment architecture types in a single job queue. *
*/ public void setComputeEnvironmentOrder(java.util.Collection
* 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. All of the compute environments must be either EC2 (EC2
or
* SPOT
) or Fargate (FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute
* environments can't be mixed.
*
* All compute environments that are associated with a job queue must share the same architecture. Batch doesn't * support mixing compute environment architecture types in a single job queue. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setComputeEnvironmentOrder(java.util.Collection)} or * {@link #withComputeEnvironmentOrder(java.util.Collection)} if you want to override the existing values. *
* * @param computeEnvironmentOrder * 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 theVALID
state before you can associate them with a job queue. You
* can associate up to three compute environments with a job queue. All of the compute environments must be
* either EC2 (EC2
or SPOT
) or Fargate (FARGATE
or
* FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed. * All compute environments that are associated with a job queue must share the same architecture. Batch * doesn't support mixing compute environment architecture types in a single job queue. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobQueueRequest withComputeEnvironmentOrder(ComputeEnvironmentOrder... computeEnvironmentOrder) { if (this.computeEnvironmentOrder == null) { setComputeEnvironmentOrder(new java.util.ArrayList
* 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. All of the compute environments must be either EC2 (EC2
or
* SPOT
) or Fargate (FARGATE
or FARGATE_SPOT
); EC2 and Fargate compute
* environments can't be mixed.
*
* All compute environments that are associated with a job queue must share the same architecture. Batch doesn't * support mixing compute environment architecture types in a single job queue. *
*VALID
state before you can associate them with a job queue. You
* can associate up to three compute environments with a job queue. All of the compute environments must be
* either EC2 (EC2
or SPOT
) or Fargate (FARGATE
or
* FARGATE_SPOT
); EC2 and Fargate compute environments can't be mixed. * All compute environments that are associated with a job queue must share the same architecture. Batch * doesn't support mixing compute environment architecture types in a single job queue. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobQueueRequest withComputeEnvironmentOrder(java.util.Collection* The tags that you apply to the job queue to help you categorize and organize your resources. Each tag consists of * a key and an optional value. For more information, see Tagging your Batch resources in * Batch User Guide. *
* * @return The tags that you apply to the job queue to help you categorize and organize your resources. Each tag * consists of a key and an optional value. For more information, see Tagging your Batch * resources in Batch User Guide. */ public java.util.Map* The tags that you apply to the job queue to help you categorize and organize your resources. Each tag consists of * a key and an optional value. For more information, see Tagging your Batch resources in * Batch User Guide. *
* * @param tags * The tags that you apply to the job queue to help you categorize and organize your resources. Each tag * consists of a key and an optional value. For more information, see Tagging your Batch resources * in Batch User Guide. */ public void setTags(java.util.Map* The tags that you apply to the job queue to help you categorize and organize your resources. Each tag consists of * a key and an optional value. For more information, see Tagging your Batch resources in * Batch User Guide. *
* * @param tags * The tags that you apply to the job queue to help you categorize and organize your resources. Each tag * consists of a key and an optional value. For more information, see Tagging your Batch resources * in Batch User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateJobQueueRequest withTags(java.util.Map