BedrockRuntime / Client / start_async_invoke
start_async_invoke#
- BedrockRuntime.Client.start_async_invoke(**kwargs)#
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
andbedrock: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.See also: AWS API Documentation
Request Syntax
response = client.start_async_invoke( clientRequestToken='string', modelId='string', modelInput={...}|[...]|123|123.4|'string'|True|None, outputDataConfig={ 's3OutputDataConfig': { 's3Uri': 'string', 'kmsKeyId': 'string', 'bucketOwner': 'string' } }, tags=[ { 'key': 'string', 'value': 'string' }, ] )
- Parameters:
clientRequestToken (string) –
Specify idempotency token to ensure that requests are not duplicated.
This field is autopopulated if not provided.
modelId (string) –
[REQUIRED]
The model to invoke.
modelInput (document) –
[REQUIRED]
Input to send to the model.
outputDataConfig (dict) –
[REQUIRED]
Where to store the output.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
s3OutputDataConfig
.s3OutputDataConfig (dict) –
A storage location for the output data in an S3 bucket
s3Uri (string) – [REQUIRED]
An object URI starting with
s3://
.kmsKeyId (string) –
A KMS encryption key ID.
bucketOwner (string) –
If the bucket belongs to another AWS account, specify that account’s ID.
tags (list) –
Tags to apply to the invocation.
(dict) –
A tag.
key (string) – [REQUIRED]
The tag’s key.
value (string) – [REQUIRED]
The tag’s value.
- Return type:
dict
- Returns:
Response Syntax
{ 'invocationArn': 'string' }
Response Structure
(dict) –
invocationArn (string) –
The ARN of the invocation.
Exceptions
BedrockRuntime.Client.exceptions.AccessDeniedException
BedrockRuntime.Client.exceptions.ResourceNotFoundException
BedrockRuntime.Client.exceptions.ThrottlingException
BedrockRuntime.Client.exceptions.InternalServerException
BedrockRuntime.Client.exceptions.ServiceUnavailableException
BedrockRuntime.Client.exceptions.ValidationException
BedrockRuntime.Client.exceptions.ServiceQuotaExceededException
BedrockRuntime.Client.exceptions.ConflictException