/AWS1/IF_BDK=>CREATEMODELINVOCATIONJOB()¶
About CreateModelInvocationJob¶
Creates a batch inference job to invoke a model on multiple prompts. Format your data according to Format your inference data and upload it to an Amazon S3 bucket. For more information, see Process multiple prompts with batch inference.
The response returns a jobArn that you can use to stop or get details about the job.
Method Signature¶
METHODS /AWS1/IF_BDK~CREATEMODELINVOCATIONJOB
IMPORTING
!IV_JOBNAME TYPE /AWS1/BDKMODELINVCJOBNAME OPTIONAL
!IV_ROLEARN TYPE /AWS1/BDKROLEARN OPTIONAL
!IV_CLIENTREQUESTTOKEN TYPE /AWS1/BDKMDELINVIDEMPOTENCYTOK OPTIONAL
!IV_MODELID TYPE /AWS1/BDKMODELID OPTIONAL
!IO_INPUTDATACONFIG TYPE REF TO /AWS1/CL_BDKMDELINVJOBINPDAT00 OPTIONAL
!IO_OUTPUTDATACONFIG TYPE REF TO /AWS1/CL_BDKMDELINVJOBOUTDAT00 OPTIONAL
!IO_VPCCONFIG TYPE REF TO /AWS1/CL_BDKVPCCONFIG OPTIONAL
!IV_TIMEOUTDURATIONINHOURS TYPE /AWS1/BDKMDELINVJOBTODURINHO00 OPTIONAL
!IT_TAGS TYPE /AWS1/CL_BDKTAG=>TT_TAGLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdkcremodelinvcjobrsp
RAISING
/AWS1/CX_BDKACCESSDENIEDEX
/AWS1/CX_BDKCONFLICTEXCEPTION
/AWS1/CX_BDKINTERNALSERVEREX
/AWS1/CX_BDKRESOURCENOTFOUNDEX
/AWS1/CX_BDKSERVICEQUOTAEXCDEX
/AWS1/CX_BDKTHROTTLINGEX
/AWS1/CX_BDKVALIDATIONEX
/AWS1/CX_BDKCLIENTEXC
/AWS1/CX_BDKSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_jobname TYPE /AWS1/BDKMODELINVCJOBNAME /AWS1/BDKMODELINVCJOBNAME¶
A name to give the batch inference job.
iv_rolearn TYPE /AWS1/BDKROLEARN /AWS1/BDKROLEARN¶
The Amazon Resource Name (ARN) of the service role with permissions to carry out and manage batch inference. You can use the console to create a default service role or follow the steps at Create a service role for batch inference.
iv_modelid TYPE /AWS1/BDKMODELID /AWS1/BDKMODELID¶
The unique identifier of the foundation model to use for the batch inference job.
io_inputdataconfig TYPE REF TO /AWS1/CL_BDKMDELINVJOBINPDAT00 /AWS1/CL_BDKMDELINVJOBINPDAT00¶
Details about the location of the input to the batch inference job.
io_outputdataconfig TYPE REF TO /AWS1/CL_BDKMDELINVJOBOUTDAT00 /AWS1/CL_BDKMDELINVJOBOUTDAT00¶
Details about the location of the output of the batch inference job.
Optional arguments:¶
iv_clientrequesttoken TYPE /AWS1/BDKMDELINVIDEMPOTENCYTOK /AWS1/BDKMDELINVIDEMPOTENCYTOK¶
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
io_vpcconfig TYPE REF TO /AWS1/CL_BDKVPCCONFIG /AWS1/CL_BDKVPCCONFIG¶
The configuration of the Virtual Private Cloud (VPC) for the data in the batch inference job. For more information, see Protect batch inference jobs using a VPC.
iv_timeoutdurationinhours TYPE /AWS1/BDKMDELINVJOBTODURINHO00 /AWS1/BDKMDELINVJOBTODURINHO00¶
The number of hours after which to force the batch inference job to time out.
it_tags TYPE /AWS1/CL_BDKTAG=>TT_TAGLIST TT_TAGLIST¶
Any tags to associate with the batch inference job. For more information, see Tagging Amazon Bedrock resources.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bdkcremodelinvcjobrsp /AWS1/CL_BDKCREMODELINVCJOBRSP¶
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->createmodelinvocationjob(
io_inputdataconfig = new /aws1/cl_bdkmdelinvjobinpdat00(
io_s3inputdataconfig = new /aws1/cl_bdkmdelinvjobs3inpd00(
iv_s3bucketowner = |string|
iv_s3inputformat = |string|
iv_s3uri = |string|
)
)
io_outputdataconfig = new /aws1/cl_bdkmdelinvjoboutdat00(
io_s3outputdataconfig = new /aws1/cl_bdkmdelinvjobs3outd00(
iv_s3bucketowner = |string|
iv_s3encryptionkeyid = |string|
iv_s3uri = |string|
)
)
io_vpcconfig = new /aws1/cl_bdkvpcconfig(
it_securitygroupids = VALUE /aws1/cl_bdksecuritygroupids_w=>tt_securitygroupids(
( new /aws1/cl_bdksecuritygroupids_w( |string| ) )
)
it_subnetids = VALUE /aws1/cl_bdksubnetids_w=>tt_subnetids(
( new /aws1/cl_bdksubnetids_w( |string| ) )
)
)
it_tags = VALUE /aws1/cl_bdktag=>tt_taglist(
(
new /aws1/cl_bdktag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_clientrequesttoken = |string|
iv_jobname = |string|
iv_modelid = |string|
iv_rolearn = |string|
iv_timeoutdurationinhours = 123
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_modelinvocationjobarn = lo_result->get_jobarn( ).
ENDIF.