CfnFlowPropsMixin

class aws_cdk.mixins_preview.aws_bedrock.mixins.CfnFlowPropsMixin(props, *, strategy=None)

Bases: Mixin

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

Mixin:

true

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.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any
# collector: Any
# flow_definition_property_: bedrock_mixins.CfnFlowPropsMixin.FlowDefinitionProperty
# input: Any
# iterator: Any
# loop_input: Any
# output: Any

cfn_flow_props_mixin = bedrock_mixins.CfnFlowPropsMixin(bedrock_mixins.CfnFlowMixinProps(
    customer_encryption_key_arn="customerEncryptionKeyArn",
    definition=bedrock_mixins.CfnFlowPropsMixin.FlowDefinitionProperty(
        connections=[bedrock_mixins.CfnFlowPropsMixin.FlowConnectionProperty(
            configuration=bedrock_mixins.CfnFlowPropsMixin.FlowConnectionConfigurationProperty(
                conditional=bedrock_mixins.CfnFlowPropsMixin.FlowConditionalConnectionConfigurationProperty(
                    condition="condition"
                ),
                data=bedrock_mixins.CfnFlowPropsMixin.FlowDataConnectionConfigurationProperty(
                    source_output="sourceOutput",
                    target_input="targetInput"
                )
            ),
            name="name",
            source="source",
            target="target",
            type="type"
        )],
        nodes=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeProperty(
            configuration=bedrock_mixins.CfnFlowPropsMixin.FlowNodeConfigurationProperty(
                agent=bedrock_mixins.CfnFlowPropsMixin.AgentFlowNodeConfigurationProperty(
                    agent_alias_arn="agentAliasArn"
                ),
                collector=collector,
                condition=bedrock_mixins.CfnFlowPropsMixin.ConditionFlowNodeConfigurationProperty(
                    conditions=[bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
                        expression="expression",
                        name="name"
                    )]
                ),
                inline_code=bedrock_mixins.CfnFlowPropsMixin.InlineCodeFlowNodeConfigurationProperty(
                    code="code",
                    language="language"
                ),
                input=input,
                iterator=iterator,
                knowledge_base=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseFlowNodeConfigurationProperty(
                    guardrail_configuration=bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
                        guardrail_identifier="guardrailIdentifier",
                        guardrail_version="guardrailVersion"
                    ),
                    inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                        text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                            max_tokens=123,
                            stop_sequences=["stopSequences"],
                            temperature=123,
                            top_p=123
                        )
                    ),
                    knowledge_base_id="knowledgeBaseId",
                    model_id="modelId",
                    number_of_results=123,
                    orchestration_configuration=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseOrchestrationConfigurationProperty(
                        additional_model_request_fields=additional_model_request_fields,
                        inference_config=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                            text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                                max_tokens=123,
                                stop_sequences=["stopSequences"],
                                temperature=123,
                                top_p=123
                            )
                        ),
                        performance_config=bedrock_mixins.CfnFlowPropsMixin.PerformanceConfigurationProperty(
                            latency="latency"
                        ),
                        prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
                            text_prompt_template="textPromptTemplate"
                        )
                    ),
                    prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
                        text_prompt_template="textPromptTemplate"
                    ),
                    reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchRerankingConfigurationProperty(
                        bedrock_reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingConfigurationProperty(
                            metadata_configuration=bedrock_mixins.CfnFlowPropsMixin.MetadataConfigurationForRerankingProperty(
                                selection_mode="selectionMode",
                                selective_mode_configuration=bedrock_mixins.CfnFlowPropsMixin.RerankingMetadataSelectiveModeConfigurationProperty(
                                    fields_to_exclude=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                                        field_name="fieldName"
                                    )],
                                    fields_to_include=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                                        field_name="fieldName"
                                    )]
                                )
                            ),
                            model_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingModelConfigurationProperty(
                                additional_model_request_fields=additional_model_request_fields,
                                model_arn="modelArn"
                            ),
                            number_of_reranked_results=123
                        ),
                        type="type"
                    )
                ),
                lambda_function=bedrock_mixins.CfnFlowPropsMixin.LambdaFunctionFlowNodeConfigurationProperty(
                    lambda_arn="lambdaArn"
                ),
                lex=bedrock_mixins.CfnFlowPropsMixin.LexFlowNodeConfigurationProperty(
                    bot_alias_arn="botAliasArn",
                    locale_id="localeId"
                ),
                loop=bedrock_mixins.CfnFlowPropsMixin.LoopFlowNodeConfigurationProperty(
                    definition=flow_definition_property_
                ),
                loop_controller=bedrock_mixins.CfnFlowPropsMixin.LoopControllerFlowNodeConfigurationProperty(
                    continue_condition=bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
                        expression="expression",
                        name="name"
                    ),
                    max_iterations=123
                ),
                loop_input=loop_input,
                output=output,
                prompt=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeConfigurationProperty(
                    guardrail_configuration=bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
                        guardrail_identifier="guardrailIdentifier",
                        guardrail_version="guardrailVersion"
                    ),
                    source_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeSourceConfigurationProperty(
                        inline=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeInlineConfigurationProperty(
                            inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                                text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                                    max_tokens=123,
                                    stop_sequences=["stopSequences"],
                                    temperature=123,
                                    top_p=123
                                )
                            ),
                            model_id="modelId",
                            template_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptTemplateConfigurationProperty(
                                text=bedrock_mixins.CfnFlowPropsMixin.TextPromptTemplateConfigurationProperty(
                                    input_variables=[bedrock_mixins.CfnFlowPropsMixin.PromptInputVariableProperty(
                                        name="name"
                                    )],
                                    text="text"
                                )
                            ),
                            template_type="templateType"
                        ),
                        resource=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeResourceConfigurationProperty(
                            prompt_arn="promptArn"
                        )
                    )
                ),
                retrieval=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeConfigurationProperty(
                    service_configuration=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeServiceConfigurationProperty(
                        s3=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeS3ConfigurationProperty(
                            bucket_name="bucketName"
                        )
                    )
                ),
                storage=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeConfigurationProperty(
                    service_configuration=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeServiceConfigurationProperty(
                        s3=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeS3ConfigurationProperty(
                            bucket_name="bucketName"
                        )
                    )
                )
            ),
            inputs=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeInputProperty(
                category="category",
                expression="expression",
                name="name",
                type="type"
            )],
            name="name",
            outputs=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeOutputProperty(
                name="name",
                type="type"
            )],
            type="type"
        )]
    ),
    definition_s3_location=bedrock_mixins.CfnFlowPropsMixin.S3LocationProperty(
        bucket="bucket",
        key="key",
        version="version"
    ),
    definition_string="definitionString",
    definition_substitutions={
        "definition_substitutions_key": "definitionSubstitutions"
    },
    description="description",
    execution_role_arn="executionRoleArn",
    name="name",
    tags={
        "tags_key": "tags"
    },
    test_alias_tags={
        "test_alias_tags_key": "testAliasTags"
    }
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Bedrock::Flow.

