start_async_invoke
¶
start_async_invoke(
model_id: AsyncInvokeIdentifier,
model_input: ModelInputPayload,
output_data_config: AsyncInvokeOutputDataConfig,
*,
config_overrides: Optional[BedrockRuntimeClientConfig] = None,
client_request_token: Optional[AsyncInvokeIdempotencyToken] = None,
tags: Optional[TagList] = None,
) -> StartAsyncInvokeResponse
Starts an asynchronous invocation.
This operation requires permission for the bedrock:InvokeModel action.
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:
-
client_request_token(Optional[AsyncInvokeIdempotencyToken], default:None) –Specify idempotency token to ensure that requests are not duplicated.
-
model_id(AsyncInvokeIdentifier) –The model to invoke.
-
model_input(ModelInputPayload) –Input to send to the model.
-
output_data_config(AsyncInvokeOutputDataConfig) –Where to store the output.
-
tags(Optional[TagList], default:None) –Tags to apply to the invocation.
Raises:
-
AccessDeniedException–The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide
-
ConflictException–Error occurred because of a conflict while performing an operation.
-
InternalServerException–An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide
-
ResourceNotFoundException–The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide
-
ServiceQuotaExceededException–Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.
-
ServiceUnavailableException–The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide
-
ThrottlingException–Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide
-
ValidationException–The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_runtime/_services/bedrock_runtime.py
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 | |