CfnFlow

class aws_cdk.aws_bedrock.CfnFlow(scope, id, *, execution_role_arn, name, customer_encryption_key_arn=None, definition=None, definition_s3_location=None, definition_string=None, definition_substitutions=None, description=None, tags=None, test_alias_tags=None)

Bases: CfnResource

Creates a prompt flow that you can use to send an input through various steps to yield an output.

You define a flow by configuring nodes, each of which corresponds to a step of the flow, and creating connections between the nodes to create paths to different outputs. You can define the flow in one of the following ways:

  • Define a FlowDefinition in the Definition property.

  • Provide the definition in the DefinitionString property as a JSON-formatted string matching the FlowDefinition property.

  • Provide an Amazon S3 location in the DefinitionS3Location property that matches the FlowDefinition .

If you use the DefinitionString or DefinitionS3Location property, you can use the DefinitionSubstitutions property to define key-value pairs to replace at runtime.

For more information, see How it works and Create a prompt flow in Amazon Bedrock in the Amazon Bedrock User Guide.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-flow.html

CloudformationResource:

AWS::Bedrock::Flow

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

# collector: Any
# input: Any
# iterator: Any
# output: Any

cfn_flow = bedrock.CfnFlow(self, "MyCfnFlow",
    execution_role_arn="executionRoleArn",
    name="name",

    # the properties below are optional
    customer_encryption_key_arn="customerEncryptionKeyArn",
    definition=bedrock.CfnFlow.FlowDefinitionProperty(
        connections=[bedrock.CfnFlow.FlowConnectionProperty(
            name="name",
            source="source",
            target="target",
            type="type",

            # the properties below are optional
            configuration=bedrock.CfnFlow.FlowConnectionConfigurationProperty(
                conditional=bedrock.CfnFlow.FlowConditionalConnectionConfigurationProperty(
                    condition="condition"
                ),
                data=bedrock.CfnFlow.FlowDataConnectionConfigurationProperty(
                    source_output="sourceOutput",
                    target_input="targetInput"
                )
            )
        )],
        nodes=[bedrock.CfnFlow.FlowNodeProperty(
            name="name",
            type="type",

            # the properties below are optional
            configuration=bedrock.CfnFlow.FlowNodeConfigurationProperty(
                agent=bedrock.CfnFlow.AgentFlowNodeConfigurationProperty(
                    agent_alias_arn="agentAliasArn"
                ),
                collector=collector,
                condition=bedrock.CfnFlow.ConditionFlowNodeConfigurationProperty(
                    conditions=[bedrock.CfnFlow.FlowConditionProperty(
                        name="name",

                        # the properties below are optional
                        expression="expression"
                    )]
                ),
                input=input,
                iterator=iterator,
                knowledge_base=bedrock.CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty(
                    knowledge_base_id="knowledgeBaseId",

                    # the properties below are optional
                    model_id="modelId"
                ),
                lambda_function=bedrock.CfnFlow.LambdaFunctionFlowNodeConfigurationProperty(
                    lambda_arn="lambdaArn"
                ),
                lex=bedrock.CfnFlow.LexFlowNodeConfigurationProperty(
                    bot_alias_arn="botAliasArn",
                    locale_id="localeId"
                ),
                output=output,
                prompt=bedrock.CfnFlow.PromptFlowNodeConfigurationProperty(
                    source_configuration=bedrock.CfnFlow.PromptFlowNodeSourceConfigurationProperty(
                        inline=bedrock.CfnFlow.PromptFlowNodeInlineConfigurationProperty(
                            model_id="modelId",
                            template_configuration=bedrock.CfnFlow.PromptTemplateConfigurationProperty(
                                text=bedrock.CfnFlow.TextPromptTemplateConfigurationProperty(
                                    text="text",

                                    # the properties below are optional
                                    input_variables=[bedrock.CfnFlow.PromptInputVariableProperty(
                                        name="name"
                                    )]
                                )
                            ),
                            template_type="templateType",

                            # the properties below are optional
                            inference_configuration=bedrock.CfnFlow.PromptInferenceConfigurationProperty(
                                text=bedrock.CfnFlow.PromptModelInferenceConfigurationProperty(
                                    max_tokens=123,
                                    stop_sequences=["stopSequences"],
                                    temperature=123,
                                    top_k=123,
                                    top_p=123
                                )
                            )
                        ),
                        resource=bedrock.CfnFlow.PromptFlowNodeResourceConfigurationProperty(
                            prompt_arn="promptArn"
                        )
                    )
                ),
                retrieval=bedrock.CfnFlow.RetrievalFlowNodeConfigurationProperty(
                    service_configuration=bedrock.CfnFlow.RetrievalFlowNodeServiceConfigurationProperty(
                        s3=bedrock.CfnFlow.RetrievalFlowNodeS3ConfigurationProperty(
                            bucket_name="bucketName"
                        )
                    )
                ),
                storage=bedrock.CfnFlow.StorageFlowNodeConfigurationProperty(
                    service_configuration=bedrock.CfnFlow.StorageFlowNodeServiceConfigurationProperty(
                        s3=bedrock.CfnFlow.StorageFlowNodeS3ConfigurationProperty(
                            bucket_name="bucketName"
                        )
                    )
                )
            ),
            inputs=[bedrock.CfnFlow.FlowNodeInputProperty(
                expression="expression",
                name="name",
                type="type"
            )],
            outputs=[bedrock.CfnFlow.FlowNodeOutputProperty(
                name="name",
                type="type"
            )]
        )]
    ),
    definition_s3_location=bedrock.CfnFlow.S3LocationProperty(
        bucket="bucket",
        key="key",

        # the properties below are optional
        version="version"
    ),
    definition_string="definitionString",
    definition_substitutions={
        "definition_substitutions_key": "definitionSubstitutions"
    },
    description="description",
    tags={
        "tags_key": "tags"
    },
    test_alias_tags={
        "test_alias_tags_key": "testAliasTags"
    }
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • execution_role_arn (str) – The Amazon Resource Name (ARN) of the service role with permissions to create a flow. For more information, see Create a service row for flows in the Amazon Bedrock User Guide.

  • name (str) – The name of the flow.

  • customer_encryption_key_arn (Optional[str]) – The Amazon Resource Name (ARN) of the KMS key that the flow is encrypted with.

  • definition (Union[IResolvable, FlowDefinitionProperty, Dict[str, Any], None]) – The definition of the nodes and connections between the nodes in the flow.

  • definition_s3_location (Union[IResolvable, S3LocationProperty, Dict[str, Any], None]) – The Amazon S3 location of the flow definition.

  • definition_string (Optional[str]) –

    The definition of the flow as a JSON-formatted string. The string must match the format in FlowDefinition .

  • definition_substitutions (Union[IResolvable, Mapping[str, Union[str, int, float, bool, IResolvable]], None]) – A map that specifies the mappings for placeholder variables in the prompt flow definition. This enables the customer to inject values obtained at runtime. Variables can be template parameter names, resource logical IDs, resource attributes, or a variable in a key-value map. Only supported with the DefinitionString and DefinitionS3Location fields. Substitutions must follow the syntax: ${key_name} or ${variable_1,variable_2,...} .

  • description (Optional[str]) – A description of the flow.

  • tags (Optional[Mapping[str, str]]) – Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. - Tag naming limits and requirements - Tagging best practices

  • test_alias_tags (Union[IResolvable, Mapping[str, str], None]) – A map of tag keys and values.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::Bedrock::Flow'
attr_arn

The Amazon Resource Name (ARN) of the flow.

CloudformationAttribute:

Arn

attr_created_at

The time at which the flow was created.

CloudformationAttribute:

CreatedAt

attr_id

The unique identifier of the flow.

CloudformationAttribute:

Id

attr_status

.

  • NotPrepared – The flow has been created or updated, but hasn’t been prepared. If you just created the flow, you can’t test it. If you updated the flow, the DRAFT version won’t contain the latest changes for testing. Send a PrepareFlow request to package the latest changes into the DRAFT version.

  • Preparing – The flow is being prepared so that the DRAFT version contains the latest changes for testing.

  • Prepared – The flow is prepared and the DRAFT version contains the latest changes for testing.

  • Failed – The last API operation that you invoked on the flow failed. Send a GetFlow request and check the error message in the validations field.

CloudformationAttribute:

Status

Type:

The status of the flow. The following statuses are possible

attr_updated_at

The time at which the flow was last updated.

CloudformationAttribute:

UpdatedAt

attr_validations

List of flow validations.

CloudformationAttribute:

Validations

attr_version

The latest version of the flow.

CloudformationAttribute:

Version

cdk_tag_manager

Tag Manager which manages the tags for this resource.

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

customer_encryption_key_arn

The Amazon Resource Name (ARN) of the KMS key that the flow is encrypted with.

definition

The definition of the nodes and connections between the nodes in the flow.

definition_s3_location

The Amazon S3 location of the flow definition.

definition_string

The definition of the flow as a JSON-formatted string.

definition_substitutions

A map that specifies the mappings for placeholder variables in the prompt flow definition.

description

A description of the flow.

execution_role_arn

The Amazon Resource Name (ARN) of the service role with permissions to create a flow.

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

name

The name of the flow.

node

The tree node.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tags

Metadata that you can assign to a resource as key-value pairs.

For more information, see the following resources:.

test_alias_tags

A map of tag keys and values.

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

AgentFlowNodeConfigurationProperty

class CfnFlow.AgentFlowNodeConfigurationProperty(*, agent_alias_arn)

Bases: object

Defines an agent node in your flow.

You specify the agent to invoke at this point in the flow. For more information, see Node types in Amazon Bedrock works in the Amazon Bedrock User Guide.

Parameters:

agent_alias_arn (str) – The Amazon Resource Name (ARN) of the alias of the agent to invoke.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-agentflownodeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

agent_flow_node_configuration_property = bedrock.CfnFlow.AgentFlowNodeConfigurationProperty(
    agent_alias_arn="agentAliasArn"
)

Attributes

agent_alias_arn

The Amazon Resource Name (ARN) of the alias of the agent to invoke.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-agentflownodeconfiguration.html#cfn-bedrock-flow-agentflownodeconfiguration-agentaliasarn

ConditionFlowNodeConfigurationProperty

class CfnFlow.ConditionFlowNodeConfigurationProperty(*, conditions)

Bases: object

Defines a condition node in your flow.

You can specify conditions that determine which node comes next in the flow. For more information, see Node types in Amazon Bedrock works in the Amazon Bedrock User Guide.

Parameters:

conditions (Union[IResolvable, Sequence[Union[IResolvable, FlowConditionProperty, Dict[str, Any]]]]) – An array of conditions. Each member contains the name of a condition and an expression that defines the condition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-conditionflownodeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

condition_flow_node_configuration_property = bedrock.CfnFlow.ConditionFlowNodeConfigurationProperty(
    conditions=[bedrock.CfnFlow.FlowConditionProperty(
        name="name",

        # the properties below are optional
        expression="expression"
    )]
)

Attributes

conditions

An array of conditions.

Each member contains the name of a condition and an expression that defines the condition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-conditionflownodeconfiguration.html#cfn-bedrock-flow-conditionflownodeconfiguration-conditions

FlowConditionProperty

class CfnFlow.FlowConditionProperty(*, name, expression=None)

Bases: object

Defines a condition in the condition node.

Parameters:
  • name (str) – A name for the condition that you can reference.

  • expression (Optional[str]) – Defines the condition. You must refer to at least one of the inputs in the condition. For more information, expand the Condition node section in Node types in prompt flows .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowcondition.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

flow_condition_property = bedrock.CfnFlow.FlowConditionProperty(
    name="name",

    # the properties below are optional
    expression="expression"
)

Attributes

expression

Defines the condition.

You must refer to at least one of the inputs in the condition. For more information, expand the Condition node section in Node types in prompt flows .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowcondition.html#cfn-bedrock-flow-flowcondition-expression

name

A name for the condition that you can reference.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowcondition.html#cfn-bedrock-flow-flowcondition-name

FlowConditionalConnectionConfigurationProperty

class CfnFlow.FlowConditionalConnectionConfigurationProperty(*, condition)

Bases: object

The configuration of a connection between a condition node and another node.

Parameters:

condition (str) – The condition that triggers this connection. For more information about how to write conditions, see the Condition node type in the Node types topic in the Amazon Bedrock User Guide.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowconditionalconnectionconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

flow_conditional_connection_configuration_property = bedrock.CfnFlow.FlowConditionalConnectionConfigurationProperty(
    condition="condition"
)

Attributes

condition

The condition that triggers this connection.

For more information about how to write conditions, see the Condition node type in the Node types topic in the Amazon Bedrock User Guide.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowconditionalconnectionconfiguration.html#cfn-bedrock-flow-flowconditionalconnectionconfiguration-condition

FlowConnectionConfigurationProperty

class CfnFlow.FlowConnectionConfigurationProperty(*, conditional=None, data=None)

Bases: object

The configuration of the connection.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowconnectionconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

flow_connection_configuration_property = bedrock.CfnFlow.FlowConnectionConfigurationProperty(
    conditional=bedrock.CfnFlow.FlowConditionalConnectionConfigurationProperty(
        condition="condition"
    ),
    data=bedrock.CfnFlow.FlowDataConnectionConfigurationProperty(
        source_output="sourceOutput",
        target_input="targetInput"
    )
)

Attributes

conditional

The configuration of a connection originating from a Condition node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowconnectionconfiguration.html#cfn-bedrock-flow-flowconnectionconfiguration-conditional

data

The configuration of a connection originating from a node that isn’t a Condition node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowconnectionconfiguration.html#cfn-bedrock-flow-flowconnectionconfiguration-data

FlowConnectionProperty

class CfnFlow.FlowConnectionProperty(*, name, source, target, type, configuration=None)

Bases: object

Contains information about a connection between two nodes in the flow.

Parameters:
  • name (str) – A name for the connection that you can reference.

  • source (str) – The node that the connection starts at.

  • target (str) – The node that the connection ends at.

  • type (str) – Whether the source node that the connection begins from is a condition node ( Conditional ) or not ( Data ).

  • configuration (Union[IResolvable, FlowConnectionConfigurationProperty, Dict[str, Any], None]) – The configuration of the connection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowconnection.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

flow_connection_property = bedrock.CfnFlow.FlowConnectionProperty(
    name="name",
    source="source",
    target="target",
    type="type",

    # the properties below are optional
    configuration=bedrock.CfnFlow.FlowConnectionConfigurationProperty(
        conditional=bedrock.CfnFlow.FlowConditionalConnectionConfigurationProperty(
            condition="condition"
        ),
        data=bedrock.CfnFlow.FlowDataConnectionConfigurationProperty(
            source_output="sourceOutput",
            target_input="targetInput"
        )
    )
)

Attributes

configuration

The configuration of the connection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowconnection.html#cfn-bedrock-flow-flowconnection-configuration

name

A name for the connection that you can reference.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowconnection.html#cfn-bedrock-flow-flowconnection-name

source

The node that the connection starts at.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowconnection.html#cfn-bedrock-flow-flowconnection-source

target

The node that the connection ends at.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowconnection.html#cfn-bedrock-flow-flowconnection-target

type

Whether the source node that the connection begins from is a condition node ( Conditional ) or not ( Data ).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowconnection.html#cfn-bedrock-flow-flowconnection-type

FlowDataConnectionConfigurationProperty

class CfnFlow.FlowDataConnectionConfigurationProperty(*, source_output, target_input)

Bases: object

The configuration of a connection originating from a node that isn’t a Condition node.

Parameters:
  • source_output (str) – The name of the output in the source node that the connection begins from.

  • target_input (str) – The name of the input in the target node that the connection ends at.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowdataconnectionconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

flow_data_connection_configuration_property = bedrock.CfnFlow.FlowDataConnectionConfigurationProperty(
    source_output="sourceOutput",
    target_input="targetInput"
)

Attributes

source_output

The name of the output in the source node that the connection begins from.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowdataconnectionconfiguration.html#cfn-bedrock-flow-flowdataconnectionconfiguration-sourceoutput

target_input

The name of the input in the target node that the connection ends at.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowdataconnectionconfiguration.html#cfn-bedrock-flow-flowdataconnectionconfiguration-targetinput

FlowDefinitionProperty

class CfnFlow.FlowDefinitionProperty(*, connections=None, nodes=None)

Bases: object

The definition of the nodes and connections between nodes in the flow.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowdefinition.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

# collector: Any
# input: Any
# iterator: Any
# output: Any

flow_definition_property = bedrock.CfnFlow.FlowDefinitionProperty(
    connections=[bedrock.CfnFlow.FlowConnectionProperty(
        name="name",
        source="source",
        target="target",
        type="type",

        # the properties below are optional
        configuration=bedrock.CfnFlow.FlowConnectionConfigurationProperty(
            conditional=bedrock.CfnFlow.FlowConditionalConnectionConfigurationProperty(
                condition="condition"
            ),
            data=bedrock.CfnFlow.FlowDataConnectionConfigurationProperty(
                source_output="sourceOutput",
                target_input="targetInput"
            )
        )
    )],
    nodes=[bedrock.CfnFlow.FlowNodeProperty(
        name="name",
        type="type",

        # the properties below are optional
        configuration=bedrock.CfnFlow.FlowNodeConfigurationProperty(
            agent=bedrock.CfnFlow.AgentFlowNodeConfigurationProperty(
                agent_alias_arn="agentAliasArn"
            ),
            collector=collector,
            condition=bedrock.CfnFlow.ConditionFlowNodeConfigurationProperty(
                conditions=[bedrock.CfnFlow.FlowConditionProperty(
                    name="name",

                    # the properties below are optional
                    expression="expression"
                )]
            ),
            input=input,
            iterator=iterator,
            knowledge_base=bedrock.CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty(
                knowledge_base_id="knowledgeBaseId",

                # the properties below are optional
                model_id="modelId"
            ),
            lambda_function=bedrock.CfnFlow.LambdaFunctionFlowNodeConfigurationProperty(
                lambda_arn="lambdaArn"
            ),
            lex=bedrock.CfnFlow.LexFlowNodeConfigurationProperty(
                bot_alias_arn="botAliasArn",
                locale_id="localeId"
            ),
            output=output,
            prompt=bedrock.CfnFlow.PromptFlowNodeConfigurationProperty(
                source_configuration=bedrock.CfnFlow.PromptFlowNodeSourceConfigurationProperty(
                    inline=bedrock.CfnFlow.PromptFlowNodeInlineConfigurationProperty(
                        model_id="modelId",
                        template_configuration=bedrock.CfnFlow.PromptTemplateConfigurationProperty(
                            text=bedrock.CfnFlow.TextPromptTemplateConfigurationProperty(
                                text="text",

                                # the properties below are optional
                                input_variables=[bedrock.CfnFlow.PromptInputVariableProperty(
                                    name="name"
                                )]
                            )
                        ),
                        template_type="templateType",

                        # the properties below are optional
                        inference_configuration=bedrock.CfnFlow.PromptInferenceConfigurationProperty(
                            text=bedrock.CfnFlow.PromptModelInferenceConfigurationProperty(
                                max_tokens=123,
                                stop_sequences=["stopSequences"],
                                temperature=123,
                                top_k=123,
                                top_p=123
                            )
                        )
                    ),
                    resource=bedrock.CfnFlow.PromptFlowNodeResourceConfigurationProperty(
                        prompt_arn="promptArn"
                    )
                )
            ),
            retrieval=bedrock.CfnFlow.RetrievalFlowNodeConfigurationProperty(
                service_configuration=bedrock.CfnFlow.RetrievalFlowNodeServiceConfigurationProperty(
                    s3=bedrock.CfnFlow.RetrievalFlowNodeS3ConfigurationProperty(
                        bucket_name="bucketName"
                    )
                )
            ),
            storage=bedrock.CfnFlow.StorageFlowNodeConfigurationProperty(
                service_configuration=bedrock.CfnFlow.StorageFlowNodeServiceConfigurationProperty(
                    s3=bedrock.CfnFlow.StorageFlowNodeS3ConfigurationProperty(
                        bucket_name="bucketName"
                    )
                )
            )
        ),
        inputs=[bedrock.CfnFlow.FlowNodeInputProperty(
            expression="expression",
            name="name",
            type="type"
        )],
        outputs=[bedrock.CfnFlow.FlowNodeOutputProperty(
            name="name",
            type="type"
        )]
    )]
)

Attributes

connections

An array of connection definitions in the flow.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowdefinition.html#cfn-bedrock-flow-flowdefinition-connections

nodes

An array of node definitions in the flow.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowdefinition.html#cfn-bedrock-flow-flowdefinition-nodes

FlowNodeConfigurationProperty

class CfnFlow.FlowNodeConfigurationProperty(*, agent=None, collector=None, condition=None, input=None, iterator=None, knowledge_base=None, lambda_function=None, lex=None, output=None, prompt=None, retrieval=None, storage=None)

Bases: object

Contains configurations for a node in your flow.

For more information, see Node types in Amazon Bedrock works in the Amazon Bedrock User Guide.

Parameters:
  • agent (Union[IResolvable, AgentFlowNodeConfigurationProperty, Dict[str, Any], None]) – Contains configurations for an agent node in your flow. Invokes an alias of an agent and returns the response.

  • collector (Any) – Contains configurations for a collector node in your flow. Collects an iteration of inputs and consolidates them into an array of outputs.

  • condition (Union[IResolvable, ConditionFlowNodeConfigurationProperty, Dict[str, Any], None]) – Contains configurations for a Condition node in your flow. Defines conditions that lead to different branches of the flow.

  • input (Any) – Contains configurations for an input flow node in your flow. The first node in the flow. inputs can’t be specified for this node.

  • iterator (Any) – Contains configurations for an iterator node in your flow. Takes an input that is an array and iteratively sends each item of the array as an output to the following node. The size of the array is also returned in the output. The output flow node at the end of the flow iteration will return a response for each member of the array. To return only one response, you can include a collector node downstream from the iterator node.

  • knowledge_base (Union[IResolvable, KnowledgeBaseFlowNodeConfigurationProperty, Dict[str, Any], None]) – Contains configurations for a knowledge base node in your flow. Queries a knowledge base and returns the retrieved results or generated response.

  • lambda_function (Union[IResolvable, LambdaFunctionFlowNodeConfigurationProperty, Dict[str, Any], None]) – Contains configurations for a Lambda function node in your flow. Invokes an AWS Lambda function.

  • lex (Union[IResolvable, LexFlowNodeConfigurationProperty, Dict[str, Any], None]) – Contains configurations for a Lex node in your flow. Invokes an Amazon Lex bot to identify the intent of the input and return the intent as the output.

  • output (Any) – Contains configurations for an output flow node in your flow. The last node in the flow. outputs can’t be specified for this node.

  • prompt (Union[IResolvable, PromptFlowNodeConfigurationProperty, Dict[str, Any], None]) – Contains configurations for a prompt node in your flow. Runs a prompt and generates the model response as the output. You can use a prompt from Prompt management or you can configure one in this node.

  • retrieval (Union[IResolvable, RetrievalFlowNodeConfigurationProperty, Dict[str, Any], None]) – Contains configurations for a Retrieval node in your flow. Retrieves data from an Amazon S3 location and returns it as the output.

  • storage (Union[IResolvable, StorageFlowNodeConfigurationProperty, Dict[str, Any], None]) – Contains configurations for a Storage node in your flow. Stores an input in an Amazon S3 location.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

# collector: Any
# input: Any
# iterator: Any
# output: Any

flow_node_configuration_property = bedrock.CfnFlow.FlowNodeConfigurationProperty(
    agent=bedrock.CfnFlow.AgentFlowNodeConfigurationProperty(
        agent_alias_arn="agentAliasArn"
    ),
    collector=collector,
    condition=bedrock.CfnFlow.ConditionFlowNodeConfigurationProperty(
        conditions=[bedrock.CfnFlow.FlowConditionProperty(
            name="name",

            # the properties below are optional
            expression="expression"
        )]
    ),
    input=input,
    iterator=iterator,
    knowledge_base=bedrock.CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty(
        knowledge_base_id="knowledgeBaseId",

        # the properties below are optional
        model_id="modelId"
    ),
    lambda_function=bedrock.CfnFlow.LambdaFunctionFlowNodeConfigurationProperty(
        lambda_arn="lambdaArn"
    ),
    lex=bedrock.CfnFlow.LexFlowNodeConfigurationProperty(
        bot_alias_arn="botAliasArn",
        locale_id="localeId"
    ),
    output=output,
    prompt=bedrock.CfnFlow.PromptFlowNodeConfigurationProperty(
        source_configuration=bedrock.CfnFlow.PromptFlowNodeSourceConfigurationProperty(
            inline=bedrock.CfnFlow.PromptFlowNodeInlineConfigurationProperty(
                model_id="modelId",
                template_configuration=bedrock.CfnFlow.PromptTemplateConfigurationProperty(
                    text=bedrock.CfnFlow.TextPromptTemplateConfigurationProperty(
                        text="text",

                        # the properties below are optional
                        input_variables=[bedrock.CfnFlow.PromptInputVariableProperty(
                            name="name"
                        )]
                    )
                ),
                template_type="templateType",

                # the properties below are optional
                inference_configuration=bedrock.CfnFlow.PromptInferenceConfigurationProperty(
                    text=bedrock.CfnFlow.PromptModelInferenceConfigurationProperty(
                        max_tokens=123,
                        stop_sequences=["stopSequences"],
                        temperature=123,
                        top_k=123,
                        top_p=123
                    )
                )
            ),
            resource=bedrock.CfnFlow.PromptFlowNodeResourceConfigurationProperty(
                prompt_arn="promptArn"
            )
        )
    ),
    retrieval=bedrock.CfnFlow.RetrievalFlowNodeConfigurationProperty(
        service_configuration=bedrock.CfnFlow.RetrievalFlowNodeServiceConfigurationProperty(
            s3=bedrock.CfnFlow.RetrievalFlowNodeS3ConfigurationProperty(
                bucket_name="bucketName"
            )
        )
    ),
    storage=bedrock.CfnFlow.StorageFlowNodeConfigurationProperty(
        service_configuration=bedrock.CfnFlow.StorageFlowNodeServiceConfigurationProperty(
            s3=bedrock.CfnFlow.StorageFlowNodeS3ConfigurationProperty(
                bucket_name="bucketName"
            )
        )
    )
)

Attributes

agent

Contains configurations for an agent node in your flow.

Invokes an alias of an agent and returns the response.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html#cfn-bedrock-flow-flownodeconfiguration-agent

collector

Contains configurations for a collector node in your flow.

Collects an iteration of inputs and consolidates them into an array of outputs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html#cfn-bedrock-flow-flownodeconfiguration-collector

condition

Contains configurations for a Condition node in your flow.

Defines conditions that lead to different branches of the flow.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html#cfn-bedrock-flow-flownodeconfiguration-condition

input

Contains configurations for an input flow node in your flow.

The first node in the flow. inputs can’t be specified for this node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html#cfn-bedrock-flow-flownodeconfiguration-input

iterator

Contains configurations for an iterator node in your flow.

Takes an input that is an array and iteratively sends each item of the array as an output to the following node. The size of the array is also returned in the output.

The output flow node at the end of the flow iteration will return a response for each member of the array. To return only one response, you can include a collector node downstream from the iterator node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html#cfn-bedrock-flow-flownodeconfiguration-iterator

knowledge_base

Contains configurations for a knowledge base node in your flow.

Queries a knowledge base and returns the retrieved results or generated response.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html#cfn-bedrock-flow-flownodeconfiguration-knowledgebase

lambda_function

Contains configurations for a Lambda function node in your flow.

Invokes an AWS Lambda function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html#cfn-bedrock-flow-flownodeconfiguration-lambdafunction

lex

Contains configurations for a Lex node in your flow.

Invokes an Amazon Lex bot to identify the intent of the input and return the intent as the output.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html#cfn-bedrock-flow-flownodeconfiguration-lex

output

Contains configurations for an output flow node in your flow.

The last node in the flow. outputs can’t be specified for this node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html#cfn-bedrock-flow-flownodeconfiguration-output

prompt

Contains configurations for a prompt node in your flow.

Runs a prompt and generates the model response as the output. You can use a prompt from Prompt management or you can configure one in this node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html#cfn-bedrock-flow-flownodeconfiguration-prompt

retrieval

Contains configurations for a Retrieval node in your flow.

Retrieves data from an Amazon S3 location and returns it as the output.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html#cfn-bedrock-flow-flownodeconfiguration-retrieval

storage

Contains configurations for a Storage node in your flow.

Stores an input in an Amazon S3 location.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeconfiguration.html#cfn-bedrock-flow-flownodeconfiguration-storage

FlowNodeInputProperty

class CfnFlow.FlowNodeInputProperty(*, expression, name, type)

Bases: object

Contains configurations for an input to a node.

Parameters:
  • expression (str) – An expression that formats the input for the node. For an explanation of how to create expressions, see Expressions in Prompt flows in Amazon Bedrock .

  • name (str) – A name for the input that you can reference.

  • type (str) – The data type of the input. If the input doesn’t match this type at runtime, a validation error will be thrown.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeinput.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

flow_node_input_property = bedrock.CfnFlow.FlowNodeInputProperty(
    expression="expression",
    name="name",
    type="type"
)

Attributes

expression

An expression that formats the input for the node.

For an explanation of how to create expressions, see Expressions in Prompt flows in Amazon Bedrock .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeinput.html#cfn-bedrock-flow-flownodeinput-expression

name

A name for the input that you can reference.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeinput.html#cfn-bedrock-flow-flownodeinput-name

type

The data type of the input.

If the input doesn’t match this type at runtime, a validation error will be thrown.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeinput.html#cfn-bedrock-flow-flownodeinput-type

FlowNodeOutputProperty

class CfnFlow.FlowNodeOutputProperty(*, name, type)

Bases: object

Contains configurations for an output from a node.

Parameters:
  • name (str) – A name for the output that you can reference.

  • type (str) – The data type of the output. If the output doesn’t match this type at runtime, a validation error will be thrown.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeoutput.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

flow_node_output_property = bedrock.CfnFlow.FlowNodeOutputProperty(
    name="name",
    type="type"
)

Attributes

name

A name for the output that you can reference.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeoutput.html#cfn-bedrock-flow-flownodeoutput-name

type

The data type of the output.

If the output doesn’t match this type at runtime, a validation error will be thrown.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownodeoutput.html#cfn-bedrock-flow-flownodeoutput-type

FlowNodeProperty

class CfnFlow.FlowNodeProperty(*, name, type, configuration=None, inputs=None, outputs=None)

Bases: object

Contains configurations about a node in the flow.

Parameters:
  • name (str) – A name for the node.

  • type (str) – The type of node. This value must match the name of the key that you provide in the configuration you provide in the FlowNodeConfiguration field.

  • configuration (Union[IResolvable, FlowNodeConfigurationProperty, Dict[str, Any], None]) – Contains configurations for the node.

  • inputs (Union[IResolvable, Sequence[Union[IResolvable, FlowNodeInputProperty, Dict[str, Any]]], None]) – An array of objects, each of which contains information about an input into the node.

  • outputs (Union[IResolvable, Sequence[Union[IResolvable, FlowNodeOutputProperty, Dict[str, Any]]], None]) – A list of objects, each of which contains information about an output from the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownode.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

# collector: Any
# input: Any
# iterator: Any
# output: Any

flow_node_property = bedrock.CfnFlow.FlowNodeProperty(
    name="name",
    type="type",

    # the properties below are optional
    configuration=bedrock.CfnFlow.FlowNodeConfigurationProperty(
        agent=bedrock.CfnFlow.AgentFlowNodeConfigurationProperty(
            agent_alias_arn="agentAliasArn"
        ),
        collector=collector,
        condition=bedrock.CfnFlow.ConditionFlowNodeConfigurationProperty(
            conditions=[bedrock.CfnFlow.FlowConditionProperty(
                name="name",

                # the properties below are optional
                expression="expression"
            )]
        ),
        input=input,
        iterator=iterator,
        knowledge_base=bedrock.CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty(
            knowledge_base_id="knowledgeBaseId",

            # the properties below are optional
            model_id="modelId"
        ),
        lambda_function=bedrock.CfnFlow.LambdaFunctionFlowNodeConfigurationProperty(
            lambda_arn="lambdaArn"
        ),
        lex=bedrock.CfnFlow.LexFlowNodeConfigurationProperty(
            bot_alias_arn="botAliasArn",
            locale_id="localeId"
        ),
        output=output,
        prompt=bedrock.CfnFlow.PromptFlowNodeConfigurationProperty(
            source_configuration=bedrock.CfnFlow.PromptFlowNodeSourceConfigurationProperty(
                inline=bedrock.CfnFlow.PromptFlowNodeInlineConfigurationProperty(
                    model_id="modelId",
                    template_configuration=bedrock.CfnFlow.PromptTemplateConfigurationProperty(
                        text=bedrock.CfnFlow.TextPromptTemplateConfigurationProperty(
                            text="text",

                            # the properties below are optional
                            input_variables=[bedrock.CfnFlow.PromptInputVariableProperty(
                                name="name"
                            )]
                        )
                    ),
                    template_type="templateType",

                    # the properties below are optional
                    inference_configuration=bedrock.CfnFlow.PromptInferenceConfigurationProperty(
                        text=bedrock.CfnFlow.PromptModelInferenceConfigurationProperty(
                            max_tokens=123,
                            stop_sequences=["stopSequences"],
                            temperature=123,
                            top_k=123,
                            top_p=123
                        )
                    )
                ),
                resource=bedrock.CfnFlow.PromptFlowNodeResourceConfigurationProperty(
                    prompt_arn="promptArn"
                )
            )
        ),
        retrieval=bedrock.CfnFlow.RetrievalFlowNodeConfigurationProperty(
            service_configuration=bedrock.CfnFlow.RetrievalFlowNodeServiceConfigurationProperty(
                s3=bedrock.CfnFlow.RetrievalFlowNodeS3ConfigurationProperty(
                    bucket_name="bucketName"
                )
            )
        ),
        storage=bedrock.CfnFlow.StorageFlowNodeConfigurationProperty(
            service_configuration=bedrock.CfnFlow.StorageFlowNodeServiceConfigurationProperty(
                s3=bedrock.CfnFlow.StorageFlowNodeS3ConfigurationProperty(
                    bucket_name="bucketName"
                )
            )
        )
    ),
    inputs=[bedrock.CfnFlow.FlowNodeInputProperty(
        expression="expression",
        name="name",
        type="type"
    )],
    outputs=[bedrock.CfnFlow.FlowNodeOutputProperty(
        name="name",
        type="type"
    )]
)

Attributes

configuration

Contains configurations for the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownode.html#cfn-bedrock-flow-flownode-configuration

inputs

An array of objects, each of which contains information about an input into the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownode.html#cfn-bedrock-flow-flownode-inputs

name

A name for the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownode.html#cfn-bedrock-flow-flownode-name

outputs

A list of objects, each of which contains information about an output from the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownode.html#cfn-bedrock-flow-flownode-outputs

type

The type of node.

This value must match the name of the key that you provide in the configuration you provide in the FlowNodeConfiguration field.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flownode.html#cfn-bedrock-flow-flownode-type

FlowValidationProperty

class CfnFlow.FlowValidationProperty(*, message)

Bases: object

Contains information about validation of the flow.

This data type is used in the following API operations:

Parameters:

message (str) – A message describing the validation error.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowvalidation.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

flow_validation_property = bedrock.CfnFlow.FlowValidationProperty(
    message="message"
)

Attributes

message

A message describing the validation error.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowvalidation.html#cfn-bedrock-flow-flowvalidation-message

KnowledgeBaseFlowNodeConfigurationProperty

class CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty(*, knowledge_base_id, model_id=None)

Bases: object

Contains configurations for a knowledge base node in a flow.

This node takes a query as the input and returns, as the output, the retrieved responses directly (as an array) or a response generated based on the retrieved responses. For more information, see Node types in Amazon Bedrock works in the Amazon Bedrock User Guide.

Parameters:
  • knowledge_base_id (str) – The unique identifier of the knowledge base to query.

  • model_id (Optional[str]) – The unique identifier of the model to use to generate a response from the query results. Omit this field if you want to return the retrieved results as an array.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-knowledgebaseflownodeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

knowledge_base_flow_node_configuration_property = bedrock.CfnFlow.KnowledgeBaseFlowNodeConfigurationProperty(
    knowledge_base_id="knowledgeBaseId",

    # the properties below are optional
    model_id="modelId"
)

Attributes

knowledge_base_id

The unique identifier of the knowledge base to query.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-knowledgebaseflownodeconfiguration.html#cfn-bedrock-flow-knowledgebaseflownodeconfiguration-knowledgebaseid

model_id

The unique identifier of the model to use to generate a response from the query results.

Omit this field if you want to return the retrieved results as an array.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-knowledgebaseflownodeconfiguration.html#cfn-bedrock-flow-knowledgebaseflownodeconfiguration-modelid

LambdaFunctionFlowNodeConfigurationProperty

class CfnFlow.LambdaFunctionFlowNodeConfigurationProperty(*, lambda_arn)

Bases: object

Contains configurations for a Lambda function node in the flow.

You specify the Lambda function to invoke and the inputs into the function. The output is the response that is defined in the Lambda function. For more information, see Node types in Amazon Bedrock works in the Amazon Bedrock User Guide.

Parameters:

lambda_arn (str) – The Amazon Resource Name (ARN) of the Lambda function to invoke.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-lambdafunctionflownodeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

lambda_function_flow_node_configuration_property = bedrock.CfnFlow.LambdaFunctionFlowNodeConfigurationProperty(
    lambda_arn="lambdaArn"
)

Attributes

lambda_arn

The Amazon Resource Name (ARN) of the Lambda function to invoke.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-lambdafunctionflownodeconfiguration.html#cfn-bedrock-flow-lambdafunctionflownodeconfiguration-lambdaarn

LexFlowNodeConfigurationProperty

class CfnFlow.LexFlowNodeConfigurationProperty(*, bot_alias_arn, locale_id)

Bases: object

Contains configurations for a Lex node in the flow.

You specify a Amazon Lex bot to invoke. This node takes an utterance as the input and returns as the output the intent identified by the Amazon Lex bot. For more information, see Node types in Amazon Bedrock works in the Amazon Bedrock User Guide.

Parameters:
  • bot_alias_arn (str) – The Amazon Resource Name (ARN) of the Amazon Lex bot alias to invoke.

  • locale_id (str) – The Region to invoke the Amazon Lex bot in.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-lexflownodeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

lex_flow_node_configuration_property = bedrock.CfnFlow.LexFlowNodeConfigurationProperty(
    bot_alias_arn="botAliasArn",
    locale_id="localeId"
)

Attributes

bot_alias_arn

The Amazon Resource Name (ARN) of the Amazon Lex bot alias to invoke.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-lexflownodeconfiguration.html#cfn-bedrock-flow-lexflownodeconfiguration-botaliasarn

locale_id

The Region to invoke the Amazon Lex bot in.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-lexflownodeconfiguration.html#cfn-bedrock-flow-lexflownodeconfiguration-localeid

PromptFlowNodeConfigurationProperty

class CfnFlow.PromptFlowNodeConfigurationProperty(*, source_configuration)

Bases: object

Contains configurations for a prompt node in the flow.

You can use a prompt from Prompt management or you can define one in this node. If the prompt contains variables, the inputs into this node will fill in the variables. The output from this node is the response generated by the model. For more information, see Node types in Amazon Bedrock works in the Amazon Bedrock User Guide.

Parameters:

source_configuration (Union[IResolvable, PromptFlowNodeSourceConfigurationProperty, Dict[str, Any]]) – Specifies whether the prompt is from Prompt management or defined inline.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptflownodeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

prompt_flow_node_configuration_property = bedrock.CfnFlow.PromptFlowNodeConfigurationProperty(
    source_configuration=bedrock.CfnFlow.PromptFlowNodeSourceConfigurationProperty(
        inline=bedrock.CfnFlow.PromptFlowNodeInlineConfigurationProperty(
            model_id="modelId",
            template_configuration=bedrock.CfnFlow.PromptTemplateConfigurationProperty(
                text=bedrock.CfnFlow.TextPromptTemplateConfigurationProperty(
                    text="text",

                    # the properties below are optional
                    input_variables=[bedrock.CfnFlow.PromptInputVariableProperty(
                        name="name"
                    )]
                )
            ),
            template_type="templateType",

            # the properties below are optional
            inference_configuration=bedrock.CfnFlow.PromptInferenceConfigurationProperty(
                text=bedrock.CfnFlow.PromptModelInferenceConfigurationProperty(
                    max_tokens=123,
                    stop_sequences=["stopSequences"],
                    temperature=123,
                    top_k=123,
                    top_p=123
                )
            )
        ),
        resource=bedrock.CfnFlow.PromptFlowNodeResourceConfigurationProperty(
            prompt_arn="promptArn"
        )
    )
)

Attributes

source_configuration

Specifies whether the prompt is from Prompt management or defined inline.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptflownodeconfiguration.html#cfn-bedrock-flow-promptflownodeconfiguration-sourceconfiguration

PromptFlowNodeInlineConfigurationProperty

class CfnFlow.PromptFlowNodeInlineConfigurationProperty(*, model_id, template_configuration, template_type, inference_configuration=None)

Bases: object

Contains configurations for a prompt defined inline in the node.

Parameters:
  • model_id (str) – The unique identifier of the model to run inference with.

  • template_configuration (Union[IResolvable, PromptTemplateConfigurationProperty, Dict[str, Any]]) – Contains a prompt and variables in the prompt that can be replaced with values at runtime.

  • template_type (str) – The type of prompt template.

  • inference_configuration (Union[IResolvable, PromptInferenceConfigurationProperty, Dict[str, Any], None]) – Contains inference configurations for the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptflownodeinlineconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

prompt_flow_node_inline_configuration_property = bedrock.CfnFlow.PromptFlowNodeInlineConfigurationProperty(
    model_id="modelId",
    template_configuration=bedrock.CfnFlow.PromptTemplateConfigurationProperty(
        text=bedrock.CfnFlow.TextPromptTemplateConfigurationProperty(
            text="text",

            # the properties below are optional
            input_variables=[bedrock.CfnFlow.PromptInputVariableProperty(
                name="name"
            )]
        )
    ),
    template_type="templateType",

    # the properties below are optional
    inference_configuration=bedrock.CfnFlow.PromptInferenceConfigurationProperty(
        text=bedrock.CfnFlow.PromptModelInferenceConfigurationProperty(
            max_tokens=123,
            stop_sequences=["stopSequences"],
            temperature=123,
            top_k=123,
            top_p=123
        )
    )
)

Attributes

inference_configuration

Contains inference configurations for the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptflownodeinlineconfiguration.html#cfn-bedrock-flow-promptflownodeinlineconfiguration-inferenceconfiguration

model_id

The unique identifier of the model to run inference with.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptflownodeinlineconfiguration.html#cfn-bedrock-flow-promptflownodeinlineconfiguration-modelid

template_configuration

Contains a prompt and variables in the prompt that can be replaced with values at runtime.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptflownodeinlineconfiguration.html#cfn-bedrock-flow-promptflownodeinlineconfiguration-templateconfiguration

template_type

The type of prompt template.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptflownodeinlineconfiguration.html#cfn-bedrock-flow-promptflownodeinlineconfiguration-templatetype

PromptFlowNodeResourceConfigurationProperty

class CfnFlow.PromptFlowNodeResourceConfigurationProperty(*, prompt_arn)

Bases: object

Contains configurations for a prompt from Prompt management to use in a node.

Parameters:

prompt_arn (str) – The Amazon Resource Name (ARN) of the prompt from Prompt management.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptflownoderesourceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

prompt_flow_node_resource_configuration_property = bedrock.CfnFlow.PromptFlowNodeResourceConfigurationProperty(
    prompt_arn="promptArn"
)

Attributes

prompt_arn

The Amazon Resource Name (ARN) of the prompt from Prompt management.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptflownoderesourceconfiguration.html#cfn-bedrock-flow-promptflownoderesourceconfiguration-promptarn

PromptFlowNodeSourceConfigurationProperty

class CfnFlow.PromptFlowNodeSourceConfigurationProperty(*, inline=None, resource=None)

Bases: object

Contains configurations for a prompt and whether it is from Prompt management or defined inline.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptflownodesourceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

prompt_flow_node_source_configuration_property = bedrock.CfnFlow.PromptFlowNodeSourceConfigurationProperty(
    inline=bedrock.CfnFlow.PromptFlowNodeInlineConfigurationProperty(
        model_id="modelId",
        template_configuration=bedrock.CfnFlow.PromptTemplateConfigurationProperty(
            text=bedrock.CfnFlow.TextPromptTemplateConfigurationProperty(
                text="text",

                # the properties below are optional
                input_variables=[bedrock.CfnFlow.PromptInputVariableProperty(
                    name="name"
                )]
            )
        ),
        template_type="templateType",

        # the properties below are optional
        inference_configuration=bedrock.CfnFlow.PromptInferenceConfigurationProperty(
            text=bedrock.CfnFlow.PromptModelInferenceConfigurationProperty(
                max_tokens=123,
                stop_sequences=["stopSequences"],
                temperature=123,
                top_k=123,
                top_p=123
            )
        )
    ),
    resource=bedrock.CfnFlow.PromptFlowNodeResourceConfigurationProperty(
        prompt_arn="promptArn"
    )
)

Attributes

inline

Contains configurations for a prompt that is defined inline.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptflownodesourceconfiguration.html#cfn-bedrock-flow-promptflownodesourceconfiguration-inline

resource

Contains configurations for a prompt from Prompt management.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptflownodesourceconfiguration.html#cfn-bedrock-flow-promptflownodesourceconfiguration-resource

PromptInferenceConfigurationProperty

class CfnFlow.PromptInferenceConfigurationProperty(*, text)

Bases: object

Contains inference configurations for the prompt.

Parameters:

text (Union[IResolvable, PromptModelInferenceConfigurationProperty, Dict[str, Any]]) – Contains inference configurations for a text prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptinferenceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

prompt_inference_configuration_property = bedrock.CfnFlow.PromptInferenceConfigurationProperty(
    text=bedrock.CfnFlow.PromptModelInferenceConfigurationProperty(
        max_tokens=123,
        stop_sequences=["stopSequences"],
        temperature=123,
        top_k=123,
        top_p=123
    )
)

Attributes

text

Contains inference configurations for a text prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptinferenceconfiguration.html#cfn-bedrock-flow-promptinferenceconfiguration-text

PromptInputVariableProperty

class CfnFlow.PromptInputVariableProperty(*, name=None)

Bases: object

Contains information about a variable in the prompt.

Parameters:

name (Optional[str]) – The name of the variable.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptinputvariable.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

prompt_input_variable_property = bedrock.CfnFlow.PromptInputVariableProperty(
    name="name"
)

Attributes

name

The name of the variable.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptinputvariable.html#cfn-bedrock-flow-promptinputvariable-name

PromptModelInferenceConfigurationProperty

class CfnFlow.PromptModelInferenceConfigurationProperty(*, max_tokens=None, stop_sequences=None, temperature=None, top_k=None, top_p=None)

Bases: object

Contains inference configurations related to model inference for a prompt.

For more information, see Inference parameters .

Parameters:
  • max_tokens (Union[int, float, None]) – The maximum number of tokens to return in the response.

  • stop_sequences (Optional[Sequence[str]]) – A list of strings that define sequences after which the model will stop generating.

  • temperature (Union[int, float, None]) – Controls the randomness of the response. Choose a lower value for more predictable outputs and a higher value for more surprising outputs.

  • top_k (Union[int, float, None]) – The number of most-likely candidates that the model considers for the next token during generation.

  • top_p (Union[int, float, None]) – The percentage of most-likely candidates that the model considers for the next token.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptmodelinferenceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

prompt_model_inference_configuration_property = bedrock.CfnFlow.PromptModelInferenceConfigurationProperty(
    max_tokens=123,
    stop_sequences=["stopSequences"],
    temperature=123,
    top_k=123,
    top_p=123
)

Attributes

max_tokens

The maximum number of tokens to return in the response.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptmodelinferenceconfiguration.html#cfn-bedrock-flow-promptmodelinferenceconfiguration-maxtokens

stop_sequences

A list of strings that define sequences after which the model will stop generating.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptmodelinferenceconfiguration.html#cfn-bedrock-flow-promptmodelinferenceconfiguration-stopsequences

temperature

Controls the randomness of the response.

Choose a lower value for more predictable outputs and a higher value for more surprising outputs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptmodelinferenceconfiguration.html#cfn-bedrock-flow-promptmodelinferenceconfiguration-temperature

top_k

The number of most-likely candidates that the model considers for the next token during generation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptmodelinferenceconfiguration.html#cfn-bedrock-flow-promptmodelinferenceconfiguration-topk

top_p

The percentage of most-likely candidates that the model considers for the next token.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-promptmodelinferenceconfiguration.html#cfn-bedrock-flow-promptmodelinferenceconfiguration-topp

PromptTemplateConfigurationProperty

class CfnFlow.PromptTemplateConfigurationProperty(*, text)

Bases: object

Contains the message for a prompt.

For more information, see Prompt management in Amazon Bedrock .

Parameters:

text (Union[IResolvable, TextPromptTemplateConfigurationProperty, Dict[str, Any]]) – Contains configurations for the text in a message for a prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-prompttemplateconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

prompt_template_configuration_property = bedrock.CfnFlow.PromptTemplateConfigurationProperty(
    text=bedrock.CfnFlow.TextPromptTemplateConfigurationProperty(
        text="text",

        # the properties below are optional
        input_variables=[bedrock.CfnFlow.PromptInputVariableProperty(
            name="name"
        )]
    )
)

Attributes

text

Contains configurations for the text in a message for a prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-prompttemplateconfiguration.html#cfn-bedrock-flow-prompttemplateconfiguration-text

RetrievalFlowNodeConfigurationProperty

class CfnFlow.RetrievalFlowNodeConfigurationProperty(*, service_configuration)

Bases: object

Contains configurations for a Retrieval node in a flow.

This node retrieves data from the Amazon S3 location that you specify and returns it as the output.

Parameters:

service_configuration (Union[IResolvable, RetrievalFlowNodeServiceConfigurationProperty, Dict[str, Any]]) – Contains configurations for the service to use for retrieving data to return as the output from the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-retrievalflownodeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

retrieval_flow_node_configuration_property = bedrock.CfnFlow.RetrievalFlowNodeConfigurationProperty(
    service_configuration=bedrock.CfnFlow.RetrievalFlowNodeServiceConfigurationProperty(
        s3=bedrock.CfnFlow.RetrievalFlowNodeS3ConfigurationProperty(
            bucket_name="bucketName"
        )
    )
)

Attributes

service_configuration

Contains configurations for the service to use for retrieving data to return as the output from the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-retrievalflownodeconfiguration.html#cfn-bedrock-flow-retrievalflownodeconfiguration-serviceconfiguration

RetrievalFlowNodeS3ConfigurationProperty

class CfnFlow.RetrievalFlowNodeS3ConfigurationProperty(*, bucket_name)

Bases: object

Contains configurations for the Amazon S3 location from which to retrieve data to return as the output from the node.

Parameters:

bucket_name (str) – The name of the Amazon S3 bucket from which to retrieve data.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-retrievalflownodes3configuration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

retrieval_flow_node_s3_configuration_property = bedrock.CfnFlow.RetrievalFlowNodeS3ConfigurationProperty(
    bucket_name="bucketName"
)

Attributes

bucket_name

The name of the Amazon S3 bucket from which to retrieve data.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-retrievalflownodes3configuration.html#cfn-bedrock-flow-retrievalflownodes3configuration-bucketname

RetrievalFlowNodeServiceConfigurationProperty

class CfnFlow.RetrievalFlowNodeServiceConfigurationProperty(*, s3=None)

Bases: object

Contains configurations for the service to use for retrieving data to return as the output from the node.

Parameters:

s3 (Union[IResolvable, RetrievalFlowNodeS3ConfigurationProperty, Dict[str, Any], None]) – Contains configurations for the Amazon S3 location from which to retrieve data to return as the output from the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-retrievalflownodeserviceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

retrieval_flow_node_service_configuration_property = bedrock.CfnFlow.RetrievalFlowNodeServiceConfigurationProperty(
    s3=bedrock.CfnFlow.RetrievalFlowNodeS3ConfigurationProperty(
        bucket_name="bucketName"
    )
)

Attributes

s3

Contains configurations for the Amazon S3 location from which to retrieve data to return as the output from the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-retrievalflownodeserviceconfiguration.html#cfn-bedrock-flow-retrievalflownodeserviceconfiguration-s3

S3LocationProperty

class CfnFlow.S3LocationProperty(*, bucket, key, version=None)

Bases: object

The S3 location of the flow definition.

Parameters:
  • bucket (str) – The S3 bucket containing the flow definition.

  • key (str) – The object key for the S3 location containing the definition.

  • version (Optional[str]) – The Amazon S3 location from which to retrieve data for an S3 retrieve node or to which to store data for an S3 storage node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-s3location.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

s3_location_property = bedrock.CfnFlow.S3LocationProperty(
    bucket="bucket",
    key="key",

    # the properties below are optional
    version="version"
)

Attributes

bucket

The S3 bucket containing the flow definition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-s3location.html#cfn-bedrock-flow-s3location-bucket

key

The object key for the S3 location containing the definition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-s3location.html#cfn-bedrock-flow-s3location-key

version

The Amazon S3 location from which to retrieve data for an S3 retrieve node or to which to store data for an S3 storage node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-s3location.html#cfn-bedrock-flow-s3location-version

StorageFlowNodeConfigurationProperty

class CfnFlow.StorageFlowNodeConfigurationProperty(*, service_configuration)

Bases: object

Contains configurations for a Storage node in a flow.

This node stores the input in an Amazon S3 location that you specify.

Parameters:

service_configuration (Union[IResolvable, StorageFlowNodeServiceConfigurationProperty, Dict[str, Any]]) – Contains configurations for the service to use for storing the input into the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-storageflownodeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

storage_flow_node_configuration_property = bedrock.CfnFlow.StorageFlowNodeConfigurationProperty(
    service_configuration=bedrock.CfnFlow.StorageFlowNodeServiceConfigurationProperty(
        s3=bedrock.CfnFlow.StorageFlowNodeS3ConfigurationProperty(
            bucket_name="bucketName"
        )
    )
)

Attributes

service_configuration

Contains configurations for the service to use for storing the input into the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-storageflownodeconfiguration.html#cfn-bedrock-flow-storageflownodeconfiguration-serviceconfiguration

StorageFlowNodeS3ConfigurationProperty

class CfnFlow.StorageFlowNodeS3ConfigurationProperty(*, bucket_name)

Bases: object

Contains configurations for the Amazon S3 location in which to store the input into the node.

Parameters:

bucket_name (str) – The name of the Amazon S3 bucket in which to store the input into the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-storageflownodes3configuration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

storage_flow_node_s3_configuration_property = bedrock.CfnFlow.StorageFlowNodeS3ConfigurationProperty(
    bucket_name="bucketName"
)

Attributes

bucket_name

The name of the Amazon S3 bucket in which to store the input into the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-storageflownodes3configuration.html#cfn-bedrock-flow-storageflownodes3configuration-bucketname

StorageFlowNodeServiceConfigurationProperty

class CfnFlow.StorageFlowNodeServiceConfigurationProperty(*, s3=None)

Bases: object

Contains configurations for the service to use for storing the input into the node.

Parameters:

s3 (Union[IResolvable, StorageFlowNodeS3ConfigurationProperty, Dict[str, Any], None]) – Contains configurations for the Amazon S3 location in which to store the input into the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-storageflownodeserviceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

storage_flow_node_service_configuration_property = bedrock.CfnFlow.StorageFlowNodeServiceConfigurationProperty(
    s3=bedrock.CfnFlow.StorageFlowNodeS3ConfigurationProperty(
        bucket_name="bucketName"
    )
)

Attributes

s3

Contains configurations for the Amazon S3 location in which to store the input into the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-storageflownodeserviceconfiguration.html#cfn-bedrock-flow-storageflownodeserviceconfiguration-s3

TextPromptTemplateConfigurationProperty

class CfnFlow.TextPromptTemplateConfigurationProperty(*, text, input_variables=None)

Bases: object

Contains configurations for a text prompt template.

To include a variable, enclose a word in double curly braces as in {{variable}} .

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-textprompttemplateconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

text_prompt_template_configuration_property = bedrock.CfnFlow.TextPromptTemplateConfigurationProperty(
    text="text",

    # the properties below are optional
    input_variables=[bedrock.CfnFlow.PromptInputVariableProperty(
        name="name"
    )]
)

Attributes

input_variables

An array of the variables in the prompt template.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-textprompttemplateconfiguration.html#cfn-bedrock-flow-textprompttemplateconfiguration-inputvariables

text

The message for the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-textprompttemplateconfiguration.html#cfn-bedrock-flow-textprompttemplateconfiguration-text