create_model_invocation_job¶
Operation¶
create_model_invocation_job
¶
create_model_invocation_job(request: CreateModelInvocationJobInput | CreateModelInvocationJobInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateModelInvocationJobInputDict]) -> 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 |
|---|---|---|---|
request
|
CreateModelInvocationJobInput | CreateModelInvocationJobInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[CreateModelInvocationJobInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateModelInvocationJobOutput
|
An instance of |
create_model_invocation_job
async
¶
create_model_invocation_job(request: CreateModelInvocationJobInput | CreateModelInvocationJobInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateModelInvocationJobInputDict]) -> 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 |
|---|---|---|---|
request
|
CreateModelInvocationJobInput | CreateModelInvocationJobInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[CreateModelInvocationJobInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateModelInvocationJobOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
CreateModelInvocationJobInputDict
¶
Bases: TypedDict
Dictionary form of CreateModelInvocationJobInput.
Attributes¶
client_request_token
instance-attribute
¶
client_request_token: str | 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.
This field is autopopulated if not provided.
input_data_config
instance-attribute
¶
input_data_config: Required[ModelInvocationJobInputDataConfig | ModelInvocationJobInputDataConfigDict]
Details about the location of the input to the batch inference job.
model_id
instance-attribute
¶
The unique identifier of the foundation model to use for the batch inference job.
model_invocation_type
instance-attribute
¶
model_invocation_type: str | None
The invocation endpoint for ModelInvocationJob
output_data_config
instance-attribute
¶
output_data_config: Required[ModelInvocationJobOutputDataConfig | ModelInvocationJobOutputDataConfigDict]
Details about the location of the output of the batch inference job.
role_arn
instance-attribute
¶
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
instance-attribute
¶
Any tags to associate with the batch inference job. For more information, see Tagging Amazon Bedrock resources.
timeout_duration_in_hours
instance-attribute
¶
timeout_duration_in_hours: int | None
The number of hours after which to force the batch inference job to time out.
vpc_config
instance-attribute
¶
vpc_config: VpcConfig | VpcConfigDict | 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.
CreateModelInvocationJobInput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateModelInvocationJobInput structure.
Attributes¶
client_request_token
class-attribute
instance-attribute
¶
client_request_token: str | 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.
This field is autopopulated if not provided.
input_data_config
class-attribute
instance-attribute
¶
input_data_config: ModelInvocationJobInputDataConfig | None = ...
Details about the location of the input to the batch inference job.
job_name
class-attribute
instance-attribute
¶
job_name: str | None = ...
A name to give the batch inference job.
model_id
class-attribute
instance-attribute
¶
model_id: str | 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: str = ...
The invocation endpoint for ModelInvocationJob
output_data_config
class-attribute
instance-attribute
¶
output_data_config: ModelInvocationJobOutputDataConfig | None = ...
Details about the location of the output of the batch inference job.
role_arn
class-attribute
instance-attribute
¶
role_arn: str | 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
¶
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 = ...
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 = ...
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
¶
Bases: _SerdeShape
Dataclass for CreateModelInvocationJobOutput structure.
Attributes¶
job_arn
instance-attribute
¶
job_arn: str
The Amazon Resource Name (ARN) of the batch inference job.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.