Skip to main content

flows

Creates, updates, deletes or gets a flow resource or lists flows in a region

Overview

Nameflows
TypeResource
DescriptionDefinition of AWS::Bedrock::Flow Resource Type
Idawscc.bedrock.flows

Fields

NameDatatypeDescription
arnstringArn representation of the Flow
created_atstringTime Stamp.
definitionobjectFlow definition
definition_stringstringA JSON string containing a Definition with the same schema as the Definition property of this resource
definition_s3_locationobjectAn Amazon S3 location.
definition_substitutionsobjectWhen supplied with DefinitionString or DefinitionS3Location, substrings in the definition matching ${keyname} will be replaced with the associated value from this map
descriptionstringDescription of the flow
execution_role_arnstringARN of a IAM role
idstringIdentifier for a Flow
namestringName for the flow
statusstringSchema Type for Flow APIs
updated_atstringTime Stamp.
customer_encryption_key_arnstringA KMS key ARN
validationsarrayList of flow validations
versionstringDraft Version.
tagsobjectA map of tag keys and values
regionstringAWS region.

For more information, see AWS::Bedrock::Flow.

Methods

NameResourceAccessible byRequired Params
create_resourceflowsINSERTExecutionRoleArn, Name, region
delete_resourceflowsDELETEIdentifier, region
update_resourceflowsUPDATEIdentifier, PatchDocument, region
list_resourcesflows_list_onlySELECTregion
get_resourceflowsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual flow.

SELECT
region,
arn,
created_at,
definition,
definition_string,
definition_s3_location,
definition_substitutions,
description,
execution_role_arn,
id,
name,
status,
updated_at,
customer_encryption_key_arn,
validations,
version,
tags,
test_alias_tags
FROM awscc.bedrock.flows
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new flow resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.bedrock.flows (
ExecutionRoleArn,
Name,
region
)
SELECT
'{{ execution_role_arn }}',
'{{ name }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a flow resource, using stack-deploy.

/*+ update */
UPDATE awscc.bedrock.flows
SET PatchDocument = string('{{ {
"Definition": definition,
"DefinitionString": definition_string,
"DefinitionS3Location": definition_s3_location,
"DefinitionSubstitutions": definition_substitutions,
"Description": description,
"ExecutionRoleArn": execution_role_arn,
"Name": name,
"CustomerEncryptionKeyArn": customer_encryption_key_arn,
"Tags": tags,
"TestAliasTags": test_alias_tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.bedrock.flows
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

To operate on the flows resource, the following permissions are required:

bedrock:CreateFlow,
bedrock:GetFlow,
bedrock:PrepareFlow,
iam:PassRole,
s3:GetObject,
s3:GetObjectVersion,
bedrock:TagResource,
bedrock:ListTagsForResource,
kms:GenerateDataKey,
kms:Decrypt,
bedrock:CreateGuardrail,
bedrock:CreateGuardrailVersion,
bedrock:GetGuardrail