CfnFlowVersion

class aws_cdk.aws_bedrock.CfnFlowVersion(scope, id, *, flow_arn, description=None)

Bases: CfnResource

Creates a version of the flow that you can deploy.

For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

See:

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

CloudformationResource:

AWS::Bedrock::FlowVersion

ExampleMetadata:

fixture=_generated

Example:

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

cfn_flow_version = bedrock.CfnFlowVersion(self, "MyCfnFlowVersion",
    flow_arn="flowArn",

    # the properties below are optional
    description="description"
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

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

  • flow_arn (str) – The Amazon Resource Name (ARN) of the flow that the version belongs to.

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

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

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

Return type:

None

add_dependency(target)

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

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

Parameters:

target (CfnResource)

Return type:

None

add_depends_on(target)

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

Parameters:

target (CfnResource)

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str)

  • value (Any)

See:

Return type:

None

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

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

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

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

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

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

For example:

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

would add the overrides Example:

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

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

Parameters:
  • path (str) –

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

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

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

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

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

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

  • value (Any) – The value.

Return type:

None

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

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

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

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

Parameters:
  • policy (Optional[RemovalPolicy])

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

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

See:

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

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

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

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

  • type_hint (Optional[ResolutionTypeHint])

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str)

See:

Return type:

Any

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

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

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

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

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

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

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

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

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

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

Parameters:

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

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

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

Parameters:

target (CfnResource)

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::Bedrock::FlowVersion'
attr_created_at

The time at the version was created.

CloudformationAttribute:

CreatedAt

attr_customer_encryption_key_arn

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

CloudformationAttribute:

CustomerEncryptionKeyArn

attr_definition

Flow definition.

CloudformationAttribute:

Definition

attr_execution_role_arn

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

For more information, see Create a service row for flows in the Amazon Bedrock User Guide.

CloudformationAttribute:

ExecutionRoleArn

attr_flow_id

The unique identifier of the flow.

CloudformationAttribute:

FlowId

attr_name

The name of the flow.

CloudformationAttribute:

Name

attr_status

The status of the flow.

CloudformationAttribute:

Status

attr_version

The version of the flow.

CloudformationAttribute:

Version

cfn_options

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

cfn_resource_type

AWS resource type.

creation_stack

return:

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

description

The description of the flow version.

flow_arn

The Amazon Resource Name (ARN) of the flow that the version belongs to.

logical_id

The logical ID for this CloudFormation stack element.

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

To override this value, use overrideLogicalId(newLogicalId).

Returns:

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

node

The tree node.

ref

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

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

stack

The stack in which this element is defined.

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

Static Methods

classmethod is_cfn_element(x)

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

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

Parameters:

x (Any)

Return type:

bool

Returns:

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

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any)

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

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

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

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

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

AgentFlowNodeConfigurationProperty

class CfnFlowVersion.AgentFlowNodeConfigurationProperty(*, agent_alias_arn)

Bases: object

Defines an agent node in your flow.

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

Parameters:

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

agent_flow_node_configuration_property = bedrock.CfnFlowVersion.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-flowversion-agentflownodeconfiguration.html#cfn-bedrock-flowversion-agentflownodeconfiguration-agentaliasarn

ConditionFlowNodeConfigurationProperty

class CfnFlowVersion.ConditionFlowNodeConfigurationProperty(*, conditions)

Bases: object

Defines a condition node in your flow.

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

Parameters:

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

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

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

Attributes

conditions

An array of conditions.

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

See:

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

FieldForRerankingProperty

class CfnFlowVersion.FieldForRerankingProperty(*, field_name)

Bases: object

Contains information for a metadata field to include in or exclude from consideration when reranking.

Parameters:

field_name (str) – The name of a metadata field to include in or exclude from consideration when reranking.

See:

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

field_for_reranking_property = bedrock.CfnFlowVersion.FieldForRerankingProperty(
    field_name="fieldName"
)

Attributes

field_name

The name of a metadata field to include in or exclude from consideration when reranking.

See:

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

FlowConditionProperty

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

Bases: object

Defines a condition in the condition node.

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

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

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

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

Attributes

expression

Defines the condition.

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

See:

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

name

A name for the condition that you can reference.

See:

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

FlowConditionalConnectionConfigurationProperty

class CfnFlowVersion.FlowConditionalConnectionConfigurationProperty(*, condition)

Bases: object

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

Parameters:

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

flow_conditional_connection_configuration_property = bedrock.CfnFlowVersion.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-flowversion-flowconditionalconnectionconfiguration.html#cfn-bedrock-flowversion-flowconditionalconnectionconfiguration-condition

FlowConnectionConfigurationProperty

class CfnFlowVersion.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-flowversion-flowconnectionconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

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

