Skip to content

aws.bedrock_agent.get_flow

Example SQL Queries

SELECT * FROM
aws.bedrock_agent.get_flow
WHERE
"flow_identifier" = 'VALUE';

Description

Retrieves information about a flow. For more information, see Manage a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

Table Definition

Column NameColumn Data Type
flow_identifier Required Input Column

The unique identifier of the flow.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

arn

The Amazon Resource Name (ARN) of the flow.

VARCHAR
created_at

The time at which the flow was created.

TIMESTAMP_S
customer_encryption_key_arn

The Amazon Resource Name (ARN) of the KMS key that the flow is encrypted with.

VARCHAR
definition

The definition of the nodes and connections between the nodes in the flow.

STRUCT(
"connections" STRUCT(
"configuration" STRUCT(
"conditional" STRUCT(
"condition" VARCHAR
),
"data" STRUCT(
"source_output" VARCHAR,
"target_input" VARCHAR
)
),
"name" VARCHAR,
"source" VARCHAR,
"target" VARCHAR,
"type" VARCHAR
)[],
"nodes" STRUCT(
"configuration" STRUCT(
"agent" STRUCT(
"agent_alias_arn" VARCHAR
),
"collector" BOOLEAN,
"condition" STRUCT(
"conditions" STRUCT(
"expression" VARCHAR,
"name" VARCHAR
)[]
),
"input" BOOLEAN,
"iterator" BOOLEAN,
"knowledge_base" STRUCT(
"knowledge_base_id" VARCHAR,
"model_id" VARCHAR
),
"lambda_function" STRUCT(
"lambda_arn" VARCHAR
),
"lex" STRUCT(
"bot_alias_arn" VARCHAR,
"locale_id" VARCHAR
),
"output" BOOLEAN,
"prompt" STRUCT(
"source_configuration" STRUCT(
"inline" STRUCT(
"inference_configuration" STRUCT(
"text" STRUCT(
"max_tokens" BIGINT,
"stop_sequences" VARCHAR[],
"temperature" DOUBLE,
"top_k" BIGINT,
"top_p" DOUBLE
)
),
"model_id" VARCHAR,
"template_configuration" STRUCT(
"text" STRUCT(
"input_variables" STRUCT(
"name" VARCHAR
)[],
"text" VARCHAR
)
),
"template_type" VARCHAR
),
"resource" STRUCT(
"prompt_arn" VARCHAR
)
)
),
"retrieval" STRUCT(
"service_configuration" STRUCT(
"s3" STRUCT(
"bucket_name" VARCHAR
)
)
),
"storage" STRUCT(
"service_configuration" STRUCT(
"s3" STRUCT(
"bucket_name" VARCHAR
)
)
)
),
"inputs" STRUCT(
"expression" VARCHAR,
"name" VARCHAR,
"type" VARCHAR
)[],
"name" VARCHAR,
"outputs" STRUCT(
"name" VARCHAR,
"type" VARCHAR
)[],
"type" VARCHAR
)[]
)
Show child fields
definition.connections[]
Show child fields
definition.connections[].configuration

The configuration of the connection.

Show child fields
definition.connections[].configuration.conditional

The configuration of a connection originating from a Condition node.

Show child fields
definition.connections[].configuration.conditional.condition

The condition that triggers this connection. For more information about how to write conditions, see the Condition node type in the Node types topic in the Amazon Bedrock User Guide.

definition.connections[].configuration.data

The configuration of a connection originating from a node that isn't a Condition node.

Show child fields
definition.connections[].configuration.data.source_output

The name of the output in the source node that the connection begins from.

definition.connections[].configuration.data.target_input

The name of the input in the target node that the connection ends at.

definition.connections[].name

A name for the connection that you can reference.

definition.connections[].source

The node that the connection starts at.

definition.connections[].target

The node that the connection ends at.

definition.connections[].type

Whether the source node that the connection begins from is a condition node (Conditional) or not (Data).

definition.nodes[]
Show child fields
definition.nodes[].configuration

Contains configurations for the node.

Show child fields
definition.nodes[].configuration.agent

Contains configurations for an agent node in your flow. Invokes an alias of an agent and returns the response.

Show child fields
definition.nodes[].configuration.agent.agent_alias_arn