Parameters:
  • props (Union[CfnFlowMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['customerEncryptionKeyArn', 'definition', 'definitionS3Location', 'definitionString', 'definitionSubstitutions', 'description', 'executionRoleArn', 'name', 'tags', 'testAliasTags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

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

Stability:

experimental

AgentFlowNodeConfigurationProperty

class CfnFlowPropsMixin.AgentFlowNodeConfigurationProperty(*, agent_alias_arn=None)

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 a flow in the Amazon Bedrock User Guide.

Parameters:

agent_alias_arn (Optional[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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

agent_flow_node_configuration_property = bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.ConditionFlowNodeConfigurationProperty(*, conditions=None)

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 a flow in the Amazon Bedrock User Guide.

Parameters:

conditions (Union[IResolvable, Sequence[Union[IResolvable, FlowConditionProperty, Dict[str, Any]]], None]) – 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

condition_flow_node_configuration_property = bedrock_mixins.CfnFlowPropsMixin.ConditionFlowNodeConfigurationProperty(
    conditions=[bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
        expression="expression",
        name="name"
    )]
)

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

FieldForRerankingProperty

class CfnFlowPropsMixin.FieldForRerankingProperty(*, field_name=None)

Bases: object

Specifies a field to be used during the reranking process in a Knowledge Base vector search.

This structure identifies metadata fields that should be considered when reordering search results to improve relevance.

Parameters:

field_name (Optional[str]) – The name of the metadata field to be used during the reranking process.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-fieldforreranking.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

field_for_reranking_property = bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
    field_name="fieldName"
)

Attributes

field_name

The name of the metadata field to be used during the reranking process.

See:

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

FlowConditionProperty

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

Bases: object

Defines a condition in the condition node.

Parameters:
  • 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 .

  • name (Optional[str]) – A name for the condition that you can reference.

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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

flow_condition_property = bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
    expression="expression",
    name="name"
)

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 CfnFlowPropsMixin.FlowConditionalConnectionConfigurationProperty(*, condition=None)

Bases: object

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

Parameters:

condition (Optional[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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

flow_conditional_connection_configuration_property = bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

flow_connection_configuration_property = bedrock_mixins.CfnFlowPropsMixin.FlowConnectionConfigurationProperty(
    conditional=bedrock_mixins.CfnFlowPropsMixin.FlowConditionalConnectionConfigurationProperty(
        condition="condition"
    ),
    data=bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.FlowConnectionProperty(*, configuration=None, name=None, source=None, target=None, type=None)

Bases: object

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

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

  • name (Optional[str]) – A name for the connection that you can reference.

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

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

  • type (Optional[str]) – 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

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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

flow_connection_property = bedrock_mixins.CfnFlowPropsMixin.FlowConnectionProperty(
    configuration=bedrock_mixins.CfnFlowPropsMixin.FlowConnectionConfigurationProperty(
        conditional=bedrock_mixins.CfnFlowPropsMixin.FlowConditionalConnectionConfigurationProperty(
            condition="condition"
        ),
        data=bedrock_mixins.CfnFlowPropsMixin.FlowDataConnectionConfigurationProperty(
            source_output="sourceOutput",
            target_input="targetInput"
        )
    ),
    name="name",
    source="source",
    target="target",
    type="type"
)

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 CfnFlowPropsMixin.FlowDataConnectionConfigurationProperty(*, source_output=None, target_input=None)

Bases: object

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

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

  • target_input (Optional[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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

flow_data_connection_configuration_property = bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any
# collector: Any
# flow_definition_property_: bedrock_mixins.CfnFlowPropsMixin.FlowDefinitionProperty
# input: Any
# iterator: Any
# loop_input: Any
# output: Any

flow_definition_property = bedrock_mixins.CfnFlowPropsMixin.FlowDefinitionProperty(
    connections=[bedrock_mixins.CfnFlowPropsMixin.FlowConnectionProperty(
        configuration=bedrock_mixins.CfnFlowPropsMixin.FlowConnectionConfigurationProperty(
            conditional=bedrock_mixins.CfnFlowPropsMixin.FlowConditionalConnectionConfigurationProperty(
                condition="condition"
            ),
            data=bedrock_mixins.CfnFlowPropsMixin.FlowDataConnectionConfigurationProperty(
                source_output="sourceOutput",
                target_input="targetInput"
            )
        ),
        name="name",
        source="source",
        target="target",
        type="type"
    )],
    nodes=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeProperty(
        configuration=bedrock_mixins.CfnFlowPropsMixin.FlowNodeConfigurationProperty(
            agent=bedrock_mixins.CfnFlowPropsMixin.AgentFlowNodeConfigurationProperty(
                agent_alias_arn="agentAliasArn"
            ),
            collector=collector,
            condition=bedrock_mixins.CfnFlowPropsMixin.ConditionFlowNodeConfigurationProperty(
                conditions=[bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
                    expression="expression",
                    name="name"
                )]
            ),
            inline_code=bedrock_mixins.CfnFlowPropsMixin.InlineCodeFlowNodeConfigurationProperty(
                code="code",
                language="language"
            ),
            input=input,
            iterator=iterator,
            knowledge_base=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseFlowNodeConfigurationProperty(
                guardrail_configuration=bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
                    guardrail_identifier="guardrailIdentifier",
                    guardrail_version="guardrailVersion"
                ),
                inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                    text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                        max_tokens=123,
                        stop_sequences=["stopSequences"],
                        temperature=123,
                        top_p=123
                    )
                ),
                knowledge_base_id="knowledgeBaseId",
                model_id="modelId",
                number_of_results=123,
                orchestration_configuration=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseOrchestrationConfigurationProperty(
                    additional_model_request_fields=additional_model_request_fields,
                    inference_config=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                        text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                            max_tokens=123,
                            stop_sequences=["stopSequences"],
                            temperature=123,
                            top_p=123
                        )
                    ),
                    performance_config=bedrock_mixins.CfnFlowPropsMixin.PerformanceConfigurationProperty(
                        latency="latency"
                    ),
                    prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
                        text_prompt_template="textPromptTemplate"
                    )
                ),
                prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
                    text_prompt_template="textPromptTemplate"
                ),
                reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchRerankingConfigurationProperty(
                    bedrock_reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingConfigurationProperty(
                        metadata_configuration=bedrock_mixins.CfnFlowPropsMixin.MetadataConfigurationForRerankingProperty(
                            selection_mode="selectionMode",
                            selective_mode_configuration=bedrock_mixins.CfnFlowPropsMixin.RerankingMetadataSelectiveModeConfigurationProperty(
                                fields_to_exclude=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                                    field_name="fieldName"
                                )],
                                fields_to_include=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                                    field_name="fieldName"
                                )]
                            )
                        ),
                        model_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingModelConfigurationProperty(
                            additional_model_request_fields=additional_model_request_fields,
                            model_arn="modelArn"
                        ),
                        number_of_reranked_results=123
                    ),
                    type="type"
                )
            ),
            lambda_function=bedrock_mixins.CfnFlowPropsMixin.LambdaFunctionFlowNodeConfigurationProperty(
                lambda_arn="lambdaArn"
            ),
            lex=bedrock_mixins.CfnFlowPropsMixin.LexFlowNodeConfigurationProperty(
                bot_alias_arn="botAliasArn",
                locale_id="localeId"
            ),
            loop=bedrock_mixins.CfnFlowPropsMixin.LoopFlowNodeConfigurationProperty(
                definition=flow_definition_property_
            ),
            loop_controller=bedrock_mixins.CfnFlowPropsMixin.LoopControllerFlowNodeConfigurationProperty(
                continue_condition=bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
                    expression="expression",
                    name="name"
                ),
                max_iterations=123
            ),
            loop_input=loop_input,
            output=output,
            prompt=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeConfigurationProperty(
                guardrail_configuration=bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
                    guardrail_identifier="guardrailIdentifier",
                    guardrail_version="guardrailVersion"
                ),
                source_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeSourceConfigurationProperty(
                    inline=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeInlineConfigurationProperty(
                        inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                            text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                                max_tokens=123,
                                stop_sequences=["stopSequences"],
                                temperature=123,
                                top_p=123
                            )
                        ),
                        model_id="modelId",
                        template_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptTemplateConfigurationProperty(
                            text=bedrock_mixins.CfnFlowPropsMixin.TextPromptTemplateConfigurationProperty(
                                input_variables=[bedrock_mixins.CfnFlowPropsMixin.PromptInputVariableProperty(
                                    name="name"
                                )],
                                text="text"
                            )
                        ),
                        template_type="templateType"
                    ),
                    resource=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeResourceConfigurationProperty(
                        prompt_arn="promptArn"
                    )
                )
            ),
            retrieval=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeConfigurationProperty(
                service_configuration=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeServiceConfigurationProperty(
                    s3=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeS3ConfigurationProperty(
                        bucket_name="bucketName"
                    )
                )
            ),
            storage=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeConfigurationProperty(
                service_configuration=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeServiceConfigurationProperty(
                    s3=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeS3ConfigurationProperty(
                        bucket_name="bucketName"
                    )
                )
            )
        ),
        inputs=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeInputProperty(
            category="category",
            expression="expression",
            name="name",
            type="type"
        )],
        name="name",
        outputs=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeOutputProperty(
            name="name",
            type="type"
        )],
        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 CfnFlowPropsMixin.FlowNodeConfigurationProperty(*, agent=None, collector=None, condition=None, inline_code=None, input=None, iterator=None, knowledge_base=None, lambda_function=None, lex=None, loop=None, loop_controller=None, loop_input=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 a flow 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.

  • inline_code (Union[IResolvable, InlineCodeFlowNodeConfigurationProperty, Dict[str, Any], None]) – Contains configurations for an inline code node in your flow. Inline code nodes let you write and execute code directly within your flow, enabling data transformations, custom logic, and integrations without needing an external Lambda function.

  • 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.

  • loop (Union[IResolvable, LoopFlowNodeConfigurationProperty, Dict[str, Any], None]) – Contains configurations for a DoWhile loop in your flow.

  • loop_controller (Union[IResolvable, LoopControllerFlowNodeConfigurationProperty, Dict[str, Any], None]) – Contains controller node configurations for a DoWhile loop in your flow.

  • loop_input (Any) – Contains input node configurations for a DoWhile loop in your flow.

  • 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any
# collector: Any
# flow_node_configuration_property_: bedrock_mixins.CfnFlowPropsMixin.FlowNodeConfigurationProperty
# input: Any
# iterator: Any
# loop_input: Any
# output: Any

flow_node_configuration_property = bedrock_mixins.CfnFlowPropsMixin.FlowNodeConfigurationProperty(
    agent=bedrock_mixins.CfnFlowPropsMixin.AgentFlowNodeConfigurationProperty(
        agent_alias_arn="agentAliasArn"
    ),
    collector=collector,
    condition=bedrock_mixins.CfnFlowPropsMixin.ConditionFlowNodeConfigurationProperty(
        conditions=[bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
            expression="expression",
            name="name"
        )]
    ),
    inline_code=bedrock_mixins.CfnFlowPropsMixin.InlineCodeFlowNodeConfigurationProperty(
        code="code",
        language="language"
    ),
    input=input,
    iterator=iterator,
    knowledge_base=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseFlowNodeConfigurationProperty(
        guardrail_configuration=bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
            guardrail_identifier="guardrailIdentifier",
            guardrail_version="guardrailVersion"
        ),
        inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
            text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                max_tokens=123,
                stop_sequences=["stopSequences"],
                temperature=123,
                top_p=123
            )
        ),
        knowledge_base_id="knowledgeBaseId",
        model_id="modelId",
        number_of_results=123,
        orchestration_configuration=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseOrchestrationConfigurationProperty(
            additional_model_request_fields=additional_model_request_fields,
            inference_config=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                    max_tokens=123,
                    stop_sequences=["stopSequences"],
                    temperature=123,
                    top_p=123
                )
            ),
            performance_config=bedrock_mixins.CfnFlowPropsMixin.PerformanceConfigurationProperty(
                latency="latency"
            ),
            prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
                text_prompt_template="textPromptTemplate"
            )
        ),
        prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
            text_prompt_template="textPromptTemplate"
        ),
        reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchRerankingConfigurationProperty(
            bedrock_reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingConfigurationProperty(
                metadata_configuration=bedrock_mixins.CfnFlowPropsMixin.MetadataConfigurationForRerankingProperty(
                    selection_mode="selectionMode",
                    selective_mode_configuration=bedrock_mixins.CfnFlowPropsMixin.RerankingMetadataSelectiveModeConfigurationProperty(
                        fields_to_exclude=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                            field_name="fieldName"
                        )],
                        fields_to_include=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                            field_name="fieldName"
                        )]
                    )
                ),
                model_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingModelConfigurationProperty(
                    additional_model_request_fields=additional_model_request_fields,
                    model_arn="modelArn"
                ),
                number_of_reranked_results=123
            ),
            type="type"
        )
    ),
    lambda_function=bedrock_mixins.CfnFlowPropsMixin.LambdaFunctionFlowNodeConfigurationProperty(
        lambda_arn="lambdaArn"
    ),
    lex=bedrock_mixins.CfnFlowPropsMixin.LexFlowNodeConfigurationProperty(
        bot_alias_arn="botAliasArn",
        locale_id="localeId"
    ),
    loop=bedrock_mixins.CfnFlowPropsMixin.LoopFlowNodeConfigurationProperty(
        definition=bedrock_mixins.CfnFlowPropsMixin.FlowDefinitionProperty(
            connections=[bedrock_mixins.CfnFlowPropsMixin.FlowConnectionProperty(
                configuration=bedrock_mixins.CfnFlowPropsMixin.FlowConnectionConfigurationProperty(
                    conditional=bedrock_mixins.CfnFlowPropsMixin.FlowConditionalConnectionConfigurationProperty(
                        condition="condition"
                    ),
                    data=bedrock_mixins.CfnFlowPropsMixin.FlowDataConnectionConfigurationProperty(
                        source_output="sourceOutput",
                        target_input="targetInput"
                    )
                ),
                name="name",
                source="source",
                target="target",
                type="type"
            )],
            nodes=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeProperty(
                configuration=flow_node_configuration_property_,
                inputs=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeInputProperty(
                    category="category",
                    expression="expression",
                    name="name",
                    type="type"
                )],
                name="name",
                outputs=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeOutputProperty(
                    name="name",
                    type="type"
                )],
                type="type"
            )]
        )
    ),
    loop_controller=bedrock_mixins.CfnFlowPropsMixin.LoopControllerFlowNodeConfigurationProperty(
        continue_condition=bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
            expression="expression",
            name="name"
        ),
        max_iterations=123
    ),
    loop_input=loop_input,
    output=output,
    prompt=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeConfigurationProperty(
        guardrail_configuration=bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
            guardrail_identifier="guardrailIdentifier",
            guardrail_version="guardrailVersion"
        ),
        source_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeSourceConfigurationProperty(
            inline=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeInlineConfigurationProperty(
                inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                    text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                        max_tokens=123,
                        stop_sequences=["stopSequences"],
                        temperature=123,
                        top_p=123
                    )
                ),
                model_id="modelId",
                template_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptTemplateConfigurationProperty(
                    text=bedrock_mixins.CfnFlowPropsMixin.TextPromptTemplateConfigurationProperty(
                        input_variables=[bedrock_mixins.CfnFlowPropsMixin.PromptInputVariableProperty(
                            name="name"
                        )],
                        text="text"
                    )
                ),
                template_type="templateType"
            ),
            resource=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeResourceConfigurationProperty(
                prompt_arn="promptArn"
            )
        )
    ),
    retrieval=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeConfigurationProperty(
        service_configuration=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeServiceConfigurationProperty(
            s3=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeS3ConfigurationProperty(
                bucket_name="bucketName"
            )
        )
    ),
    storage=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeConfigurationProperty(
        service_configuration=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeServiceConfigurationProperty(
            s3=bedrock_mixins.CfnFlowPropsMixin.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

inline_code

Contains configurations for an inline code node in your flow.

Inline code nodes let you write and execute code directly within your flow, enabling data transformations, custom logic, and integrations without needing an external Lambda function.

See:

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

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

loop

Contains configurations for a DoWhile loop in your flow.

See:

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

loop_controller

Contains controller node configurations for a DoWhile loop in your flow.

See:

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

loop_input

Contains input node configurations for a DoWhile loop in your flow.

See:

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

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 CfnFlowPropsMixin.FlowNodeInputProperty(*, category=None, expression=None, name=None, type=None)

Bases: object

Contains configurations for an input in an Amazon Bedrock Flows node.

Parameters:
  • category (Optional[str]) – Specifies how input data flows between iterations in a DoWhile loop. - LoopCondition - Controls whether the loop continues by evaluating condition expressions against the input data. Use this category to define the condition that determines if the loop should continue. - ReturnValueToLoopStart - Defines data to pass back to the start of the loop’s next iteration. Use this category for variables that you want to update for each loop iteration. - ExitLoop - Defines the value that’s available once the loop ends. Use this category to expose loop results to nodes outside the loop.

  • expression (Optional[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 (Optional[str]) – Specifies a name for the input that you can reference.

  • type (Optional[str]) – Specifies 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

flow_node_input_property = bedrock_mixins.CfnFlowPropsMixin.FlowNodeInputProperty(
    category="category",
    expression="expression",
    name="name",
    type="type"
)

Attributes

category

Specifies how input data flows between iterations in a DoWhile loop.

  • LoopCondition - Controls whether the loop continues by evaluating condition expressions against the input data. Use this category to define the condition that determines if the loop should continue.

  • ReturnValueToLoopStart - Defines data to pass back to the start of the loop’s next iteration. Use this category for variables that you want to update for each loop iteration.

  • ExitLoop - Defines the value that’s available once the loop ends. Use this category to expose loop results to nodes outside the loop.

See:

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

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

Specifies 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

Specifies 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 CfnFlowPropsMixin.FlowNodeOutputProperty(*, name=None, type=None)

Bases: object

Contains configurations for an output from a node.

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

  • type (Optional[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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

flow_node_output_property = bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.FlowNodeProperty(*, configuration=None, inputs=None, name=None, outputs=None, type=None)

Bases: object

Contains configurations about a node in the flow.

Parameters:
  • 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.

  • name (Optional[str]) – A name for 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.

  • type (Optional[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.

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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any
# collector: Any
# flow_node_property_: bedrock_mixins.CfnFlowPropsMixin.FlowNodeProperty
# input: Any
# iterator: Any
# loop_input: Any
# output: Any

flow_node_property = bedrock_mixins.CfnFlowPropsMixin.FlowNodeProperty(
    configuration=bedrock_mixins.CfnFlowPropsMixin.FlowNodeConfigurationProperty(
        agent=bedrock_mixins.CfnFlowPropsMixin.AgentFlowNodeConfigurationProperty(
            agent_alias_arn="agentAliasArn"
        ),
        collector=collector,
        condition=bedrock_mixins.CfnFlowPropsMixin.ConditionFlowNodeConfigurationProperty(
            conditions=[bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
                expression="expression",
                name="name"
            )]
        ),
        inline_code=bedrock_mixins.CfnFlowPropsMixin.InlineCodeFlowNodeConfigurationProperty(
            code="code",
            language="language"
        ),
        input=input,
        iterator=iterator,
        knowledge_base=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseFlowNodeConfigurationProperty(
            guardrail_configuration=bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
                guardrail_identifier="guardrailIdentifier",
                guardrail_version="guardrailVersion"
            ),
            inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                    max_tokens=123,
                    stop_sequences=["stopSequences"],
                    temperature=123,
                    top_p=123
                )
            ),
            knowledge_base_id="knowledgeBaseId",
            model_id="modelId",
            number_of_results=123,
            orchestration_configuration=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseOrchestrationConfigurationProperty(
                additional_model_request_fields=additional_model_request_fields,
                inference_config=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                    text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                        max_tokens=123,
                        stop_sequences=["stopSequences"],
                        temperature=123,
                        top_p=123
                    )
                ),
                performance_config=bedrock_mixins.CfnFlowPropsMixin.PerformanceConfigurationProperty(
                    latency="latency"
                ),
                prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
                    text_prompt_template="textPromptTemplate"
                )
            ),
            prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
                text_prompt_template="textPromptTemplate"
            ),
            reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchRerankingConfigurationProperty(
                bedrock_reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingConfigurationProperty(
                    metadata_configuration=bedrock_mixins.CfnFlowPropsMixin.MetadataConfigurationForRerankingProperty(
                        selection_mode="selectionMode",
                        selective_mode_configuration=bedrock_mixins.CfnFlowPropsMixin.RerankingMetadataSelectiveModeConfigurationProperty(
                            fields_to_exclude=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                                field_name="fieldName"
                            )],
                            fields_to_include=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                                field_name="fieldName"
                            )]
                        )
                    ),
                    model_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingModelConfigurationProperty(
                        additional_model_request_fields=additional_model_request_fields,
                        model_arn="modelArn"
                    ),
                    number_of_reranked_results=123
                ),
                type="type"
            )
        ),
        lambda_function=bedrock_mixins.CfnFlowPropsMixin.LambdaFunctionFlowNodeConfigurationProperty(
            lambda_arn="lambdaArn"
        ),
        lex=bedrock_mixins.CfnFlowPropsMixin.LexFlowNodeConfigurationProperty(
            bot_alias_arn="botAliasArn",
            locale_id="localeId"
        ),
        loop=bedrock_mixins.CfnFlowPropsMixin.LoopFlowNodeConfigurationProperty(
            definition=bedrock_mixins.CfnFlowPropsMixin.FlowDefinitionProperty(
                connections=[bedrock_mixins.CfnFlowPropsMixin.FlowConnectionProperty(
                    configuration=bedrock_mixins.CfnFlowPropsMixin.FlowConnectionConfigurationProperty(
                        conditional=bedrock_mixins.CfnFlowPropsMixin.FlowConditionalConnectionConfigurationProperty(
                            condition="condition"
                        ),
                        data=bedrock_mixins.CfnFlowPropsMixin.FlowDataConnectionConfigurationProperty(
                            source_output="sourceOutput",
                            target_input="targetInput"
                        )
                    ),
                    name="name",
                    source="source",
                    target="target",
                    type="type"
                )],
                nodes=[flow_node_property_]
            )
        ),
        loop_controller=bedrock_mixins.CfnFlowPropsMixin.LoopControllerFlowNodeConfigurationProperty(
            continue_condition=bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
                expression="expression",
                name="name"
            ),
            max_iterations=123
        ),
        loop_input=loop_input,
        output=output,
        prompt=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeConfigurationProperty(
            guardrail_configuration=bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
                guardrail_identifier="guardrailIdentifier",
                guardrail_version="guardrailVersion"
            ),
            source_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeSourceConfigurationProperty(
                inline=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeInlineConfigurationProperty(
                    inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                        text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                            max_tokens=123,
                            stop_sequences=["stopSequences"],
                            temperature=123,
                            top_p=123
                        )
                    ),
                    model_id="modelId",
                    template_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptTemplateConfigurationProperty(
                        text=bedrock_mixins.CfnFlowPropsMixin.TextPromptTemplateConfigurationProperty(
                            input_variables=[bedrock_mixins.CfnFlowPropsMixin.PromptInputVariableProperty(
                                name="name"
                            )],
                            text="text"
                        )
                    ),
                    template_type="templateType"
                ),
                resource=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeResourceConfigurationProperty(
                    prompt_arn="promptArn"
                )
            )
        ),
        retrieval=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeConfigurationProperty(
            service_configuration=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeServiceConfigurationProperty(
                s3=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeS3ConfigurationProperty(
                    bucket_name="bucketName"
                )
            )
        ),
        storage=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeConfigurationProperty(
            service_configuration=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeServiceConfigurationProperty(
                s3=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeS3ConfigurationProperty(
                    bucket_name="bucketName"
                )
            )
        )
    ),
    inputs=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeInputProperty(
        category="category",
        expression="expression",
        name="name",
        type="type"
    )],
    name="name",
    outputs=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeOutputProperty(
        name="name",
        type="type"
    )],
    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 CfnFlowPropsMixin.FlowValidationProperty(*, message=None)

