flows
Creates, updates, deletes or gets a flow resource or lists flows in a region
Overview
| Name | flows |
| Type | Resource |
| Description | Definition of AWS::Bedrock::Flow Resource Type |
| Id | awscc.bedrock.flows |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | Arn representation of the Flow |
created_at | string | Time Stamp. |
definition | object | Flow definition |
definition_string | string | A JSON string containing a Definition with the same schema as the Definition property of this resource |
definition_s3_location | object | An Amazon S3 location. |
definition_substitutions | object | When supplied with DefinitionString or DefinitionS3Location, substrings in the definition matching ${keyname} will be replaced with the associated value from this map |
description | string | Description of the flow |
execution_role_arn | string | ARN of a IAM role |
id | string | Identifier for a Flow |
name | string | Name for the flow |
status | string | Schema Type for Flow APIs |
updated_at | string | Time Stamp. |
customer_encryption_key_arn | string | A KMS key ARN |
validations | array | List of flow validations |
version | string | Draft Version. |
tags | object | A map of tag keys and values |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | Arn representation of the Flow |
region | string | AWS region. |
For more information, see AWS::Bedrock::Flow.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | flows | INSERT | ExecutionRoleArn, Name, region |
delete_resource | flows | DELETE | Identifier, region |
update_resource | flows | UPDATE | Identifier, PatchDocument, region |
list_resources | flows_list_only | SELECT | region |
get_resource | flows | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all flows in a region.
SELECT
region,
arn
FROM awscc.bedrock.flows_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new flow resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ 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
;
/*+ create */
INSERT INTO awscc.bedrock.flows (
Definition,
DefinitionString,
DefinitionS3Location,
DefinitionSubstitutions,
Description,
ExecutionRoleArn,
Name,
CustomerEncryptionKeyArn,
Tags,
TestAliasTags,
region
)
SELECT
'{{ definition }}',
'{{ definition_string }}',
'{{ definition_s3_location }}',
'{{ definition_substitutions }}',
'{{ description }}',
'{{ execution_role_arn }}',
'{{ name }}',
'{{ customer_encryption_key_arn }}',
'{{ tags }}',
'{{ test_alias_tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: flow
props:
- name: definition
value:
nodes:
- name: '{{ name }}'
type: '{{ type }}'
configuration: null
inputs:
- name: '{{ name }}'
type: '{{ type }}'
expression: '{{ expression }}'
outputs:
- name: '{{ name }}'
type: null
connections:
- type: '{{ type }}'
name: '{{ name }}'
source: '{{ source }}'
target: '{{ target }}'
configuration: null
- name: definition_string
value: '{{ definition_string }}'
- name: definition_s3_location
value:
uri: '{{ uri }}'
- name: definition_substitutions
value: {}
- name: description
value: '{{ description }}'
- name: execution_role_arn
value: '{{ execution_role_arn }}'
- name: name
value: '{{ name }}'
- name: customer_encryption_key_arn
value: '{{ customer_encryption_key_arn }}'
- name: tags
value: {}
- name: test_alias_tags
value: null
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:
| Parameter | Description |
|---|---|
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:
- Create
- Read
- Update
- Delete
- List
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
bedrock:GetFlow,
bedrock:ListTagsForResource,
kms:Decrypt,
bedrock:GetGuardrail
bedrock:UpdateFlow,
bedrock:GetFlow,
bedrock:PrepareFlow,
iam:PassRole,
s3:GetObject,
s3:GetObjectVersion,
bedrock:TagResource,
bedrock:UntagResource,
bedrock:ListTagsForResource,
kms:GenerateDataKey,
kms:Decrypt,
bedrock:UpdateGuardrail,
bedrock:GetGuardrail
bedrock:DeleteFlow,
bedrock:GetFlow,
bedrock:DeleteGuardrail,
bedrock:GetGuardrail
bedrock:ListFlows,
bedrock:ListGuardrails