flow_connection_configuration_property = bedrock.CfnFlowVersion.FlowConnectionConfigurationProperty(
    conditional=bedrock.CfnFlowVersion.FlowConditionalConnectionConfigurationProperty(
        condition="condition"
    ),
    data=bedrock.CfnFlowVersion.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-flowversion-flowconnectionconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flowconnectionconfiguration.html#cfn-bedrock-flowversion-flowconnectionconfiguration-data

FlowConnectionProperty

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

Bases: object

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

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

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

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

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

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

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

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

Attributes

configuration

The configuration of the connection.

See:

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

name

A name for the connection that you can reference.

See:

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

source

The node that the connection starts at.

See:

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

target

The node that the connection ends at.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-flowconnection.html#cfn-bedrock-flowversion-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-flowversion-flowconnection.html#cfn-bedrock-flowversion-flowconnection-type

FlowDataConnectionConfigurationProperty

class CfnFlowVersion.FlowDataConnectionConfigurationProperty(*, source_output, target_input)

Bases: object

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

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

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

flow_data_connection_configuration_property = bedrock.CfnFlowVersion.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-flowversion-flowdataconnectionconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flowdataconnectionconfiguration.html#cfn-bedrock-flowversion-flowdataconnectionconfiguration-targetinput

FlowDefinitionProperty

class CfnFlowVersion.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-flowversion-flowdefinition.html

ExampleMetadata:

fixture=_generated

Example:

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

# additional_model_request_fields: Any
# collector: Any
# flow_definition_property_: bedrock.CfnFlowVersion.FlowDefinitionProperty
# input: Any
# iterator: Any
# loop_input: Any
# output: Any

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

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

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

                    # the properties below are optional
                    expression="expression"
                )]
            ),
            inline_code=bedrock.CfnFlowVersion.InlineCodeFlowNodeConfigurationProperty(
                code="code",
                language="language"
            ),
            input=input,
            iterator=iterator,
            knowledge_base=bedrock.CfnFlowVersion.KnowledgeBaseFlowNodeConfigurationProperty(
                knowledge_base_id="knowledgeBaseId",

                # the properties below are optional
                guardrail_configuration=bedrock.CfnFlowVersion.GuardrailConfigurationProperty(
                    guardrail_identifier="guardrailIdentifier",
                    guardrail_version="guardrailVersion"
                ),
                inference_configuration=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
                    text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
                        max_tokens=123,
                        stop_sequences=["stopSequences"],
                        temperature=123,
                        top_p=123
                    )
                ),
                model_id="modelId",
                number_of_results=123,
                orchestration_configuration=bedrock.CfnFlowVersion.KnowledgeBaseOrchestrationConfigurationProperty(
                    additional_model_request_fields=additional_model_request_fields,
                    inference_config=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
                        text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
                            max_tokens=123,
                            stop_sequences=["stopSequences"],
                            temperature=123,
                            top_p=123
                        )
                    ),
                    performance_config=bedrock.CfnFlowVersion.PerformanceConfigurationProperty(
                        latency="latency"
                    ),
                    prompt_template=bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty(
                        text_prompt_template="textPromptTemplate"
                    )
                ),
                prompt_template=bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty(
                    text_prompt_template="textPromptTemplate"
                ),
                reranking_configuration=bedrock.CfnFlowVersion.VectorSearchRerankingConfigurationProperty(
                    type="type",

                    # the properties below are optional
                    bedrock_reranking_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingConfigurationProperty(
                        model_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingModelConfigurationProperty(
                            model_arn="modelArn",

                            # the properties below are optional
                            additional_model_request_fields=additional_model_request_fields
                        ),

                        # the properties below are optional
                        metadata_configuration=bedrock.CfnFlowVersion.MetadataConfigurationForRerankingProperty(
                            selection_mode="selectionMode",

                            # the properties below are optional
                            selective_mode_configuration=bedrock.CfnFlowVersion.RerankingMetadataSelectiveModeConfigurationProperty(
                                fields_to_exclude=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                                    field_name="fieldName"
                                )],
                                fields_to_include=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                                    field_name="fieldName"
                                )]
                            )
                        ),
                        number_of_reranked_results=123
                    )
                )
            ),
            lambda_function=bedrock.CfnFlowVersion.LambdaFunctionFlowNodeConfigurationProperty(
                lambda_arn="lambdaArn"
            ),
            lex=bedrock.CfnFlowVersion.LexFlowNodeConfigurationProperty(
                bot_alias_arn="botAliasArn",
                locale_id="localeId"
            ),
            loop=bedrock.CfnFlowVersion.LoopFlowNodeConfigurationProperty(
                definition=flow_definition_property_
            ),
            loop_controller=bedrock.CfnFlowVersion.LoopControllerFlowNodeConfigurationProperty(
                continue_condition=bedrock.CfnFlowVersion.FlowConditionProperty(
                    name="name",

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

                # the properties below are optional
                max_iterations=123
            ),
            loop_input=loop_input,
            output=output,
            prompt=bedrock.CfnFlowVersion.PromptFlowNodeConfigurationProperty(
                source_configuration=bedrock.CfnFlowVersion.PromptFlowNodeSourceConfigurationProperty(
                    inline=bedrock.CfnFlowVersion.PromptFlowNodeInlineConfigurationProperty(
                        model_id="modelId",
                        template_configuration=bedrock.CfnFlowVersion.PromptTemplateConfigurationProperty(
                            text=bedrock.CfnFlowVersion.TextPromptTemplateConfigurationProperty(
                                text="text",

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

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

                # the properties below are optional
                guardrail_configuration=bedrock.CfnFlowVersion.GuardrailConfigurationProperty(
                    guardrail_identifier="guardrailIdentifier",
                    guardrail_version="guardrailVersion"
                )
            ),
            retrieval=bedrock.CfnFlowVersion.RetrievalFlowNodeConfigurationProperty(
                service_configuration=bedrock.CfnFlowVersion.RetrievalFlowNodeServiceConfigurationProperty(
                    s3=bedrock.CfnFlowVersion.RetrievalFlowNodeS3ConfigurationProperty(
                        bucket_name="bucketName"
                    )
                )
            ),
            storage=bedrock.CfnFlowVersion.StorageFlowNodeConfigurationProperty(
                service_configuration=bedrock.CfnFlowVersion.StorageFlowNodeServiceConfigurationProperty(
                    s3=bedrock.CfnFlowVersion.StorageFlowNodeS3ConfigurationProperty(
                        bucket_name="bucketName"
                    )
                )
            )
        ),
        inputs=[bedrock.CfnFlowVersion.FlowNodeInputProperty(
            expression="expression",
            name="name",
            type="type"
        )],
        outputs=[bedrock.CfnFlowVersion.FlowNodeOutputProperty(
            name="name",
            type="type"
        )]
    )]
)

Attributes

connections

An array of connection definitions in the flow.

See:

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

nodes

An array of node definitions in the flow.

See:

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

FlowNodeConfigurationProperty

class CfnFlowVersion.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-flowversion-flownodeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

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

# additional_model_request_fields: Any
# collector: Any
# flow_node_configuration_property_: bedrock.CfnFlowVersion.FlowNodeConfigurationProperty
# input: Any
# iterator: Any
# loop_input: Any
# output: Any

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

            # the properties below are optional
            expression="expression"
        )]
    ),
    inline_code=bedrock.CfnFlowVersion.InlineCodeFlowNodeConfigurationProperty(
        code="code",
        language="language"
    ),
    input=input,
    iterator=iterator,
    knowledge_base=bedrock.CfnFlowVersion.KnowledgeBaseFlowNodeConfigurationProperty(
        knowledge_base_id="knowledgeBaseId",

        # the properties below are optional
        guardrail_configuration=bedrock.CfnFlowVersion.GuardrailConfigurationProperty(
            guardrail_identifier="guardrailIdentifier",
            guardrail_version="guardrailVersion"
        ),
        inference_configuration=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
            text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
                max_tokens=123,
                stop_sequences=["stopSequences"],
                temperature=123,
                top_p=123
            )
        ),
        model_id="modelId",
        number_of_results=123,
        orchestration_configuration=bedrock.CfnFlowVersion.KnowledgeBaseOrchestrationConfigurationProperty(
            additional_model_request_fields=additional_model_request_fields,
            inference_config=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
                text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
                    max_tokens=123,
                    stop_sequences=["stopSequences"],
                    temperature=123,
                    top_p=123
                )
            ),
            performance_config=bedrock.CfnFlowVersion.PerformanceConfigurationProperty(
                latency="latency"
            ),
            prompt_template=bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty(
                text_prompt_template="textPromptTemplate"
            )
        ),
        prompt_template=bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty(
            text_prompt_template="textPromptTemplate"
        ),
        reranking_configuration=bedrock.CfnFlowVersion.VectorSearchRerankingConfigurationProperty(
            type="type",

            # the properties below are optional
            bedrock_reranking_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingConfigurationProperty(
                model_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingModelConfigurationProperty(
                    model_arn="modelArn",

                    # the properties below are optional
                    additional_model_request_fields=additional_model_request_fields
                ),

                # the properties below are optional
                metadata_configuration=bedrock.CfnFlowVersion.MetadataConfigurationForRerankingProperty(
                    selection_mode="selectionMode",

                    # the properties below are optional
                    selective_mode_configuration=bedrock.CfnFlowVersion.RerankingMetadataSelectiveModeConfigurationProperty(
                        fields_to_exclude=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                            field_name="fieldName"
                        )],
                        fields_to_include=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                            field_name="fieldName"
                        )]
                    )
                ),
                number_of_reranked_results=123
            )
        )
    ),
    lambda_function=bedrock.CfnFlowVersion.LambdaFunctionFlowNodeConfigurationProperty(
        lambda_arn="lambdaArn"
    ),
    lex=bedrock.CfnFlowVersion.LexFlowNodeConfigurationProperty(
        bot_alias_arn="botAliasArn",
        locale_id="localeId"
    ),
    loop=bedrock.CfnFlowVersion.LoopFlowNodeConfigurationProperty(
        definition=bedrock.CfnFlowVersion.FlowDefinitionProperty(
            connections=[bedrock.CfnFlowVersion.FlowConnectionProperty(
                name="name",
                source="source",
                target="target",
                type="type",

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

                # the properties below are optional
                configuration=flow_node_configuration_property_,
                inputs=[bedrock.CfnFlowVersion.FlowNodeInputProperty(
                    expression="expression",
                    name="name",
                    type="type"
                )],
                outputs=[bedrock.CfnFlowVersion.FlowNodeOutputProperty(
                    name="name",
                    type="type"
                )]
            )]
        )
    ),
    loop_controller=bedrock.CfnFlowVersion.LoopControllerFlowNodeConfigurationProperty(
        continue_condition=bedrock.CfnFlowVersion.FlowConditionProperty(
            name="name",

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

        # the properties below are optional
        max_iterations=123
    ),
    loop_input=loop_input,
    output=output,
    prompt=bedrock.CfnFlowVersion.PromptFlowNodeConfigurationProperty(
        source_configuration=bedrock.CfnFlowVersion.PromptFlowNodeSourceConfigurationProperty(
            inline=bedrock.CfnFlowVersion.PromptFlowNodeInlineConfigurationProperty(
                model_id="modelId",
                template_configuration=bedrock.CfnFlowVersion.PromptTemplateConfigurationProperty(
                    text=bedrock.CfnFlowVersion.TextPromptTemplateConfigurationProperty(
                        text="text",

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

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

        # the properties below are optional
        guardrail_configuration=bedrock.CfnFlowVersion.GuardrailConfigurationProperty(
            guardrail_identifier="guardrailIdentifier",
            guardrail_version="guardrailVersion"
        )
    ),
    retrieval=bedrock.CfnFlowVersion.RetrievalFlowNodeConfigurationProperty(
        service_configuration=bedrock.CfnFlowVersion.RetrievalFlowNodeServiceConfigurationProperty(
            s3=bedrock.CfnFlowVersion.RetrievalFlowNodeS3ConfigurationProperty(
                bucket_name="bucketName"
            )
        )
    ),
    storage=bedrock.CfnFlowVersion.StorageFlowNodeConfigurationProperty(
        service_configuration=bedrock.CfnFlowVersion.StorageFlowNodeServiceConfigurationProperty(
            s3=bedrock.CfnFlowVersion.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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-flownodeconfiguration-lex

loop

Contains configurations for a DoWhile loop in your flow.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-flownodeconfiguration.html#cfn-bedrock-flowversion-flownodeconfiguration-storage

FlowNodeInputProperty

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

Bases: object

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

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

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

  • type (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-flowversion-flownodeinput.html

ExampleMetadata:

fixture=_generated

Example:

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

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

Attributes

expression

An expression that formats the input for the node.

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-flownodeinput.html#cfn-bedrock-flowversion-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-flowversion-flownodeinput.html#cfn-bedrock-flowversion-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-flowversion-flownodeinput.html#cfn-bedrock-flowversion-flownodeinput-type

FlowNodeOutputProperty

class CfnFlowVersion.FlowNodeOutputProperty(*, name, type)

Bases: object

Contains configurations for an output from a node.

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

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

flow_node_output_property = bedrock.CfnFlowVersion.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-flowversion-flownodeoutput.html#cfn-bedrock-flowversion-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-flowversion-flownodeoutput.html#cfn-bedrock-flowversion-flownodeoutput-type

FlowNodeProperty

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

Bases: object

Contains configurations about a node in the flow.

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

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

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

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

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

# additional_model_request_fields: Any
# collector: Any
# flow_node_property_: bedrock.CfnFlowVersion.FlowNodeProperty
# input: Any
# iterator: Any
# loop_input: Any
# output: Any

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

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

                # the properties below are optional
                expression="expression"
            )]
        ),
        inline_code=bedrock.CfnFlowVersion.InlineCodeFlowNodeConfigurationProperty(
            code="code",
            language="language"
        ),
        input=input,
        iterator=iterator,
        knowledge_base=bedrock.CfnFlowVersion.KnowledgeBaseFlowNodeConfigurationProperty(
            knowledge_base_id="knowledgeBaseId",

            # the properties below are optional
            guardrail_configuration=bedrock.CfnFlowVersion.GuardrailConfigurationProperty(
                guardrail_identifier="guardrailIdentifier",
                guardrail_version="guardrailVersion"
            ),
            inference_configuration=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
                text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
                    max_tokens=123,
                    stop_sequences=["stopSequences"],
                    temperature=123,
                    top_p=123
                )
            ),
            model_id="modelId",
            number_of_results=123,
            orchestration_configuration=bedrock.CfnFlowVersion.KnowledgeBaseOrchestrationConfigurationProperty(
                additional_model_request_fields=additional_model_request_fields,
                inference_config=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
                    text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
                        max_tokens=123,
                        stop_sequences=["stopSequences"],
                        temperature=123,
                        top_p=123
                    )
                ),
                performance_config=bedrock.CfnFlowVersion.PerformanceConfigurationProperty(
                    latency="latency"
                ),
                prompt_template=bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty(
                    text_prompt_template="textPromptTemplate"
                )
            ),
            prompt_template=bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty(
                text_prompt_template="textPromptTemplate"
            ),
            reranking_configuration=bedrock.CfnFlowVersion.VectorSearchRerankingConfigurationProperty(
                type="type",

                # the properties below are optional
                bedrock_reranking_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingConfigurationProperty(
                    model_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingModelConfigurationProperty(
                        model_arn="modelArn",

                        # the properties below are optional
                        additional_model_request_fields=additional_model_request_fields
                    ),

                    # the properties below are optional
                    metadata_configuration=bedrock.CfnFlowVersion.MetadataConfigurationForRerankingProperty(
                        selection_mode="selectionMode",

                        # the properties below are optional
                        selective_mode_configuration=bedrock.CfnFlowVersion.RerankingMetadataSelectiveModeConfigurationProperty(
                            fields_to_exclude=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                                field_name="fieldName"
                            )],
                            fields_to_include=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                                field_name="fieldName"
                            )]
                        )
                    ),
                    number_of_reranked_results=123
                )
            )
        ),
        lambda_function=bedrock.CfnFlowVersion.LambdaFunctionFlowNodeConfigurationProperty(
            lambda_arn="lambdaArn"
        ),
        lex=bedrock.CfnFlowVersion.LexFlowNodeConfigurationProperty(
            bot_alias_arn="botAliasArn",
            locale_id="localeId"
        ),
        loop=bedrock.CfnFlowVersion.LoopFlowNodeConfigurationProperty(
            definition=bedrock.CfnFlowVersion.FlowDefinitionProperty(
                connections=[bedrock.CfnFlowVersion.FlowConnectionProperty(
                    name="name",
                    source="source",
                    target="target",
                    type="type",

                    # the properties below are optional
                    configuration=bedrock.CfnFlowVersion.FlowConnectionConfigurationProperty(
                        conditional=bedrock.CfnFlowVersion.FlowConditionalConnectionConfigurationProperty(
                            condition="condition"
                        ),
                        data=bedrock.CfnFlowVersion.FlowDataConnectionConfigurationProperty(
                            source_output="sourceOutput",
                            target_input="targetInput"
                        )
                    )
                )],
                nodes=[flow_node_property_]
            )
        ),
        loop_controller=bedrock.CfnFlowVersion.LoopControllerFlowNodeConfigurationProperty(
            continue_condition=bedrock.CfnFlowVersion.FlowConditionProperty(
                name="name",

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

            # the properties below are optional
            max_iterations=123
        ),
        loop_input=loop_input,
        output=output,
        prompt=bedrock.CfnFlowVersion.PromptFlowNodeConfigurationProperty(
            source_configuration=bedrock.CfnFlowVersion.PromptFlowNodeSourceConfigurationProperty(
                inline=bedrock.CfnFlowVersion.PromptFlowNodeInlineConfigurationProperty(
                    model_id="modelId",
                    template_configuration=bedrock.CfnFlowVersion.PromptTemplateConfigurationProperty(
                        text=bedrock.CfnFlowVersion.TextPromptTemplateConfigurationProperty(
                            text="text",

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

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

            # the properties below are optional
            guardrail_configuration=bedrock.CfnFlowVersion.GuardrailConfigurationProperty(
                guardrail_identifier="guardrailIdentifier",
                guardrail_version="guardrailVersion"
            )
        ),
        retrieval=bedrock.CfnFlowVersion.RetrievalFlowNodeConfigurationProperty(
            service_configuration=bedrock.CfnFlowVersion.RetrievalFlowNodeServiceConfigurationProperty(
                s3=bedrock.CfnFlowVersion.RetrievalFlowNodeS3ConfigurationProperty(
                    bucket_name="bucketName"
                )
            )
        ),
        storage=bedrock.CfnFlowVersion.StorageFlowNodeConfigurationProperty(
            service_configuration=bedrock.CfnFlowVersion.StorageFlowNodeServiceConfigurationProperty(
                s3=bedrock.CfnFlowVersion.StorageFlowNodeS3ConfigurationProperty(
                    bucket_name="bucketName"
                )
            )
        )
    ),
    inputs=[bedrock.CfnFlowVersion.FlowNodeInputProperty(
        expression="expression",
        name="name",
        type="type"
    )],
    outputs=[bedrock.CfnFlowVersion.FlowNodeOutputProperty(
        name="name",
        type="type"
    )]
)

Attributes

configuration

Contains configurations for the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-flownode.html#cfn-bedrock-flowversion-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-flowversion-flownode.html#cfn-bedrock-flowversion-flownode-inputs

name

A name for the node.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-flownode.html#cfn-bedrock-flowversion-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-flowversion-flownode.html#cfn-bedrock-flowversion-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-flowversion-flownode.html#cfn-bedrock-flowversion-flownode-type

GuardrailConfigurationProperty

class CfnFlowVersion.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-flowversion-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 import aws_bedrock as bedrock

guardrail_configuration_property = bedrock.CfnFlowVersion.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-flowversion-guardrailconfiguration.html#cfn-bedrock-flowversion-guardrailconfiguration-guardrailidentifier

guardrail_version

The version of the guardrail.

See:

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

InlineCodeFlowNodeConfigurationProperty

class CfnFlowVersion.InlineCodeFlowNodeConfigurationProperty(*, code, language)

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 (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 (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-flowversion-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 import aws_bedrock as bedrock

inline_code_flow_node_configuration_property = bedrock.CfnFlowVersion.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-flowversion-inlinecodeflownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-inlinecodeflownodeconfiguration.html#cfn-bedrock-flowversion-inlinecodeflownodeconfiguration-language

KnowledgeBaseFlowNodeConfigurationProperty

class CfnFlowVersion.KnowledgeBaseFlowNodeConfigurationProperty(*, knowledge_base_id, guardrail_configuration=None, inference_configuration=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:
  • knowledge_base_id (str) – The unique identifier of the knowledge base to query.

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

  • 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-flowversion-knowledgebaseflownodeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

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

# additional_model_request_fields: Any

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

    # the properties below are optional
    guardrail_configuration=bedrock.CfnFlowVersion.GuardrailConfigurationProperty(
        guardrail_identifier="guardrailIdentifier",
        guardrail_version="guardrailVersion"
    ),
    inference_configuration=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
        text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
            max_tokens=123,
            stop_sequences=["stopSequences"],
            temperature=123,
            top_p=123
        )
    ),
    model_id="modelId",
    number_of_results=123,
    orchestration_configuration=bedrock.CfnFlowVersion.KnowledgeBaseOrchestrationConfigurationProperty(
        additional_model_request_fields=additional_model_request_fields,
        inference_config=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
            text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
                max_tokens=123,
                stop_sequences=["stopSequences"],
                temperature=123,
                top_p=123
            )
        ),
        performance_config=bedrock.CfnFlowVersion.PerformanceConfigurationProperty(
            latency="latency"
        ),
        prompt_template=bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty(
            text_prompt_template="textPromptTemplate"
        )
    ),
    prompt_template=bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty(
        text_prompt_template="textPromptTemplate"
    ),
    reranking_configuration=bedrock.CfnFlowVersion.VectorSearchRerankingConfigurationProperty(
        type="type",

        # the properties below are optional
        bedrock_reranking_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingConfigurationProperty(
            model_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingModelConfigurationProperty(
                model_arn="modelArn",

                # the properties below are optional
                additional_model_request_fields=additional_model_request_fields
            ),

            # the properties below are optional
            metadata_configuration=bedrock.CfnFlowVersion.MetadataConfigurationForRerankingProperty(
                selection_mode="selectionMode",

                # the properties below are optional
                selective_mode_configuration=bedrock.CfnFlowVersion.RerankingMetadataSelectiveModeConfigurationProperty(
                    fields_to_exclude=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                        field_name="fieldName"
                    )],
                    fields_to_include=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                        field_name="fieldName"
                    )]
                )
            ),
            number_of_reranked_results=123
        )
    )
)

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-flowversion-knowledgebaseflownodeconfiguration.html#cfn-bedrock-flowversion-knowledgebaseflownodeconfiguration-guardrailconfiguration

