create_model_invocation_job
async
¶
create_model_invocation_job(
job_name: ModelInvocationJobName,
role_arn: RoleArn,
model_id: ModelId,
input_data_config: ModelInvocationJobInputDataConfig,
output_data_config: ModelInvocationJobOutputDataConfig,
*,
config_overrides: Optional[AsyncBedrockClientConfig] = None,
client_request_token: Optional[ModelInvocationIdempotencyToken] = None,
vpc_config: Optional[VpcConfig] = None,
timeout_duration_in_hours: Optional[
ModelInvocationJobTimeoutDurationInHours
] = None,
tags: Optional[TagList] = None,
model_invocation_type: Optional[ModelInvocationType] = None,
) -> CreateModelInvocationJobResponse
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:
-
job_name(ModelInvocationJobName) –A name to give the batch inference job.
-
role_arn(RoleArn) –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.
-
client_request_token(Optional[ModelInvocationIdempotencyToken], default: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.
-
model_id(ModelId) –The unique identifier of the foundation model to use for the batch inference job.
-
input_data_config(ModelInvocationJobInputDataConfig) –Details about the location of the input to the batch inference job.
-
output_data_config(ModelInvocationJobOutputDataConfig) –Details about the location of the output of the batch inference job.
-
vpc_config(Optional[VpcConfig], default: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.
-
timeout_duration_in_hours(Optional[ModelInvocationJobTimeoutDurationInHours], default:None) –The number of hours after which to force the batch inference job to time out.
-
tags(Optional[TagList], default:None) –Any tags to associate with the batch inference job. For more information, see Tagging Amazon Bedrock resources.
-
model_invocation_type(Optional[ModelInvocationType], default:None) –The invocation endpoint for ModelInvocationJob
Raises:
-
AccessDeniedException–The request is denied because of missing access permissions.
-
ConflictException–Error occurred because of a conflict while performing an operation.
-
InternalServerException–An internal server error occurred. Retry your request.
-
ResourceNotFoundException–The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
-
ServiceQuotaExceededException–The number of requests exceeds the service quota. Resubmit your request later.
-
ThrottlingException–The number of requests exceeds the limit. Resubmit your request later.
-
ValidationException–Input validation failed. Check your request parameters and retry the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock/_services/async_bedrock.py
6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 | |