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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.bedrock.flows
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

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