inference_configuration

Contains inference configurations for the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-knowledgebaseflownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-knowledgebaseflownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-knowledgebaseflownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-knowledgebaseflownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-knowledgebaseflownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-knowledgebaseflownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-knowledgebaseflownodeconfiguration.html#cfn-bedrock-flowversion-knowledgebaseflownodeconfiguration-rerankingconfiguration

KnowledgeBaseOrchestrationConfigurationProperty

class CfnFlowVersion.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-flowversion-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 import aws_bedrock as bedrock

# additional_model_request_fields: Any

knowledge_base_orchestration_configuration_property = bedrock.CfnFlowVersion.KnowledgeBaseOrchestrationConfigurationProperty(
    additional_model_request_fields=additional_model_request_fields,
    inference_config=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
        text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
            max_tokens=123,
            stop_sequences=["stopSequences"],
            temperature=123,
            top_p=123
        )
    ),
    performance_config=bedrock.CfnFlowVersion.PerformanceConfigurationProperty(
        latency="latency"
    ),
    prompt_template=bedrock.CfnFlowVersion.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-flowversion-knowledgebaseorchestrationconfiguration.html#cfn-bedrock-flowversion-knowledgebaseorchestrationconfiguration-additionalmodelrequestfields

inference_config

Contains inference configurations for the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-knowledgebaseorchestrationconfiguration.html#cfn-bedrock-flowversion-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-flowversion-knowledgebaseorchestrationconfiguration.html#cfn-bedrock-flowversion-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-flowversion-knowledgebaseorchestrationconfiguration.html#cfn-bedrock-flowversion-knowledgebaseorchestrationconfiguration-prompttemplate

