This documentation is a draft for private preview for regions in the AWS European Sovereign Cloud. Documentation content will continue to evolve. Published: January 13, 2026.Use ListFlows with an AWS SDK
The following code example shows how to use ListFlows.
- Python
-
- SDK for Python (Boto3)
-
List Amazon Bedrock flows.
def list_flows(client):
"""
Lists versions of an Amazon Bedrock flow.
Args:
client: Amazon Bedrock agent boto3 client.
flow_id (str): The identifier of the flow.
Returns:
Nothing.
"""
try:
finished = False
logger.info("Listing flows:")
response = client.list_flows(maxResults=10)
while finished is False:
for flow in response['flowSummaries']:
print(f"ID: {flow['id']}")
print(f"Name: {flow['name']}")
print(
f"Description: {flow.get('description', 'No description')}")
print(f"Latest version: {flow['version']}")
print(f"Status: {flow['status']}\n")
if 'nextToken' in response:
next_token = response['nextToken']
response = client.list_flows(maxResults=10,
nextToken=next_token)
else:
finished = True
logging.info("Successfully listed flows.")
except ClientError as e:
logging.exception("Client error listing flow versions: %s", str(e))
raise
except Exception as e:
logging.exception("Unexpected error listing flow versions: %s", str(e))
raise
For a complete list of AWS SDK developer guides and code examples, see
Using Amazon Bedrock with an AWS SDK.
This topic also includes information about getting started and details about previous SDK versions.