create_model_invocation_job
¶
create_model_invocation_job(
job_name: ModelInvocationJobName,
role_arn: RoleArn,
model_id: ModelId,
input_data_config: ModelInvocationJobInputDataConfig,
output_data_config: ModelInvocationJobOutputDataConfig,
*,
config_overrides: Optional[BedrockClientConfig] = 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/bedrock.py
6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 | |