Bases: object

Contains information about validation of the flow.

This data type is used in the following API operations:

Parameters:

message (Optional[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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

flow_validation_property = bedrock_mixins.CfnFlowPropsMixin.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

GuardrailConfigurationProperty

class CfnFlowPropsMixin.GuardrailConfigurationProperty(*, guardrail_identifier=None, guardrail_version=None)

Bases: object

Configuration information for a guardrail that you use with the Converse operation.

Parameters:
  • guardrail_identifier (Optional[str]) – The identifier for the guardrail.

  • guardrail_version (Optional[str]) – The version of the guardrail.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-guardrailconfiguration.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

guardrail_configuration_property = bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
    guardrail_identifier="guardrailIdentifier",
    guardrail_version="guardrailVersion"
)

Attributes

guardrail_identifier

The identifier for the guardrail.

See:

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

guardrail_version

The version of the guardrail.

See:

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

InlineCodeFlowNodeConfigurationProperty

class CfnFlowPropsMixin.InlineCodeFlowNodeConfigurationProperty(*, code=None, language=None)

Bases: object

Contains configurations for an inline code node in your flow.

Inline code nodes let you write and execute code directly within your flow, enabling data transformations, custom logic, and integrations without needing an external Lambda function.

Parameters:
  • code (Optional[str]) – The code that’s executed in your inline code node. The code can access input data from previous nodes in the flow, perform operations on that data, and produce output that can be used by other nodes in your flow. The code must be valid in the programming language that you specify.

  • language (Optional[str]) – The programming language used by your inline code node. The code must be valid in the programming language that you specify. Currently, only Python 3 ( Python_3 ) is supported.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-inlinecodeflownodeconfiguration.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

inline_code_flow_node_configuration_property = bedrock_mixins.CfnFlowPropsMixin.InlineCodeFlowNodeConfigurationProperty(
    code="code",
    language="language"
)

Attributes

code

The code that’s executed in your inline code node.

The code can access input data from previous nodes in the flow, perform operations on that data, and produce output that can be used by other nodes in your flow.

The code must be valid in the programming language that you specify.

See:

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

language

The programming language used by your inline code node.

The code must be valid in the programming language that you specify. Currently, only Python 3 ( Python_3 ) is supported.

See:

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

KnowledgeBaseFlowNodeConfigurationProperty

class CfnFlowPropsMixin.KnowledgeBaseFlowNodeConfigurationProperty(*, guardrail_configuration=None, inference_configuration=None, knowledge_base_id=None, model_id=None, number_of_results=None, orchestration_configuration=None, prompt_template=None, reranking_configuration=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 a flow in the Amazon Bedrock User Guide.

Parameters:
  • guardrail_configuration (Union[IResolvable, GuardrailConfigurationProperty, Dict[str, Any], None]) – Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.

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

  • knowledge_base_id (Optional[str]) – The unique identifier of the knowledge base to query.

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

  • number_of_results (Union[int, float, None]) – The number of results to retrieve from the knowledge base.

  • orchestration_configuration (Union[IResolvable, KnowledgeBaseOrchestrationConfigurationProperty, Dict[str, Any], None]) – The configuration for orchestrating the retrieval and generation process in the knowledge base node.

  • prompt_template (Union[IResolvable, KnowledgeBasePromptTemplateProperty, Dict[str, Any], None]) – A custom prompt template to use with the knowledge base for generating responses.

  • reranking_configuration (Union[IResolvable, VectorSearchRerankingConfigurationProperty, Dict[str, Any], None]) – The configuration for reranking the retrieved results from the knowledge base to improve relevance.

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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any

knowledge_base_flow_node_configuration_property = bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseFlowNodeConfigurationProperty(
    guardrail_configuration=bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
        guardrail_identifier="guardrailIdentifier",
        guardrail_version="guardrailVersion"
    ),
    inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
        text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
            max_tokens=123,
            stop_sequences=["stopSequences"],
            temperature=123,
            top_p=123
        )
    ),
    knowledge_base_id="knowledgeBaseId",
    model_id="modelId",
    number_of_results=123,
    orchestration_configuration=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseOrchestrationConfigurationProperty(
        additional_model_request_fields=additional_model_request_fields,
        inference_config=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
            text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                max_tokens=123,
                stop_sequences=["stopSequences"],
                temperature=123,
                top_p=123
            )
        ),
        performance_config=bedrock_mixins.CfnFlowPropsMixin.PerformanceConfigurationProperty(
            latency="latency"
        ),
        prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
            text_prompt_template="textPromptTemplate"
        )
    ),
    prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
        text_prompt_template="textPromptTemplate"
    ),
    reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchRerankingConfigurationProperty(
        bedrock_reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingConfigurationProperty(
            metadata_configuration=bedrock_mixins.CfnFlowPropsMixin.MetadataConfigurationForRerankingProperty(
                selection_mode="selectionMode",
                selective_mode_configuration=bedrock_mixins.CfnFlowPropsMixin.RerankingMetadataSelectiveModeConfigurationProperty(
                    fields_to_exclude=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                        field_name="fieldName"
                    )],
                    fields_to_include=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                        field_name="fieldName"
                    )]
                )
            ),
            model_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingModelConfigurationProperty(
                additional_model_request_fields=additional_model_request_fields,
                model_arn="modelArn"
            ),
            number_of_reranked_results=123
        ),
        type="type"
    )
)

