/AWS1/IF_BTC=>CREATEJOBQUEUE()¶
About CreateJobQueue¶
Creates an Batch job queue. When you create a job queue, you associate one or more compute environments to the queue and assign an order of preference for the compute environments.
You also set a priority to the job queue that determines the order that the Batch scheduler places jobs onto its associated compute environments. For example, if a compute environment is associated with more than one job queue, the job queue with a higher priority is given preference for scheduling jobs to that compute environment.
Method Signature¶
METHODS /AWS1/IF_BTC~CREATEJOBQUEUE
IMPORTING
!IV_JOBQUEUENAME TYPE /AWS1/BTCSTRING OPTIONAL
!IV_STATE TYPE /AWS1/BTCJQSTATE OPTIONAL
!IV_SCHEDULINGPOLICYARN TYPE /AWS1/BTCSTRING OPTIONAL
!IV_PRIORITY TYPE /AWS1/BTCINTEGER OPTIONAL
!IT_COMPUTEENVIRONMENTORDER TYPE /AWS1/CL_BTCCOMPUTEENVIRONME00=>TT_COMPUTEENVIRONMENTORDERS OPTIONAL
!IT_SERVICEENVIRONMENTORDER TYPE /AWS1/CL_BTCSERVICEENVORDER=>TT_SERVICEENVIRONMENTORDERS OPTIONAL
!IV_JOBQUEUETYPE TYPE /AWS1/BTCJOBQUEUETYPE OPTIONAL
!IT_TAGS TYPE /AWS1/CL_BTCTAGRISTAGSMAP_W=>TT_TAGRISTAGSMAP OPTIONAL
!IT_JOBSTATETIMELIMITACTIONS TYPE /AWS1/CL_BTCJOBSTATETIMELMTACT=>TT_JOBSTATETIMELIMITACTIONS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_btccreatejobqueuersp
RAISING
/AWS1/CX_BTCCLIENTEXCEPTION
/AWS1/CX_BTCSERVEREXCEPTION
/AWS1/CX_BTCCLIENTEXC
/AWS1/CX_BTCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_jobqueuename TYPE /AWS1/BTCSTRING /AWS1/BTCSTRING¶
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 (_).
iv_priority TYPE /AWS1/BTCINTEGER /AWS1/BTCINTEGER¶
The priority of the job queue. Job queues with a higher priority (or a higher integer value for the
priorityparameter) 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 of10is given scheduling preference over a job queue with a priority value of1. All of the compute environments must be either EC2 (EC2orSPOT) or Fargate (FARGATEorFARGATE_SPOT); EC2 and Fargate compute environments can't be mixed.
Optional arguments:¶
iv_state TYPE /AWS1/BTCJQSTATE /AWS1/BTCJQSTATE¶
The state of the job queue. If the job queue state is
ENABLED, it is able to accept jobs. If the job queue state isDISABLED, new jobs can't be added to the queue, but jobs already in the queue can finish.
iv_schedulingpolicyarn TYPE /AWS1/BTCSTRING /AWS1/BTCSTRING¶
The Amazon Resource Name (ARN) of the fair-share scheduling policy. Job queues that don't have a fair-share scheduling policy are scheduled in a first-in, first-out (FIFO) model. After a job queue has a fair-share scheduling policy, it can be replaced but can't be removed.
The format is
aws:Partition:batch:Region:Account:scheduling-policy/Name.An example is
aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy.A job queue without a fair-share scheduling policy is scheduled as a FIFO job queue and can't have a fair-share scheduling policy added. Jobs queues with a fair-share scheduling policy can have a maximum of 500 active share identifiers. When the limit has been reached, submissions of any jobs that add a new share identifier fail.
it_computeenvironmentorder TYPE /AWS1/CL_BTCCOMPUTEENVIRONME00=>TT_COMPUTEENVIRONMENTORDERS TT_COMPUTEENVIRONMENTORDERS¶
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
VALIDstate 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 (EC2orSPOT) or Fargate (FARGATEorFARGATE_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.
it_serviceenvironmentorder TYPE /AWS1/CL_BTCSERVICEENVORDER=>TT_SERVICEENVIRONMENTORDERS TT_SERVICEENVIRONMENTORDERS¶
A list of service environments that this job queue can use to allocate jobs. All serviceEnvironments must have the same type. A job queue can't have both a serviceEnvironmentOrder and a computeEnvironmentOrder field.
iv_jobqueuetype TYPE /AWS1/BTCJOBQUEUETYPE /AWS1/BTCJOBQUEUETYPE¶
The type of job queue. For service jobs that run on SageMaker Training, this value is
SAGEMAKER_TRAINING. For regular container jobs, this value isEKS,ECS, orECS_FARGATEdepending on the compute environment.
it_tags TYPE /AWS1/CL_BTCTAGRISTAGSMAP_W=>TT_TAGRISTAGSMAP TT_TAGRISTAGSMAP¶
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.
it_jobstatetimelimitactions TYPE /AWS1/CL_BTCJOBSTATETIMELMTACT=>TT_JOBSTATETIMELIMITACTIONS TT_JOBSTATETIMELIMITACTIONS¶
The set of actions that Batch performs on jobs that remain at the head of the job queue in the specified state longer than specified times. Batch will perform each action after
maxTimeSecondshas passed. (Note: The minimum value for maxTimeSeconds is 600 (10 minutes) and its maximum value is 86,400 (24 hours).)
RETURNING¶
oo_output TYPE REF TO /aws1/cl_btccreatejobqueuersp /AWS1/CL_BTCCREATEJOBQUEUERSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createjobqueue(
it_computeenvironmentorder = VALUE /aws1/cl_btccomputeenvironme00=>tt_computeenvironmentorders(
(
new /aws1/cl_btccomputeenvironme00(
iv_computeenvironment = |string|
iv_order = 123
)
)
)
it_jobstatetimelimitactions = VALUE /aws1/cl_btcjobstatetimelmtact=>tt_jobstatetimelimitactions(
(
new /aws1/cl_btcjobstatetimelmtact(
iv_action = |string|
iv_maxtimeseconds = 123
iv_reason = |string|
iv_state = |string|
)
)
)
it_serviceenvironmentorder = VALUE /aws1/cl_btcserviceenvorder=>tt_serviceenvironmentorders(
(
new /aws1/cl_btcserviceenvorder(
iv_order = 123
iv_serviceenvironment = |string|
)
)
)
it_tags = VALUE /aws1/cl_btctagristagsmap_w=>tt_tagristagsmap(
(
VALUE /aws1/cl_btctagristagsmap_w=>ts_tagristagsmap_maprow(
value = new /aws1/cl_btctagristagsmap_w( |string| )
key = |string|
)
)
)
iv_jobqueuename = |string|
iv_jobqueuetype = |string|
iv_priority = 123
iv_schedulingpolicyarn = |string|
iv_state = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_string = lo_result->get_jobqueuename( ).
lv_string = lo_result->get_jobqueuearn( ).
ENDIF.
To create a job queue with a single compute environment¶
This example creates a job queue called LowPriority that uses the M4Spot compute environment.
DATA(lo_result) = lo_client->createjobqueue(
it_computeenvironmentorder = VALUE /aws1/cl_btccomputeenvironme00=>tt_computeenvironmentorders(
(
new /aws1/cl_btccomputeenvironme00(
iv_computeenvironment = |M4Spot|
iv_order = 1
)
)
)
iv_jobqueuename = |LowPriority|
iv_priority = 1
iv_state = |ENABLED|
).
To create a job queue with multiple compute environments¶
This example creates a job queue called HighPriority that uses the C4OnDemand compute environment with an order of 1 and the M4Spot compute environment with an order of 2.
DATA(lo_result) = lo_client->createjobqueue(
it_computeenvironmentorder = VALUE /aws1/cl_btccomputeenvironme00=>tt_computeenvironmentorders(
(
new /aws1/cl_btccomputeenvironme00(
iv_computeenvironment = |C4OnDemand|
iv_order = 1
)
)
(
new /aws1/cl_btccomputeenvironme00(
iv_computeenvironment = |M4Spot|
iv_order = 2
)
)
)
iv_jobqueuename = |HighPriority|
iv_priority = 10
iv_state = |ENABLED|
).