KnowledgeBasePromptTemplateProperty

class CfnFlowVersion.KnowledgeBasePromptTemplateProperty(*, text_prompt_template)

Bases: object

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

Parameters:

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

See:

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

knowledge_base_prompt_template_property = bedrock.CfnFlowVersion.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-flowversion-knowledgebaseprompttemplate.html#cfn-bedrock-flowversion-knowledgebaseprompttemplate-textprompttemplate

LambdaFunctionFlowNodeConfigurationProperty

class CfnFlowVersion.LambdaFunctionFlowNodeConfigurationProperty(*, lambda_arn)

Bases: object

Contains configurations for a Lambda function node in the flow.

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

Parameters:

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

lambda_function_flow_node_configuration_property = bedrock.CfnFlowVersion.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-flowversion-lambdafunctionflownodeconfiguration.html#cfn-bedrock-flowversion-lambdafunctionflownodeconfiguration-lambdaarn

LexFlowNodeConfigurationProperty

class CfnFlowVersion.LexFlowNodeConfigurationProperty(*, bot_alias_arn, locale_id)

Bases: object

Contains configurations for a Lex node in the flow.

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

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

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

lex_flow_node_configuration_property = bedrock.CfnFlowVersion.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-flowversion-lexflownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-lexflownodeconfiguration.html#cfn-bedrock-flowversion-lexflownodeconfiguration-localeid