Attributes

guardrail_configuration

Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.

See:

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

inference_configuration

Contains inference configurations for the prompt.

See:

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

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 or inference profile 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

number_of_results

The number of results to retrieve from the knowledge base.

See:

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

orchestration_configuration

The configuration for orchestrating the retrieval and generation process in the knowledge base node.

See:

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

prompt_template

A custom prompt template to use with the knowledge base for generating responses.

See:

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

reranking_configuration

The configuration for reranking the retrieved results from the knowledge base to improve relevance.

See:

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

KnowledgeBaseOrchestrationConfigurationProperty

class CfnFlowPropsMixin.KnowledgeBaseOrchestrationConfigurationProperty(*, additional_model_request_fields=None, inference_config=None, performance_config=None, prompt_template=None)

Bases: object

Configures how the knowledge base orchestrates the retrieval and generation process, allowing for customization of prompts, inference parameters, and performance settings.

Parameters:
  • additional_model_request_fields (Any) – The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model.

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

  • performance_config (Union[IResolvable, PerformanceConfigurationProperty, Dict[str, Any], None]) – The performance configuration options for the knowledge base retrieval and generation process.

  • prompt_template (Union[IResolvable, KnowledgeBasePromptTemplateProperty, Dict[str, Any], None]) – A custom prompt template for orchestrating the retrieval and generation process.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-knowledgebaseorchestrationconfiguration.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any

