Skip to content

Bedrock  >  Operations  >  create_model_invocation_job

create_model_invocation_job

Operation

create_model_invocation_job async

create_model_invocation_job(input: CreateModelInvocationJobInput, plugins: list[Plugin] | None = None) -> CreateModelInvocationJobOutput

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.

Parameters:

Name Type Description Default
input CreateModelInvocationJobInput

An instance of CreateModelInvocationJobInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateModelInvocationJobOutput

An instance of CreateModelInvocationJobOutput.

Input

CreateModelInvocationJobInput dataclass

Dataclass for CreateModelInvocationJobInput structure.

Attributes

client_request_token class-attribute instance-attribute
client_request_token: str | None = None

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.

input_data_config class-attribute instance-attribute
input_data_config: ModelInvocationJobInputDataConfig | None = None

Details about the location of the input to the batch inference job.

job_name class-attribute instance-attribute
job_name: str | None = None

A name to give the batch inference job.

model_id class-attribute instance-attribute
model_id: str | None = None

The unique identifier of the foundation model to use for the batch inference job.

model_invocation_type class-attribute instance-attribute
model_invocation_type: ModelInvocationType = ModelInvocationType('InvokeModel')

The invocation endpoint for ModelInvocationJob

output_data_config class-attribute instance-attribute
output_data_config: ModelInvocationJobOutputDataConfig | None = None

Details about the location of the output of the batch inference job.

role_arn class-attribute instance-attribute
role_arn: str | None = None

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.

tags class-attribute instance-attribute
tags: list[Tag] | None = None

Any tags to associate with the batch inference job. For more information, see Tagging Amazon Bedrock resources.

timeout_duration_in_hours class-attribute instance-attribute
timeout_duration_in_hours: int | None = None

The number of hours after which to force the batch inference job to time out.

vpc_config class-attribute instance-attribute
vpc_config: VpcConfig | None = None

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.

Output

CreateModelInvocationJobOutput dataclass

Dataclass for CreateModelInvocationJobOutput structure.

Attributes

job_arn instance-attribute
job_arn: str

The Amazon Resource Name (ARN) of the batch inference job.