LoopControllerFlowNodeConfigurationProperty

class CfnFlowVersion.LoopControllerFlowNodeConfigurationProperty(*, continue_condition, 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]]) – 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-flowversion-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 import aws_bedrock as bedrock

loop_controller_flow_node_configuration_property = bedrock.CfnFlowVersion.LoopControllerFlowNodeConfigurationProperty(
    continue_condition=bedrock.CfnFlowVersion.FlowConditionProperty(
        name="name",

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

    # the properties below are optional
    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-flowversion-loopcontrollerflownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-loopcontrollerflownodeconfiguration.html#cfn-bedrock-flowversion-loopcontrollerflownodeconfiguration-maxiterations

LoopFlowNodeConfigurationProperty

class CfnFlowVersion.LoopFlowNodeConfigurationProperty(*, definition)

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]]) – 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-flowversion-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 import aws_bedrock as bedrock

# additional_model_request_fields: Any
# collector: Any
# input: Any
# iterator: Any
# loop_flow_node_configuration_property_: bedrock.CfnFlowVersion.LoopFlowNodeConfigurationProperty
# loop_input: Any
# output: Any

loop_flow_node_configuration_property = bedrock.CfnFlowVersion.LoopFlowNodeConfigurationProperty(
    definition=bedrock.CfnFlowVersion.FlowDefinitionProperty(
        connections=[bedrock.CfnFlowVersion.FlowConnectionProperty(
            name="name",
            source="source",
            target="target",
            type="type",

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

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

                        # the properties below are optional
                        expression="expression"
                    )]
                ),
                inline_code=bedrock.CfnFlowVersion.InlineCodeFlowNodeConfigurationProperty(
                    code="code",
                    language="language"
                ),
                input=input,
                iterator=iterator,
                knowledge_base=bedrock.CfnFlowVersion.KnowledgeBaseFlowNodeConfigurationProperty(
                    knowledge_base_id="knowledgeBaseId",

                    # the properties below are optional
                    guardrail_configuration=bedrock.CfnFlowVersion.GuardrailConfigurationProperty(
                        guardrail_identifier="guardrailIdentifier",
                        guardrail_version="guardrailVersion"
                    ),
                    inference_configuration=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
                        text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
                            max_tokens=123,
                            stop_sequences=["stopSequences"],
                            temperature=123,
                            top_p=123
                        )
                    ),
                    model_id="modelId",
                    number_of_results=123,
                    orchestration_configuration=bedrock.CfnFlowVersion.KnowledgeBaseOrchestrationConfigurationProperty(
                        additional_model_request_fields=additional_model_request_fields,
                        inference_config=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
                            text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
                                max_tokens=123,
                                stop_sequences=["stopSequences"],
                                temperature=123,
                                top_p=123
                            )
                        ),
                        performance_config=bedrock.CfnFlowVersion.PerformanceConfigurationProperty(
                            latency="latency"
                        ),
                        prompt_template=bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty(
                            text_prompt_template="textPromptTemplate"
                        )
                    ),
                    prompt_template=bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty(
                        text_prompt_template="textPromptTemplate"
                    ),
                    reranking_configuration=bedrock.CfnFlowVersion.VectorSearchRerankingConfigurationProperty(
                        type="type",

                        # the properties below are optional
                        bedrock_reranking_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingConfigurationProperty(
                            model_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingModelConfigurationProperty(
                                model_arn="modelArn",

                                # the properties below are optional
                                additional_model_request_fields=additional_model_request_fields
                            ),

                            # the properties below are optional
                            metadata_configuration=bedrock.CfnFlowVersion.MetadataConfigurationForRerankingProperty(
                                selection_mode="selectionMode",

                                # the properties below are optional
                                selective_mode_configuration=bedrock.CfnFlowVersion.RerankingMetadataSelectiveModeConfigurationProperty(
                                    fields_to_exclude=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                                        field_name="fieldName"
                                    )],
                                    fields_to_include=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                                        field_name="fieldName"
                                    )]
                                )
                            ),
                            number_of_reranked_results=123
                        )
                    )
                ),
                lambda_function=bedrock.CfnFlowVersion.LambdaFunctionFlowNodeConfigurationProperty(
                    lambda_arn="lambdaArn"
                ),
                lex=bedrock.CfnFlowVersion.LexFlowNodeConfigurationProperty(
                    bot_alias_arn="botAliasArn",
                    locale_id="localeId"
                ),
                loop=loop_flow_node_configuration_property_,
                loop_controller=bedrock.CfnFlowVersion.LoopControllerFlowNodeConfigurationProperty(
                    continue_condition=bedrock.CfnFlowVersion.FlowConditionProperty(
                        name="name",

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

                    # the properties below are optional
                    max_iterations=123
                ),
                loop_input=loop_input,
                output=output,
                prompt=bedrock.CfnFlowVersion.PromptFlowNodeConfigurationProperty(
                    source_configuration=bedrock.CfnFlowVersion.PromptFlowNodeSourceConfigurationProperty(
                        inline=bedrock.CfnFlowVersion.PromptFlowNodeInlineConfigurationProperty(
                            model_id="modelId",
                            template_configuration=bedrock.CfnFlowVersion.PromptTemplateConfigurationProperty(
                                text=bedrock.CfnFlowVersion.TextPromptTemplateConfigurationProperty(
                                    text="text",

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

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

                    # the properties below are optional
                    guardrail_configuration=bedrock.CfnFlowVersion.GuardrailConfigurationProperty(
                        guardrail_identifier="guardrailIdentifier",
                        guardrail_version="guardrailVersion"
                    )
                ),
                retrieval=bedrock.CfnFlowVersion.RetrievalFlowNodeConfigurationProperty(
                    service_configuration=bedrock.CfnFlowVersion.RetrievalFlowNodeServiceConfigurationProperty(
                        s3=bedrock.CfnFlowVersion.RetrievalFlowNodeS3ConfigurationProperty(
                            bucket_name="bucketName"
                        )
                    )
                ),
                storage=bedrock.CfnFlowVersion.StorageFlowNodeConfigurationProperty(
                    service_configuration=bedrock.CfnFlowVersion.StorageFlowNodeServiceConfigurationProperty(
                        s3=bedrock.CfnFlowVersion.StorageFlowNodeS3ConfigurationProperty(
                            bucket_name="bucketName"
                        )
                    )
                )
            ),
            inputs=[bedrock.CfnFlowVersion.FlowNodeInputProperty(
                expression="expression",
                name="name",
                type="type"
            )],
            outputs=[bedrock.CfnFlowVersion.FlowNodeOutputProperty(
                name="name",
                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-flowversion-loopflownodeconfiguration.html#cfn-bedrock-flowversion-loopflownodeconfiguration-definition

MetadataConfigurationForRerankingProperty

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

Bases: object

Contains configurations for the metadata to use in reranking.

Parameters:
  • selection_mode (str) – Specifies whether to consider all metadata when reranking, or only the metadata that you select. If you specify SELECTIVE , include the selectiveModeConfiguration field.

  • selective_mode_configuration (Union[IResolvable, RerankingMetadataSelectiveModeConfigurationProperty, Dict[str, Any], None]) – Contains configurations for the metadata fields to include or exclude when considering reranking.

See:

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

metadata_configuration_for_reranking_property = bedrock.CfnFlowVersion.MetadataConfigurationForRerankingProperty(
    selection_mode="selectionMode",

    # the properties below are optional
    selective_mode_configuration=bedrock.CfnFlowVersion.RerankingMetadataSelectiveModeConfigurationProperty(
        fields_to_exclude=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
            field_name="fieldName"
        )],
        fields_to_include=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
            field_name="fieldName"
        )]
    )
)

Attributes

selection_mode

Specifies whether to consider all metadata when reranking, or only the metadata that you select.

If you specify SELECTIVE , include the selectiveModeConfiguration field.

See:

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

selective_mode_configuration

Contains configurations for the metadata fields to include or exclude when considering reranking.

See:

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

PerformanceConfigurationProperty

class CfnFlowVersion.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-flowversion-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 import aws_bedrock as bedrock

performance_configuration_property = bedrock.CfnFlowVersion.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-flowversion-performanceconfiguration.html#cfn-bedrock-flowversion-performanceconfiguration-latency

PromptFlowNodeConfigurationProperty

class CfnFlowVersion.PromptFlowNodeConfigurationProperty(*, source_configuration, guardrail_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-flowversion-promptflownodeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

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

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

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

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

    # the properties below are optional
    guardrail_configuration=bedrock.CfnFlowVersion.GuardrailConfigurationProperty(
        guardrail_identifier="guardrailIdentifier",
        guardrail_version="guardrailVersion"
    )
)

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-flowversion-promptflownodeconfiguration.html#cfn-bedrock-flowversion-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-flowversion-promptflownodeconfiguration.html#cfn-bedrock-flowversion-promptflownodeconfiguration-sourceconfiguration

PromptFlowNodeInlineConfigurationProperty

class CfnFlowVersion.PromptFlowNodeInlineConfigurationProperty(*, model_id, template_configuration, template_type, inference_configuration=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-flowversion-promptflownodeinlineconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

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

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

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

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

Attributes

inference_configuration

Contains inference configurations for the prompt.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flowversion-promptflownodeinlineconfiguration.html#cfn-bedrock-flowversion-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-flowversion-promptflownodeinlineconfiguration.html#cfn-bedrock-flowversion-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-flowversion-promptflownodeinlineconfiguration.html#cfn-bedrock-flowversion-promptflownodeinlineconfiguration-templateconfiguration

template_type

The type of prompt template.

See:

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

PromptFlowNodeResourceConfigurationProperty

class CfnFlowVersion.PromptFlowNodeResourceConfigurationProperty(*, prompt_arn)

Bases: object

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

Parameters:

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

prompt_flow_node_resource_configuration_property = bedrock.CfnFlowVersion.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-flowversion-promptflownoderesourceconfiguration.html#cfn-bedrock-flowversion-promptflownoderesourceconfiguration-promptarn

PromptFlowNodeSourceConfigurationProperty

class CfnFlowVersion.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-flowversion-promptflownodesourceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

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

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

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

        # the properties below are optional
        inference_configuration=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
            text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
                max_tokens=123,
                stop_sequences=["stopSequences"],
                temperature=123,
                top_p=123
            )
        )
    ),
    resource=bedrock.CfnFlowVersion.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-flowversion-promptflownodesourceconfiguration.html#cfn-bedrock-flowversion-promptflownodesourceconfiguration-inline