knowledge_base_orchestration_configuration_property = bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseOrchestrationConfigurationProperty(
    additional_model_request_fields=additional_model_request_fields,
    inference_config=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
        text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
            max_tokens=123,
            stop_sequences=["stopSequences"],
            temperature=123,
            top_p=123
        )
    ),
    performance_config=bedrock_mixins.CfnFlowPropsMixin.PerformanceConfigurationProperty(
        latency="latency"
    ),
    prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
        text_prompt_template="textPromptTemplate"
    )
)

Attributes

additional_model_request_fields

The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model.

See:

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

inference_config

Contains inference configurations for the prompt.

See:

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

performance_config

The performance configuration options for the knowledge base retrieval and generation process.

See:

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

prompt_template

A custom prompt template for orchestrating the retrieval and generation process.

See:

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

KnowledgeBasePromptTemplateProperty

class CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(*, text_prompt_template=None)

Bases: object

Defines a custom prompt template for orchestrating the retrieval and generation process.

Parameters:

text_prompt_template (Optional[str]) – The text of the prompt template.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-knowledgebaseprompttemplate.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

knowledge_base_prompt_template_property = bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
    text_prompt_template="textPromptTemplate"
)

Attributes

text_prompt_template

The text of the prompt template.

See:

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

LambdaFunctionFlowNodeConfigurationProperty

class CfnFlowPropsMixin.LambdaFunctionFlowNodeConfigurationProperty(*, lambda_arn=None)

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 a flow in the Amazon Bedrock User Guide.

Parameters:

