Skip to main content

flow_versions

Creates, updates, deletes, gets or lists a flow_versions resource.

Overview

Nameflow_versions
TypeResource
Idaws.bedrock_agent.flow_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the flow. (pattern: <code>[0-9a-zA-Z]{10}</code>)
namestringThe name of the version. (pattern: <code>([0-9a-zA-Z][_-]?){1,100}</code>)
arnstringThe Amazon Resource Name (ARN) of the flow. (pattern: <code>arn:aws:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:flow/[0-9a-zA-Z]{10}</code>)
created_atstring (date-time)The time at which the flow was created.
customer_encryption_key_arnstringThe Amazon Resource Name (ARN) of the KMS key that the version of the flow is encrypted with. (pattern: <code>arn:aws(|-cn|-us-gov):kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}</code>)
definitionobjectThe definition of the nodes and connections between nodes in the flow.
descriptionstringThe description of the flow.
execution_role_arnstringThe Amazon Resource Name (ARN) of the service role with permissions to create a flow. For more information, see Create a service role for flows in Amazon Bedrock in the Amazon Bedrock User Guide. (pattern: <code>arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/(service-role/)?.+</code>)
statusstringThe status of the flow. (Failed, Prepared, Preparing, NotPrepared)
versionstringThe version of the flow for which information was retrieved. (pattern: <code>[0-9]{1,5}</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_flow_versionselectflow_identifier, flow_version, regionincludedDataRetrieves information about a version of a flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
list_flow_versionsselectflow_identifier, regionmaxResults, nextTokenReturns a list of information about each flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
create_flow_versioninsertflow_identifier, regionCreates a version of the flow that you can deploy. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
delete_flow_versiondeleteflow_identifier, flow_version, regionskipResourceInUseCheckDeletes a version of a flow.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
flow_identifierstringThe unique identifier of the flow whose version that you want to delete
flow_versionstringThe version of the flow that you want to delete.
regionstringAWS region (default: us-east-1)
includedDatastringControls the scope of data returned. Set to METADATA_ONLY to return only resource metadata. Set to ALL_DATA or omit this field to return the full response.
maxResultsintegerThe maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.
nextTokenstringIf the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.
skipResourceInUseCheckbooleanBy default, this value is false and deletion is stopped if the resource is in use. If you set it to true, the resource will be deleted even if the resource is in use.

SELECT examples

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

SELECT
id,
name,
arn,
created_at,
customer_encryption_key_arn,
definition,
description,
execution_role_arn,
status,
version
FROM aws.bedrock_agent.flow_versions
WHERE flow_identifier = '{{ flow_identifier }}' -- required
AND flow_version = '{{ flow_version }}' -- required
AND region = '{{ region }}' -- required
AND includedData = '{{ includedData }}'
;

INSERT examples

Creates a version of the flow that you can deploy. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

INSERT INTO aws.bedrock_agent.flow_versions (
description,
clientToken,
flow_identifier,
region
)
SELECT
'{{ description }}',
'{{ clientToken }}',
'{{ flow_identifier }}',
'{{ region }}'
RETURNING
id,
name,
arn,
created_at,
customer_encryption_key_arn,
definition,
description,
execution_role_arn,
status,
version
;

DELETE examples

Deletes a version of a flow.

DELETE FROM aws.bedrock_agent.flow_versions
WHERE flow_identifier = '{{ flow_identifier }}' --required
AND flow_version = '{{ flow_version }}' --required
AND region = '{{ region }}' --required
AND skipResourceInUseCheck = '{{ skipResourceInUseCheck }}'
;