The Amazon Resource Name (ARN) of the alias of the agent to invoke.

definition.nodes[].configuration.collector

Contains configurations for a collector node in your flow. Collects an iteration of inputs and consolidates them into an array of outputs.

definition.nodes[].configuration.condition

Contains configurations for a Condition node in your flow. Defines conditions that lead to different branches of the flow.

Show child fields
definition.nodes[].configuration.condition.conditions[]
Show child fields
definition.nodes[].configuration.condition.conditions[].expression

Defines the condition. You must refer to at least one of the inputs in the condition. For more information, expand the Condition node section in Node types in prompt flows.

definition.nodes[].configuration.condition.conditions[].name

A name for the condition that you can reference.

definition.nodes[].configuration.input

Contains configurations for an input flow node in your flow. The first node in the flow. inputs can't be specified for this node.

definition.nodes[].configuration.iterator

Contains configurations for an iterator node in your flow. Takes an input that is an array and iteratively sends each item of the array as an output to the following node. The size of the array is also returned in the output.

The output flow node at the end of the flow iteration will return a response for each member of the array. To return only one response, you can include a collector node downstream from the iterator node.

definition.nodes[].configuration.knowledge_base

Contains configurations for a knowledge base node in your flow. Queries a knowledge base and returns the retrieved results or generated response.

Show child fields
definition.nodes[].configuration.knowledge_base.knowledge_base_id

The unique identifier of the knowledge base to query.

definition.nodes[].configuration.knowledge_base.model_id

The unique identifier of the model to use to generate a response from the query results. Omit this field if you want to return the retrieved results as an array.

definition.nodes[].configuration.lambda_function

Contains configurations for a Lambda function node in your flow. Invokes an Lambda function.

Show child fields
definition.nodes[].configuration.lambda_function.lambda_arn

The Amazon Resource Name (ARN) of the Lambda function to invoke.

definition.nodes[].configuration.lex

Contains configurations for a Lex node in your flow. Invokes an Amazon Lex bot to identify the intent of the input and return the intent as the output.

Show child fields
definition.nodes[].configuration.lex.bot_alias_arn

The Amazon Resource Name (ARN) of the Amazon Lex bot alias to invoke.

definition.nodes[].configuration.lex.locale_id

The Region to invoke the Amazon Lex bot in.

definition.nodes[].configuration.output

Contains configurations for an output flow node in your flow. The last node in the flow. outputs can't be specified for this node.

definition.nodes[].configuration.prompt

Contains configurations for a prompt node in your flow. Runs a prompt and generates the model response as the output. You can use a prompt from Prompt management or you can configure one in this node.

Show child fields
definition.nodes[].configuration.prompt.source_configuration

Specifies whether the prompt is from Prompt management or defined inline.

Show child fields
definition.nodes[].configuration.prompt.source_configuration.inline

Contains configurations for a prompt that is defined inline

Show child fields
definition.nodes[].configuration.prompt.source_configuration.inline.inference_configuration

Contains inference configurations for the prompt.

Show child fields
definition.nodes[].configuration.prompt.source_configuration.inline.inference_configuration.text

Contains inference configurations for a text prompt.

Show child fields
definition.nodes[].configuration.prompt.source_configuration.inline.inference_configuration.text.max_tokens

The maximum number of tokens to return in the response.

definition.nodes[].configuration.prompt.source_configuration.inline.inference_configuration.text.stop_sequences[]
definition.nodes[].configuration.prompt.source_configuration.inline.inference_configuration.text.temperature

Controls the randomness of the response. Choose a lower value for more predictable outputs and a higher value for more surprising outputs.

definition.nodes[].configuration.prompt.source_configuration.inline.inference_configuration.text.top_k

The number of most-likely candidates that the model considers for the next token during generation.

definition.nodes[].configuration.prompt.source_configuration.inline.inference_configuration.text.top_p

The percentage of most-likely candidates that the model considers for the next token.

definition.nodes[].configuration.prompt.source_configuration.inline.model_id

The unique identifier of the model to run inference with.

definition.nodes[].configuration.prompt.source_configuration.inline.template_configuration

Contains a prompt and variables in the prompt that can be replaced with values at runtime.