resource

Contains configurations for a prompt from Prompt management.

See:

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

PromptInferenceConfigurationProperty

class CfnFlowVersion.PromptInferenceConfigurationProperty(*, text)

Bases: object

Contains inference configurations for the prompt.

Parameters:

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

prompt_inference_configuration_property = bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
    text=bedrock.CfnFlowVersion.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-flowversion-promptinferenceconfiguration.html#cfn-bedrock-flowversion-promptinferenceconfiguration-text

PromptInputVariableProperty

class CfnFlowVersion.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-flowversion-promptinputvariable.html

ExampleMetadata:

fixture=_generated

Example:

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

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

Attributes

name

The name of the variable.

See:

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

PromptModelInferenceConfigurationProperty

class CfnFlowVersion.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-flowversion-promptmodelinferenceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

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

prompt_model_inference_configuration_property = bedrock.CfnFlowVersion.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-flowversion-promptmodelinferenceconfiguration.html#cfn-bedrock-flowversion-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-flowversion-promptmodelinferenceconfiguration.html#cfn-bedrock-flowversion-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-flowversion-promptmodelinferenceconfiguration.html#cfn-bedrock-flowversion-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-flowversion-promptmodelinferenceconfiguration.html#cfn-bedrock-flowversion-promptmodelinferenceconfiguration-topp

