CfnFlowProps

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

Bases: object

Properties for defining a CfnFlow.

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

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

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

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

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

  • definition_string (Optional[str]) – The definition of the flow as a JSON-formatted string. The string must match the format in FlowDefinition .

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

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

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

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

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

cfn_flow_props = bedrock.CfnFlowProps(
    execution_role_arn="executionRoleArn",
    name="name",

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

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

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

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

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

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

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

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

        # the properties below are optional
        version="version"
    ),
    definition_string="definitionString",
    definition_substitutions={
        "definition_substitutions_key": "definitionSubstitutions"
    },
    description="description",
    tags={
        "tags_key": "tags"
    },
    test_alias_tags={
        "test_alias_tags_key": "testAliasTags"
    }
)

Attributes

customer_encryption_key_arn

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

See:

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

definition

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

See:

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

definition_s3_location

The Amazon S3 location of the flow definition.

See:

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

definition_string

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

The string must match the format in FlowDefinition .

See:

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

definition_substitutions

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

This enables the customer to inject values obtained at runtime. Variables can be template parameter names, resource logical IDs, resource attributes, or a variable in a key-value map. Only supported with the DefinitionString and DefinitionS3Location fields.

Substitutions must follow the syntax: ${key_name} or ${variable_1,variable_2,...} .

See:

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

description

A description of the flow.

See:

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

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.

See:

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

name

The name of the flow.

See:

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

tags

.

See:

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

Type:

Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources

test_alias_tags

A map of tag keys and values.

See:

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