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:InvokeModelaction.Warning
To deny all inference access to resources that you specify in the modelId field, you need to deny access to the
bedrock:InvokeModelandbedrock:InvokeModelWithResponseStreamactions. 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.AccessDeniedExceptionBedrockRuntime.Client.exceptions.ThrottlingExceptionBedrockRuntime.Client.exceptions.ResourceNotFoundExceptionBedrockRuntime.Client.exceptions.InternalServerExceptionBedrockRuntime.Client.exceptions.ServiceUnavailableExceptionBedrockRuntime.Client.exceptions.ValidationExceptionBedrockRuntime.Client.exceptions.ServiceQuotaExceededExceptionBedrockRuntime.Client.exceptions.ConflictException