PromptTemplateConfigurationProperty

class CfnFlowVersion.PromptTemplateConfigurationProperty(*, text)

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]]) – Contains configurations for the text in a message for a prompt.

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

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

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

Attributes

text

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

See:

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

RerankingMetadataSelectiveModeConfigurationProperty

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

Bases: object

Contains configurations for the metadata fields to include or exclude when considering reranking.

If you include the fieldsToExclude field, the reranker ignores all the metadata fields that you specify. If you include the fieldsToInclude field, the reranker uses only the metadata fields that you specify and ignores all others. You can include only one of these fields.

Parameters:
  • fields_to_exclude (Union[IResolvable, Sequence[Union[IResolvable, FieldForRerankingProperty, Dict[str, Any]]], None]) – An array of objects, each of which specifies a metadata field to exclude from consideration when reranking.

  • fields_to_include (Union[IResolvable, Sequence[Union[IResolvable, FieldForRerankingProperty, Dict[str, Any]]], None]) – An array of objects, each of which specifies a metadata field to include in consideration when reranking. The remaining metadata fields are ignored.

See:

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

reranking_metadata_selective_mode_configuration_property = bedrock.CfnFlowVersion.RerankingMetadataSelectiveModeConfigurationProperty(
    fields_to_exclude=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
        field_name="fieldName"
    )],
    fields_to_include=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
        field_name="fieldName"
    )]
)

Attributes

fields_to_exclude

An array of objects, each of which specifies a metadata field to exclude from consideration when reranking.

See:

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

fields_to_include

An array of objects, each of which specifies a metadata field to include in consideration when reranking.

The remaining metadata fields are ignored.

See:

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

RetrievalFlowNodeConfigurationProperty

class CfnFlowVersion.RetrievalFlowNodeConfigurationProperty(*, service_configuration)

Bases: object

Contains configurations for a Retrieval node in a flow.

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

Parameters:

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