lambda_arn (Optional[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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

lambda_function_flow_node_configuration_property = bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.LexFlowNodeConfigurationProperty(*, bot_alias_arn=None, locale_id=None)

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 a flow in the Amazon Bedrock User Guide.

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

  • locale_id (Optional[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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

lex_flow_node_configuration_property = bedrock_mixins.CfnFlowPropsMixin.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

LoopControllerFlowNodeConfigurationProperty

class CfnFlowPropsMixin.LoopControllerFlowNodeConfigurationProperty(*, continue_condition=None, max_iterations=None)

Bases: object

Contains configurations for the controller node of a DoWhile loop in the flow.

Parameters:
  • continue_condition (Union[IResolvable, FlowConditionProperty, Dict[str, Any], None]) – Specifies the condition that determines when the flow exits the DoWhile loop. The loop executes until this condition evaluates to true.

  • max_iterations (Union[int, float, None]) – Specifies the maximum number of times the DoWhile loop can iterate before the flow exits the loop. Default: - 10

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-loopcontrollerflownodeconfiguration.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

loop_controller_flow_node_configuration_property = bedrock_mixins.CfnFlowPropsMixin.LoopControllerFlowNodeConfigurationProperty(
    continue_condition=bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
        expression="expression",
        name="name"
    ),
    max_iterations=123
)

Attributes

continue_condition

Specifies the condition that determines when the flow exits the DoWhile loop.

The loop executes until this condition evaluates to true.

See:

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

max_iterations

Specifies the maximum number of times the DoWhile loop can iterate before the flow exits the loop.

Default:
  • 10

See:

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

LoopFlowNodeConfigurationProperty

class CfnFlowPropsMixin.LoopFlowNodeConfigurationProperty(*, definition=None)

Bases: object

Contains configurations for the nodes of a DoWhile loop in your flow.

A DoWhile loop is made up of the following nodes:

  • Loop - The container node that holds the loop’s flow definition. This node encompasses the entire loop structure.

  • LoopInput - The entry point node for the loop. This node receives inputs from nodes outside the loop and from previous loop iterations.

  • Body nodes - The processing nodes that execute within each loop iteration. These can be nodes for handling data in your flow, such as a prompt or Lambda function nodes. Some node types aren’t supported inside a DoWhile loop body. For more information, see LoopIncompatibleNodeTypeFlowValidationDetails .

  • LoopController - The node that evaluates whether the loop should continue or exit based on a condition.

These nodes work together to create a loop that runs at least once and continues until a specified condition is met or a maximum number of iterations is reached.

Parameters:

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-loopflownodeconfiguration.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any
# collector: Any
# input: Any
# iterator: Any
# loop_flow_node_configuration_property_: bedrock_mixins.CfnFlowPropsMixin.LoopFlowNodeConfigurationProperty
# loop_input: Any
# output: Any

loop_flow_node_configuration_property = bedrock_mixins.CfnFlowPropsMixin.LoopFlowNodeConfigurationProperty(
    definition=bedrock_mixins.CfnFlowPropsMixin.FlowDefinitionProperty(
        connections=[bedrock_mixins.CfnFlowPropsMixin.FlowConnectionProperty(
            configuration=bedrock_mixins.CfnFlowPropsMixin.FlowConnectionConfigurationProperty(
                conditional=bedrock_mixins.CfnFlowPropsMixin.FlowConditionalConnectionConfigurationProperty(
                    condition="condition"
                ),
                data=bedrock_mixins.CfnFlowPropsMixin.FlowDataConnectionConfigurationProperty(
                    source_output="sourceOutput",
                    target_input="targetInput"
                )
            ),
            name="name",
            source="source",
            target="target",
            type="type"
        )],
        nodes=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeProperty(
            configuration=bedrock_mixins.CfnFlowPropsMixin.FlowNodeConfigurationProperty(
                agent=bedrock_mixins.CfnFlowPropsMixin.AgentFlowNodeConfigurationProperty(
                    agent_alias_arn="agentAliasArn"
                ),
                collector=collector,
                condition=bedrock_mixins.CfnFlowPropsMixin.ConditionFlowNodeConfigurationProperty(
                    conditions=[bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
                        expression="expression",
                        name="name"
                    )]
                ),
                inline_code=bedrock_mixins.CfnFlowPropsMixin.InlineCodeFlowNodeConfigurationProperty(
                    code="code",
                    language="language"
                ),
                input=input,
                iterator=iterator,
                knowledge_base=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseFlowNodeConfigurationProperty(
                    guardrail_configuration=bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
                        guardrail_identifier="guardrailIdentifier",
                        guardrail_version="guardrailVersion"
                    ),
                    inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                        text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                            max_tokens=123,
                            stop_sequences=["stopSequences"],
                            temperature=123,
                            top_p=123
                        )
                    ),
                    knowledge_base_id="knowledgeBaseId",
                    model_id="modelId",
                    number_of_results=123,
                    orchestration_configuration=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBaseOrchestrationConfigurationProperty(
                        additional_model_request_fields=additional_model_request_fields,
                        inference_config=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                            text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                                max_tokens=123,
                                stop_sequences=["stopSequences"],
                                temperature=123,
                                top_p=123
                            )
                        ),
                        performance_config=bedrock_mixins.CfnFlowPropsMixin.PerformanceConfigurationProperty(
                            latency="latency"
                        ),
                        prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
                            text_prompt_template="textPromptTemplate"
                        )
                    ),
                    prompt_template=bedrock_mixins.CfnFlowPropsMixin.KnowledgeBasePromptTemplateProperty(
                        text_prompt_template="textPromptTemplate"
                    ),
                    reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchRerankingConfigurationProperty(
                        bedrock_reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingConfigurationProperty(
                            metadata_configuration=bedrock_mixins.CfnFlowPropsMixin.MetadataConfigurationForRerankingProperty(
                                selection_mode="selectionMode",
                                selective_mode_configuration=bedrock_mixins.CfnFlowPropsMixin.RerankingMetadataSelectiveModeConfigurationProperty(
                                    fields_to_exclude=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                                        field_name="fieldName"
                                    )],
                                    fields_to_include=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                                        field_name="fieldName"
                                    )]
                                )
                            ),
                            model_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingModelConfigurationProperty(
                                additional_model_request_fields=additional_model_request_fields,
                                model_arn="modelArn"
                            ),
                            number_of_reranked_results=123
                        ),
                        type="type"
                    )
                ),
                lambda_function=bedrock_mixins.CfnFlowPropsMixin.LambdaFunctionFlowNodeConfigurationProperty(
                    lambda_arn="lambdaArn"
                ),
                lex=bedrock_mixins.CfnFlowPropsMixin.LexFlowNodeConfigurationProperty(
                    bot_alias_arn="botAliasArn",
                    locale_id="localeId"
                ),
                loop=loop_flow_node_configuration_property_,
                loop_controller=bedrock_mixins.CfnFlowPropsMixin.LoopControllerFlowNodeConfigurationProperty(
                    continue_condition=bedrock_mixins.CfnFlowPropsMixin.FlowConditionProperty(
                        expression="expression",
                        name="name"
                    ),
                    max_iterations=123
                ),
                loop_input=loop_input,
                output=output,
                prompt=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeConfigurationProperty(
                    guardrail_configuration=bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
                        guardrail_identifier="guardrailIdentifier",
                        guardrail_version="guardrailVersion"
                    ),
                    source_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeSourceConfigurationProperty(
                        inline=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeInlineConfigurationProperty(
                            inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                                text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                                    max_tokens=123,
                                    stop_sequences=["stopSequences"],
                                    temperature=123,
                                    top_p=123
                                )
                            ),
                            model_id="modelId",
                            template_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptTemplateConfigurationProperty(
                                text=bedrock_mixins.CfnFlowPropsMixin.TextPromptTemplateConfigurationProperty(
                                    input_variables=[bedrock_mixins.CfnFlowPropsMixin.PromptInputVariableProperty(
                                        name="name"
                                    )],
                                    text="text"
                                )
                            ),
                            template_type="templateType"
                        ),
                        resource=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeResourceConfigurationProperty(
                            prompt_arn="promptArn"
                        )
                    )
                ),
                retrieval=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeConfigurationProperty(
                    service_configuration=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeServiceConfigurationProperty(
                        s3=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeS3ConfigurationProperty(
                            bucket_name="bucketName"
                        )
                    )
                ),
                storage=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeConfigurationProperty(
                    service_configuration=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeServiceConfigurationProperty(
                        s3=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeS3ConfigurationProperty(
                            bucket_name="bucketName"
                        )
                    )
                )
            ),
            inputs=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeInputProperty(
                category="category",
                expression="expression",
                name="name",
                type="type"
            )],
            name="name",
            outputs=[bedrock_mixins.CfnFlowPropsMixin.FlowNodeOutputProperty(
                name="name",
                type="type"
            )],
            type="type"
        )]
    )
)

Attributes

definition

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

See:

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

MetadataConfigurationForRerankingProperty

class CfnFlowPropsMixin.MetadataConfigurationForRerankingProperty(*, selection_mode=None, selective_mode_configuration=None)

Bases: object

Configuration for how metadata should be used during the reranking process in Knowledge Base vector searches.

