BedrockAgentRuntimeClient.invoke_flow
rboto-bedrock-agent-runtime==0.4.0 · Service index · Types
Model summary (excerpt): Invokes an alias of a flow to run the inputs that you specify and return the output of each node as a stream. If there's an error, the error is returned. For more information, see Test a flow in Amazon Bedrock in the Amazon Bedrock User Guide . The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeFlow .
Install and imports
from rboto import BedrockAgentRuntimeClient
from collections.abc import Sequence
from rboto_bedrock_agent_runtime.types import (
FlowInput,
InvokeFlowOutput,
ModelPerformanceConfiguration,
)
Signature
async def invoke_flow(
*,
flow_identifier: str,
flow_alias_identifier: str,
inputs: Sequence[FlowInput],
enable_trace: bool | None = None,
model_performance_configuration: ModelPerformanceConfiguration | None = None,
execution_id: str | None = None,
) -> InvokeFlowOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
flow_identifier |
Yes | The unique identifier of the flow. |
flow_alias_identifier |
Yes | The unique identifier of the flow alias. |
inputs |
Yes | A list of objects, each containing information about an input into the flow. |
enable_trace |
No | Specifies whether to return the trace for the flow or not. Traces track inputs and outputs for nodes in the flow. For more information, see Track each step in your prompt flow by viewing its trace in Amazon Bedrock . |
model_performance_configuration |
No | Model performance settings for the request. |
execution_id |
No | The unique identifier for the current flow execution. If you don't provide a value, Amazon Bedrock creates the identifier for you. |
Output
InvokeFlowOutput.
Typed response mapping, accessed as response["field"].
| Field | Type | Presence | References |
|---|---|---|---|
response_stream |
AsyncIterator[FlowResponseStream] |
Always present | FlowResponseStream |
execution_id |
str | None |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
FlowInput, InvokeFlowOutput, ModelPerformanceConfiguration
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
Output streams: InvokeFlowOutput.
Consume with async for. Do not reuse a consumed stream.
Errors
Import from rboto_bedrock_agent_runtime.exceptions:
AccessDeniedError, BadGatewayError, ConflictError, DependencyFailedError, InternalServerError, ResourceNotFoundError, ServiceQuotaExceededError, ThrottlingError, ValidationError.
Stream decoding may also raise the linked modeled event errors.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.