retrieval_flow_node_configuration_property = bedrock.CfnFlowVersion.RetrievalFlowNodeConfigurationProperty(
    service_configuration=bedrock.CfnFlowVersion.RetrievalFlowNodeServiceConfigurationProperty(
        s3=bedrock.CfnFlowVersion.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-flowversion-retrievalflownodeconfiguration.html#cfn-bedrock-flowversion-retrievalflownodeconfiguration-serviceconfiguration

RetrievalFlowNodeS3ConfigurationProperty

class CfnFlowVersion.RetrievalFlowNodeS3ConfigurationProperty(*, bucket_name)

Bases: object

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

Parameters:

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

retrieval_flow_node_s3_configuration_property = bedrock.CfnFlowVersion.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-flowversion-retrievalflownodes3configuration.html#cfn-bedrock-flowversion-retrievalflownodes3configuration-bucketname

RetrievalFlowNodeServiceConfigurationProperty

class CfnFlowVersion.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-flowversion-retrievalflownodeserviceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

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

retrieval_flow_node_service_configuration_property = bedrock.CfnFlowVersion.RetrievalFlowNodeServiceConfigurationProperty(
    s3=bedrock.CfnFlowVersion.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-flowversion-retrievalflownodeserviceconfiguration.html#cfn-bedrock-flowversion-retrievalflownodeserviceconfiguration-s3

StorageFlowNodeConfigurationProperty

class CfnFlowVersion.StorageFlowNodeConfigurationProperty(*, service_configuration)

Bases: object

Contains configurations for a Storage node in a flow.

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

Parameters:

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

storage_flow_node_configuration_property = bedrock.CfnFlowVersion.StorageFlowNodeConfigurationProperty(
    service_configuration=bedrock.CfnFlowVersion.StorageFlowNodeServiceConfigurationProperty(
        s3=bedrock.CfnFlowVersion.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-flowversion-storageflownodeconfiguration.html#cfn-bedrock-flowversion-storageflownodeconfiguration-serviceconfiguration

StorageFlowNodeS3ConfigurationProperty

class CfnFlowVersion.StorageFlowNodeS3ConfigurationProperty(*, bucket_name)

Bases: object

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

Parameters:

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

storage_flow_node_s3_configuration_property = bedrock.CfnFlowVersion.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-flowversion-storageflownodes3configuration.html#cfn-bedrock-flowversion-storageflownodes3configuration-bucketname

StorageFlowNodeServiceConfigurationProperty

class CfnFlowVersion.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-flowversion-storageflownodeserviceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

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

storage_flow_node_service_configuration_property = bedrock.CfnFlowVersion.StorageFlowNodeServiceConfigurationProperty(
    s3=bedrock.CfnFlowVersion.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-flowversion-storageflownodeserviceconfiguration.html#cfn-bedrock-flowversion-storageflownodeserviceconfiguration-s3

TextPromptTemplateConfigurationProperty

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

Bases: object

Contains configurations for a text prompt template.

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

Parameters:
See:

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

ExampleMetadata:

fixture=_generated

Example:

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

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

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

Attributes

input_variables

An array of the variables in the prompt template.

See:

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

text

The message for the prompt.

See:

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

VectorSearchBedrockRerankingConfigurationProperty

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

Bases: object

Contains configurations for reranking with an Amazon Bedrock reranker model.

Parameters:
See:

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

# additional_model_request_fields: Any

vector_search_bedrock_reranking_configuration_property = bedrock.CfnFlowVersion.VectorSearchBedrockRerankingConfigurationProperty(
    model_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingModelConfigurationProperty(
        model_arn="modelArn",

        # the properties below are optional
        additional_model_request_fields=additional_model_request_fields
    ),

    # the properties below are optional
    metadata_configuration=bedrock.CfnFlowVersion.MetadataConfigurationForRerankingProperty(
        selection_mode="selectionMode",

        # the properties below are optional
        selective_mode_configuration=bedrock.CfnFlowVersion.RerankingMetadataSelectiveModeConfigurationProperty(
            fields_to_exclude=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                field_name="fieldName"
            )],
            fields_to_include=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                field_name="fieldName"
            )]
        )
    ),
    number_of_reranked_results=123
)

Attributes

metadata_configuration

Contains configurations for the metadata to use in reranking.

See:

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

model_configuration

Contains configurations for the reranker model.

See:

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

number_of_reranked_results

The number of results to return after reranking.

See:

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

VectorSearchBedrockRerankingModelConfigurationProperty

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

Bases: object

Contains configurations for an Amazon Bedrock reranker model.

Parameters:
  • model_arn (str) – The ARN of the reranker model to use.

  • additional_model_request_fields (Any) – A JSON object whose keys are request fields for the model and whose values are values for those fields.

See:

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

# additional_model_request_fields: Any

vector_search_bedrock_reranking_model_configuration_property = bedrock.CfnFlowVersion.VectorSearchBedrockRerankingModelConfigurationProperty(
    model_arn="modelArn",

    # the properties below are optional
    additional_model_request_fields=additional_model_request_fields
)

Attributes

additional_model_request_fields

A JSON object whose keys are request fields for the model and whose values are values for those fields.

See:

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

model_arn

The ARN of the reranker model to use.

See:

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

VectorSearchRerankingConfigurationProperty

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

Bases: object

Contains configurations for reranking the retrieved results.

Parameters:
See:

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

# additional_model_request_fields: Any

vector_search_reranking_configuration_property = bedrock.CfnFlowVersion.VectorSearchRerankingConfigurationProperty(
    type="type",

    # the properties below are optional
    bedrock_reranking_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingConfigurationProperty(
        model_configuration=bedrock.CfnFlowVersion.VectorSearchBedrockRerankingModelConfigurationProperty(
            model_arn="modelArn",

            # the properties below are optional
            additional_model_request_fields=additional_model_request_fields
        ),

        # the properties below are optional
        metadata_configuration=bedrock.CfnFlowVersion.MetadataConfigurationForRerankingProperty(
            selection_mode="selectionMode",

            # the properties below are optional
            selective_mode_configuration=bedrock.CfnFlowVersion.RerankingMetadataSelectiveModeConfigurationProperty(
                fields_to_exclude=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                    field_name="fieldName"
                )],
                fields_to_include=[bedrock.CfnFlowVersion.FieldForRerankingProperty(
                    field_name="fieldName"
                )]
            )
        ),
        number_of_reranked_results=123
    )
)

Attributes

bedrock_reranking_configuration

Contains configurations for an Amazon Bedrock reranker model.

See:

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

type

The type of reranker model.

See:

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