Show child fields
definition.nodes[].configuration.prompt.source_configuration.inline.template_configuration.text

Contains configurations for the text in a message for a prompt.

Show child fields
definition.nodes[].configuration.prompt.source_configuration.inline.template_configuration.text.input_variables[]
Show child fields
definition.nodes[].configuration.prompt.source_configuration.inline.template_configuration.text.input_variables[].name

The name of the variable.

definition.nodes[].configuration.prompt.source_configuration.inline.template_configuration.text.text

The message for the prompt.

definition.nodes[].configuration.prompt.source_configuration.inline.template_type

The type of prompt template.

definition.nodes[].configuration.prompt.source_configuration.resource

Contains configurations for a prompt from Prompt management.

Show child fields
definition.nodes[].configuration.prompt.source_configuration.resource.prompt_arn

The Amazon Resource Name (ARN) of the prompt from Prompt management.

definition.nodes[].configuration.retrieval

Contains configurations for a Retrieval node in your flow. Retrieves data from an Amazon S3 location and returns it as the output.

Show child fields
definition.nodes[].configuration.retrieval.service_configuration

Contains configurations for the service to use for retrieving data to return as the output from the node.

Show child fields
definition.nodes[].configuration.retrieval.service_configuration.s3

Contains configurations for the Amazon S3 location from which to retrieve data to return as the output from the node.

Show child fields
definition.nodes[].configuration.retrieval.service_configuration.s3.bucket_name

The name of the Amazon S3 bucket from which to retrieve data.

definition.nodes[].configuration.storage

Contains configurations for a Storage node in your flow. Stores an input in an Amazon S3 location.

Show child fields
definition.nodes[].configuration.storage.service_configuration

Contains configurations for the service to use for storing the input into the node.

Show child fields
definition.nodes[].configuration.storage.service_configuration.s3

Contains configurations for the Amazon S3 location in which to store the input into the node.

Show child fields
definition.nodes[].configuration.storage.service_configuration.s3.bucket_name

The name of the Amazon S3 bucket in which to store the input into the node.

definition.nodes[].inputs[]
Show child fields
definition.nodes[].inputs[].expression

An expression that formats the input for the node. For an explanation of how to create expressions, see Expressions in Prompt flows in Amazon Bedrock.

definition.nodes[].inputs[].name

A name for the input that you can reference.

definition.nodes[].inputs[].type

The data type of the input. If the input doesn't match this type at runtime, a validation error will be thrown.

definition.nodes[].name

A name for the node.

definition.nodes[].outputs[]
Show child fields
definition.nodes[].outputs[].name

A name for the output that you can reference.

definition.nodes[].outputs[].type

The data type of the output. If the output doesn't match this type at runtime, a validation error will be thrown.

definition.nodes[].type

The type of node. This value must match the name of the key that you provide in the configuration you provide in the FlowNodeConfiguration field.

description

The description of the flow.

VARCHAR
execution_role_arn

The Amazon Resource Name (ARN) of the service role with permissions to create a flow. For more information, see Create a service row for flows in the Amazon Bedrock User Guide.

VARCHAR
id

The unique identifier of the flow.

VARCHAR
name

The name of the flow.

VARCHAR
status

The status of the flow. The following statuses are possible:

  • NotPrepared – The flow has been created or updated, but hasn't been prepared. If you just created the flow, you can't test it. If you updated the flow, the DRAFT version won't contain the latest changes for testing. Send a PrepareFlow request to package the latest changes into the DRAFT version.

  • Preparing – The flow is being prepared so that the DRAFT version contains the latest changes for testing.

  • Prepared – The flow is prepared and the DRAFT version contains the latest changes for testing.

  • Failed – The last API operation that you invoked on the flow failed. Send a GetFlow request and check the error message in the validations field.

VARCHAR
updated_at

The time at which the flow was last updated.

TIMESTAMP_S
validations

A list of validation error messages related to the last failed operation on the flow.

STRUCT(
"message" VARCHAR,
"severity" VARCHAR
)[]
Show child fields
validations[]
Show child fields
validations[].message

A message describing the validation error.

validations[].severity

The severity of the issue described in the message.

version

The version of the flow for which information was retrieved.

VARCHAR