Skip to content

/AWS1/IF_BTC=>SUBMITSERVICEJOB()

About SubmitServiceJob

Submits a service job to a specified job queue to run on SageMaker AI. A service job is a unit of work that you submit to Batch for execution on SageMaker AI.

Method Signature

METHODS /AWS1/IF_BTC~SUBMITSERVICEJOB
  IMPORTING
    !IV_JOBNAME TYPE /AWS1/BTCSTRING OPTIONAL
    !IV_JOBQUEUE TYPE /AWS1/BTCSTRING OPTIONAL
    !IO_RETRYSTRATEGY TYPE REF TO /AWS1/CL_BTCSVCJOBRETRYSTRAG OPTIONAL
    !IV_SCHEDULINGPRIORITY TYPE /AWS1/BTCINTEGER OPTIONAL
    !IV_SERVICEREQUESTPAYLOAD TYPE /AWS1/BTCSTRING OPTIONAL
    !IV_SERVICEJOBTYPE TYPE /AWS1/BTCSERVICEJOBTYPE OPTIONAL
    !IV_SHAREIDENTIFIER TYPE /AWS1/BTCSTRING OPTIONAL
    !IO_TIMEOUTCONFIG TYPE REF TO /AWS1/CL_BTCSERVICEJOBTIMEOUT OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_BTCTAGRISTAGSMAP_W=>TT_TAGRISTAGSMAP OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/BTCCLIENTREQUESTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_btcsubmitsvcjobrsp
  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_jobname TYPE /AWS1/BTCSTRING /AWS1/BTCSTRING

The name of the service job. It can be up to 128 characters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).

iv_jobqueue TYPE /AWS1/BTCSTRING /AWS1/BTCSTRING

The job queue into which the service job is submitted. You can specify either the name or the ARN of the queue. The job queue must have the type SAGEMAKER_TRAINING.

iv_servicerequestpayload TYPE /AWS1/BTCSTRING /AWS1/BTCSTRING

The request, in JSON, for the service that the SubmitServiceJob operation is queueing.

iv_servicejobtype TYPE /AWS1/BTCSERVICEJOBTYPE /AWS1/BTCSERVICEJOBTYPE

The type of service job. For SageMaker Training jobs, specify SAGEMAKER_TRAINING.

Optional arguments:

io_retrystrategy TYPE REF TO /AWS1/CL_BTCSVCJOBRETRYSTRAG /AWS1/CL_BTCSVCJOBRETRYSTRAG

The retry strategy to use for failed service jobs that are submitted with this service job request.

iv_schedulingpriority TYPE /AWS1/BTCINTEGER /AWS1/BTCINTEGER

The scheduling priority of the service job. Valid values are integers between 0 and 9999.

iv_shareidentifier TYPE /AWS1/BTCSTRING /AWS1/BTCSTRING

The share identifier for the service job. Don't specify this parameter if the job queue doesn't have a fair-share scheduling policy. If the job queue has a fair-share scheduling policy, then this parameter must be specified.

io_timeoutconfig TYPE REF TO /AWS1/CL_BTCSERVICEJOBTIMEOUT /AWS1/CL_BTCSERVICEJOBTIMEOUT

The timeout configuration for the service job. If none is specified, Batch defers to the default timeout of the underlying service handling the job.

it_tags TYPE /AWS1/CL_BTCTAGRISTAGSMAP_W=>TT_TAGRISTAGSMAP TT_TAGRISTAGSMAP

The tags that you apply to the service job request. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources.

iv_clienttoken TYPE /AWS1/BTCCLIENTREQUESTTOKEN /AWS1/BTCCLIENTREQUESTTOKEN

A unique identifier for the request. This token is used to ensure idempotency of requests. If this parameter is specified and two submit requests with identical payloads and clientTokens are received, these requests are considered the same request and the second request is rejected.

RETURNING

oo_output TYPE REF TO /aws1/cl_btcsubmitsvcjobrsp /AWS1/CL_BTCSUBMITSVCJOBRSP

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->submitservicejob(
  io_retrystrategy = new /aws1/cl_btcsvcjobretrystrag(
    it_evaluateonexit = VALUE /aws1/cl_btcsvcjobevalonexit=>tt_servicejobevalonexitlist(
      (
        new /aws1/cl_btcsvcjobevalonexit(
          iv_action = |string|
          iv_onstatusreason = |string|
        )
      )
    )
    iv_attempts = 123
  )
  io_timeoutconfig = new /aws1/cl_btcservicejobtimeout( 123 )
  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_clienttoken = |string|
  iv_jobname = |string|
  iv_jobqueue = |string|
  iv_schedulingpriority = 123
  iv_servicejobtype = |string|
  iv_servicerequestpayload = |string|
  iv_shareidentifier = |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_jobarn( ).
  lv_string = lo_result->get_jobname( ).
  lv_string = lo_result->get_jobid( ).
ENDIF.