This determines which metadata fields are included or excluded when reordering search results.

Parameters:
  • selection_mode (Optional[str]) – The mode for selecting which metadata fields to include in the reranking process. Valid values are ALL (use all available metadata fields) or SELECTIVE (use only specified fields).

  • selective_mode_configuration (Union[IResolvable, RerankingMetadataSelectiveModeConfigurationProperty, Dict[str, Any], None]) – Configuration for selective mode, which allows you to explicitly include or exclude specific metadata fields during reranking. This is only used when selectionMode is set to SELECTIVE.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-metadataconfigurationforreranking.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

metadata_configuration_for_reranking_property = bedrock_mixins.CfnFlowPropsMixin.MetadataConfigurationForRerankingProperty(
    selection_mode="selectionMode",
    selective_mode_configuration=bedrock_mixins.CfnFlowPropsMixin.RerankingMetadataSelectiveModeConfigurationProperty(
        fields_to_exclude=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
            field_name="fieldName"
        )],
        fields_to_include=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
            field_name="fieldName"
        )]
    )
)

Attributes

selection_mode

The mode for selecting which metadata fields to include in the reranking process.

Valid values are ALL (use all available metadata fields) or SELECTIVE (use only specified fields).

See:

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

selective_mode_configuration

Configuration for selective mode, which allows you to explicitly include or exclude specific metadata fields during reranking.

This is only used when selectionMode is set to SELECTIVE.

See:

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

PerformanceConfigurationProperty

class CfnFlowPropsMixin.PerformanceConfigurationProperty(*, latency=None)

Bases: object

Performance settings for a model.

Parameters:

latency (Optional[str]) – To use a latency-optimized version of the model, set to optimized .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-performanceconfiguration.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

performance_configuration_property = bedrock_mixins.CfnFlowPropsMixin.PerformanceConfigurationProperty(
    latency="latency"
)

Attributes

latency

To use a latency-optimized version of the model, set to optimized .

See:

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

PromptFlowNodeConfigurationProperty

class CfnFlowPropsMixin.PromptFlowNodeConfigurationProperty(*, guardrail_configuration=None, source_configuration=None)

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 a flow in the Amazon Bedrock User Guide.

Parameters:
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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_flow_node_configuration_property = bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeConfigurationProperty(
    guardrail_configuration=bedrock_mixins.CfnFlowPropsMixin.GuardrailConfigurationProperty(
        guardrail_identifier="guardrailIdentifier",
        guardrail_version="guardrailVersion"
    ),
    source_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeSourceConfigurationProperty(
        inline=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeInlineConfigurationProperty(
            inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
                text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                    max_tokens=123,
                    stop_sequences=["stopSequences"],
                    temperature=123,
                    top_p=123
                )
            ),
            model_id="modelId",
            template_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptTemplateConfigurationProperty(
                text=bedrock_mixins.CfnFlowPropsMixin.TextPromptTemplateConfigurationProperty(
                    input_variables=[bedrock_mixins.CfnFlowPropsMixin.PromptInputVariableProperty(
                        name="name"
                    )],
                    text="text"
                )
            ),
            template_type="templateType"
        ),
        resource=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeResourceConfigurationProperty(
            prompt_arn="promptArn"
        )
    )
)

Attributes

guardrail_configuration

Contains configurations for a guardrail to apply to the prompt in this node and the response generated from it.

See:

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

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 CfnFlowPropsMixin.PromptFlowNodeInlineConfigurationProperty(*, inference_configuration=None, model_id=None, template_configuration=None, template_type=None)

Bases: object

Contains configurations for a prompt defined inline in the node.

Parameters:
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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_flow_node_inline_configuration_property = bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeInlineConfigurationProperty(
    inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
        text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
            max_tokens=123,
            stop_sequences=["stopSequences"],
            temperature=123,
            top_p=123
        )
    ),
    model_id="modelId",
    template_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptTemplateConfigurationProperty(
        text=bedrock_mixins.CfnFlowPropsMixin.TextPromptTemplateConfigurationProperty(
            input_variables=[bedrock_mixins.CfnFlowPropsMixin.PromptInputVariableProperty(
                name="name"
            )],
            text="text"
        )
    ),
    template_type="templateType"
)

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 or inference profile 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 CfnFlowPropsMixin.PromptFlowNodeResourceConfigurationProperty(*, prompt_arn=None)

Bases: object

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

Parameters:

prompt_arn (Optional[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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_flow_node_resource_configuration_property = bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_flow_node_source_configuration_property = bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeSourceConfigurationProperty(
    inline=bedrock_mixins.CfnFlowPropsMixin.PromptFlowNodeInlineConfigurationProperty(
        inference_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
            text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
                max_tokens=123,
                stop_sequences=["stopSequences"],
                temperature=123,
                top_p=123
            )
        ),
        model_id="modelId",
        template_configuration=bedrock_mixins.CfnFlowPropsMixin.PromptTemplateConfigurationProperty(
            text=bedrock_mixins.CfnFlowPropsMixin.TextPromptTemplateConfigurationProperty(
                input_variables=[bedrock_mixins.CfnFlowPropsMixin.PromptInputVariableProperty(
                    name="name"
                )],
                text="text"
            )
        ),
        template_type="templateType"
    ),
    resource=bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.PromptInferenceConfigurationProperty(*, text=None)

Bases: object

Contains inference configurations for the prompt.

Parameters:

text (Union[IResolvable, PromptModelInferenceConfigurationProperty, Dict[str, Any], None]) – 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_inference_configuration_property = bedrock_mixins.CfnFlowPropsMixin.PromptInferenceConfigurationProperty(
    text=bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
        max_tokens=123,
        stop_sequences=["stopSequences"],
        temperature=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 CfnFlowPropsMixin.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_input_variable_property = bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(*, max_tokens=None, stop_sequences=None, temperature=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_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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_model_inference_configuration_property = bedrock_mixins.CfnFlowPropsMixin.PromptModelInferenceConfigurationProperty(
    max_tokens=123,
    stop_sequences=["stopSequences"],
    temperature=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_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 CfnFlowPropsMixin.PromptTemplateConfigurationProperty(*, text=None)

Bases: object

Contains the message for a prompt.

For more information, see Construct and store reusable prompts with Prompt management in Amazon Bedrock .

Parameters:

text (Union[IResolvable, TextPromptTemplateConfigurationProperty, Dict[str, Any], None]) – 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

prompt_template_configuration_property = bedrock_mixins.CfnFlowPropsMixin.PromptTemplateConfigurationProperty(
    text=bedrock_mixins.CfnFlowPropsMixin.TextPromptTemplateConfigurationProperty(
        input_variables=[bedrock_mixins.CfnFlowPropsMixin.PromptInputVariableProperty(
            name="name"
        )],
        text="text"
    )
)

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

RerankingMetadataSelectiveModeConfigurationProperty

class CfnFlowPropsMixin.RerankingMetadataSelectiveModeConfigurationProperty(*, fields_to_exclude=None, fields_to_include=None)

Bases: object

Configuration for selectively including or excluding metadata fields during the reranking process.

This allows you to control which metadata attributes are considered when reordering search results.

Parameters:
  • fields_to_exclude (Union[IResolvable, Sequence[Union[IResolvable, FieldForRerankingProperty, Dict[str, Any]]], None]) – A list of metadata field names to explicitly exclude from the reranking process. All metadata fields except these will be considered when reordering search results. This parameter cannot be used together with fieldsToInclude.

  • fields_to_include (Union[IResolvable, Sequence[Union[IResolvable, FieldForRerankingProperty, Dict[str, Any]]], None]) – A list of metadata field names to explicitly include in the reranking process. Only these fields will be considered when reordering search results. This parameter cannot be used together with fieldsToExclude.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-rerankingmetadataselectivemodeconfiguration.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

reranking_metadata_selective_mode_configuration_property = bedrock_mixins.CfnFlowPropsMixin.RerankingMetadataSelectiveModeConfigurationProperty(
    fields_to_exclude=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
        field_name="fieldName"
    )],
    fields_to_include=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
        field_name="fieldName"
    )]
)

Attributes

fields_to_exclude

A list of metadata field names to explicitly exclude from the reranking process.

