flow_versions
Creates, updates, deletes, gets or lists a flow_versions resource.
Overview
| Name | flow_versions |
| Type | Resource |
| Id | aws.bedrock_agent.flow_versions |
Fields
The following fields are returned by SELECT queries:
- get_flow_version
- list_flow_versions
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the flow. (pattern: <code>[0-9a-zA-Z]{10}</code>) |
name | string | The name of the version. (pattern: <code>([0-9a-zA-Z][_-]?){1,100}</code>) |
arn | string | The 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_at | string (date-time) | The time at which the flow was created. |
customer_encryption_key_arn | string | The 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>) |
definition | object | The definition of the nodes and connections between nodes in the flow. |
description | string | The description of the flow. |
execution_role_arn | string | The 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>) |
status | string | The status of the flow. (Failed, Prepared, Preparing, NotPrepared) |
version | string | The version of the flow for which information was retrieved. (pattern: <code>[0-9]{1,5}</code>) |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the flow. (pattern: <code>[0-9a-zA-Z]{10}</code>) |
arn | string | The Amazon Resource Name (ARN) of the flow that the version belongs to. (pattern: <code>arn:aws:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:flow/[0-9a-zA-Z]{10}</code>) |
created_at | string (date-time) | The time at the version was created. |
status | string | The status of the flow. (Failed, Prepared, Preparing, NotPrepared) |
version | string | The version of the flow. (pattern: <code>[0-9]{1,5}</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_flow_version | select | flow_identifier, flow_version, region | includedData | Retrieves 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_versions | select | flow_identifier, region | maxResults, nextToken | Returns 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_version | insert | flow_identifier, region | 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. | |
delete_flow_version | delete | flow_identifier, flow_version, region | skipResourceInUseCheck | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
flow_identifier | string | The unique identifier of the flow whose version that you want to delete |
flow_version | string | The version of the flow that you want to delete. |
region | string | AWS region (default: us-east-1) |
includedData | string | Controls 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. |
maxResults | integer | The 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. |
nextToken | string | If 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. |
skipResourceInUseCheck | boolean | By 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
- get_flow_version
- list_flow_versions
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 }}'
;
Returns a list of information about each flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
SELECT
id,
arn,
created_at,
status,
version
FROM aws.bedrock_agent.flow_versions
WHERE flow_identifier = '{{ flow_identifier }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_flow_version
- Manifest
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
;
# Description fields are for documentation purposes
- name: flow_versions
props:
- name: flow_identifier
value: "{{ flow_identifier }}"
description: Required parameter for the flow_versions resource.
- name: region
value: "{{ region }}"
description: Required parameter for the flow_versions resource.
- name: description
value: "{{ description }}"
- name: clientToken
value: "{{ clientToken }}"
DELETE examples
- delete_flow_version
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 }}'
;