Skip to content

start_async_invoke

Operation

start_async_invoke

start_async_invoke(request: StartAsyncInvokeInput | StartAsyncInvokeInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[StartAsyncInvokeInputDict]) -> StartAsyncInvokeOutput

Starts an asynchronous invocation.

This operation requires permission for the bedrock:InvokeModel action.

Warning

To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models.

Parameters:

Name Type Description Default
request StartAsyncInvokeInput | StartAsyncInvokeInputDict | 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[StartAsyncInvokeInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
StartAsyncInvokeOutput

An instance of StartAsyncInvokeOutput.

start_async_invoke async

start_async_invoke(request: StartAsyncInvokeInput | StartAsyncInvokeInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[StartAsyncInvokeInputDict]) -> StartAsyncInvokeOutput

Starts an asynchronous invocation.

This operation requires permission for the bedrock:InvokeModel action.

Warning

To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models.

Parameters:

Name Type Description Default
request StartAsyncInvokeInput | StartAsyncInvokeInputDict | 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[StartAsyncInvokeInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
StartAsyncInvokeOutput

An instance of StartAsyncInvokeOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

StartAsyncInvokeInputDict

Bases: TypedDict

Dictionary form of StartAsyncInvokeInput.

Attributes

client_request_token instance-attribute
client_request_token: str | None

Specify idempotency token to ensure that requests are not duplicated.

This field is autopopulated if not provided.

model_id instance-attribute
model_id: Required[str]

The model to invoke.

model_input instance-attribute
model_input: Required[Document]

Input to send to the model.

output_data_config instance-attribute

Where to store the output.

tags instance-attribute
tags: Sequence[Tag | TagDict] | None

Tags to apply to the invocation.

StartAsyncInvokeInput dataclass

Bases: _SerdeShape

Dataclass for StartAsyncInvokeInput structure.

Attributes

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

Specify idempotency token to ensure that requests are not duplicated.

This field is autopopulated if not provided.

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

The model to invoke.

model_input class-attribute instance-attribute
model_input: Document | None = ...

Input to send to the model.

output_data_config class-attribute instance-attribute
output_data_config: AsyncInvokeOutputDataConfig | None = ...

Where to store the output.

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

Tags to apply to the invocation.

Output

StartAsyncInvokeOutput dataclass

Bases: _SerdeShape

Dataclass for StartAsyncInvokeOutput structure.

Attributes

invocation_arn instance-attribute
invocation_arn: str

The ARN of the invocation.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

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.