All metadata fields except these will be considered when reordering search results. This parameter cannot be used together with fieldsToInclude.

See:

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

fields_to_include

A list of metadata field names to explicitly include in the reranking process.

Only these fields will be considered when reordering search results. This parameter cannot be used together with fieldsToExclude.

See:

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

RetrievalFlowNodeConfigurationProperty

class CfnFlowPropsMixin.RetrievalFlowNodeConfigurationProperty(*, service_configuration=None)

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], None]) – 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

retrieval_flow_node_configuration_property = bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeConfigurationProperty(
    service_configuration=bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeServiceConfigurationProperty(
        s3=bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.RetrievalFlowNodeS3ConfigurationProperty(*, bucket_name=None)

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 (Optional[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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

retrieval_flow_node_s3_configuration_property = bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

retrieval_flow_node_service_configuration_property = bedrock_mixins.CfnFlowPropsMixin.RetrievalFlowNodeServiceConfigurationProperty(
    s3=bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.S3LocationProperty(*, bucket=None, key=None, version=None)

Bases: object

The S3 location of the flow definition.

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

  • key (Optional[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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

s3_location_property = bedrock_mixins.CfnFlowPropsMixin.S3LocationProperty(
    bucket="bucket",
    key="key",
    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 CfnFlowPropsMixin.StorageFlowNodeConfigurationProperty(*, service_configuration=None)

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], None]) – 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

storage_flow_node_configuration_property = bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeConfigurationProperty(
    service_configuration=bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeServiceConfigurationProperty(
        s3=bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.StorageFlowNodeS3ConfigurationProperty(*, bucket_name=None)

Bases: object

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

Parameters:

bucket_name (Optional[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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

storage_flow_node_s3_configuration_property = bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

storage_flow_node_service_configuration_property = bedrock_mixins.CfnFlowPropsMixin.StorageFlowNodeServiceConfigurationProperty(
    s3=bedrock_mixins.CfnFlowPropsMixin.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 CfnFlowPropsMixin.TextPromptTemplateConfigurationProperty(*, input_variables=None, text=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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

text_prompt_template_configuration_property = bedrock_mixins.CfnFlowPropsMixin.TextPromptTemplateConfigurationProperty(
    input_variables=[bedrock_mixins.CfnFlowPropsMixin.PromptInputVariableProperty(
        name="name"
    )],
    text="text"
)

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

VectorSearchBedrockRerankingConfigurationProperty

class CfnFlowPropsMixin.VectorSearchBedrockRerankingConfigurationProperty(*, metadata_configuration=None, model_configuration=None, number_of_reranked_results=None)

Bases: object

Configuration for using Amazon Bedrock foundation models to rerank Knowledge Base vector search results.

This enables more sophisticated relevance ranking using large language models.

Parameters:
  • metadata_configuration (Union[IResolvable, MetadataConfigurationForRerankingProperty, Dict[str, Any], None]) – Configuration for how document metadata should be used during the reranking process. This determines which metadata fields are included when reordering search results.

  • model_configuration (Union[IResolvable, VectorSearchBedrockRerankingModelConfigurationProperty, Dict[str, Any], None]) – Configuration for the Amazon Bedrock foundation model used for reranking. This includes the model ARN and any additional request fields required by the model.

  • number_of_reranked_results (Union[int, float, None]) – The maximum number of results to rerank. This limits how many of the initial vector search results will be processed by the reranking model. A smaller number improves performance but may exclude potentially relevant results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-vectorsearchbedrockrerankingconfiguration.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any

vector_search_bedrock_reranking_configuration_property = bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingConfigurationProperty(
    metadata_configuration=bedrock_mixins.CfnFlowPropsMixin.MetadataConfigurationForRerankingProperty(
        selection_mode="selectionMode",
        selective_mode_configuration=bedrock_mixins.CfnFlowPropsMixin.RerankingMetadataSelectiveModeConfigurationProperty(
            fields_to_exclude=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                field_name="fieldName"
            )],
            fields_to_include=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                field_name="fieldName"
            )]
        )
    ),
    model_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingModelConfigurationProperty(
        additional_model_request_fields=additional_model_request_fields,
        model_arn="modelArn"
    ),
    number_of_reranked_results=123
)

Attributes

metadata_configuration

Configuration for how document metadata should be used during the reranking process.

This determines which metadata fields are included when reordering search results.

See:

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

model_configuration

Configuration for the Amazon Bedrock foundation model used for reranking.

This includes the model ARN and any additional request fields required by the model.

See:

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

number_of_reranked_results

The maximum number of results to rerank.

This limits how many of the initial vector search results will be processed by the reranking model. A smaller number improves performance but may exclude potentially relevant results.

See:

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

VectorSearchBedrockRerankingModelConfigurationProperty

class CfnFlowPropsMixin.VectorSearchBedrockRerankingModelConfigurationProperty(*, additional_model_request_fields=None, model_arn=None)

Bases: object

Configuration for the Amazon Bedrock foundation model used for reranking vector search results.

This specifies which model to use and any additional parameters required by the model.

Parameters:
  • additional_model_request_fields (Any) – A list of additional fields to include in the model request during reranking. These fields provide extra context or configuration options specific to the selected foundation model.

  • model_arn (Optional[str]) – The Amazon Resource Name (ARN) of the foundation model to use for reranking. This model processes the query and search results to determine a more relevant ordering.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-vectorsearchbedrockrerankingmodelconfiguration.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any

vector_search_bedrock_reranking_model_configuration_property = bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingModelConfigurationProperty(
    additional_model_request_fields=additional_model_request_fields,
    model_arn="modelArn"
)

Attributes

additional_model_request_fields

A list of additional fields to include in the model request during reranking.

These fields provide extra context or configuration options specific to the selected foundation model.

See:

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

model_arn

The Amazon Resource Name (ARN) of the foundation model to use for reranking.

This model processes the query and search results to determine a more relevant ordering.

See:

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

VectorSearchRerankingConfigurationProperty

class CfnFlowPropsMixin.VectorSearchRerankingConfigurationProperty(*, bedrock_reranking_configuration=None, type=None)

Bases: object

Configuration for reranking vector search results to improve relevance.

Reranking applies additional relevance models to reorder the initial vector search results based on more sophisticated criteria.

Parameters:
  • bedrock_reranking_configuration (Union[IResolvable, VectorSearchBedrockRerankingConfigurationProperty, Dict[str, Any], None]) – Configuration for using Amazon Bedrock foundation models to rerank search results. This is required when the reranking type is set to BEDROCK.

  • type (Optional[str]) – The type of reranking to apply to vector search results. Currently, the only supported value is BEDROCK, which uses Amazon Bedrock foundation models for reranking.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-vectorsearchrerankingconfiguration.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.mixins_preview.aws_bedrock import mixins as bedrock_mixins

# additional_model_request_fields: Any

vector_search_reranking_configuration_property = bedrock_mixins.CfnFlowPropsMixin.VectorSearchRerankingConfigurationProperty(
    bedrock_reranking_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingConfigurationProperty(
        metadata_configuration=bedrock_mixins.CfnFlowPropsMixin.MetadataConfigurationForRerankingProperty(
            selection_mode="selectionMode",
            selective_mode_configuration=bedrock_mixins.CfnFlowPropsMixin.RerankingMetadataSelectiveModeConfigurationProperty(
                fields_to_exclude=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                    field_name="fieldName"
                )],
                fields_to_include=[bedrock_mixins.CfnFlowPropsMixin.FieldForRerankingProperty(
                    field_name="fieldName"
                )]
            )
        ),
        model_configuration=bedrock_mixins.CfnFlowPropsMixin.VectorSearchBedrockRerankingModelConfigurationProperty(
            additional_model_request_fields=additional_model_request_fields,
            model_arn="modelArn"
        ),
        number_of_reranked_results=123
    ),
    type="type"
)

Attributes

bedrock_reranking_configuration

Configuration for using Amazon Bedrock foundation models to rerank search results.

This is required when the reranking type is set to BEDROCK.

See:

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

type

The type of reranking to apply to vector search results.

Currently, the only supported value is BEDROCK, which uses Amazon Bedrock foundation models for reranking.

See:

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