Skip to content
v2.274.0

CfnFlowProps Struct ​

Properties for defining a CfnFlow.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';

declare const additionalModelRequestFields: any;
declare const collector: any;
declare const flowDefinitionProperty_: bedrock.CfnFlow.FlowDefinitionProperty;
declare const input: any;
declare const iterator: any;
declare const loopInput: any;
declare const output: any;
const cfnFlowProps: bedrock.CfnFlowProps = {
  executionRoleArn: 'executionRoleArn',
  name: 'name',

  // the properties below are optional
  customerEncryptionKeyArn: 'customerEncryptionKeyArn',
  definition: {
    connections: [{
      name: 'name',
      source: 'source',
      target: 'target',
      type: 'type',

      // the properties below are optional
      configuration: {
        conditional: {
          condition: 'condition',
        },
        data: {
          sourceOutput: 'sourceOutput',
          targetInput: 'targetInput',
        },
      },
    }],
    nodes: [{
      name: 'name',
      type: 'type',

      // the properties below are optional
      configuration: {
        agent: {
          agentAliasArn: 'agentAliasArn',
        },
        collector: collector,
        condition: {
          conditions: [{
            name: 'name',

            // the properties below are optional
            expression: 'expression',
          }],
        },
        inlineCode: {
          code: 'code',
          language: 'language',
        },
        input: input,
        iterator: iterator,
        knowledgeBase: {
          knowledgeBaseId: 'knowledgeBaseId',

          // the properties below are optional
          guardrailConfiguration: {
            guardrailIdentifier: 'guardrailIdentifier',
            guardrailVersion: 'guardrailVersion',
          },
          inferenceConfiguration: {
            text: {
              maxTokens: 123,
              stopSequences: ['stopSequences'],
              temperature: 123,
              topP: 123,
            },
          },
          modelId: 'modelId',
          numberOfResults: 123,
          orchestrationConfiguration: {
            additionalModelRequestFields: additionalModelRequestFields,
            inferenceConfig: {
              text: {
                maxTokens: 123,
                stopSequences: ['stopSequences'],
                temperature: 123,
                topP: 123,
              },
            },
            performanceConfig: {
              latency: 'latency',
            },
            promptTemplate: {
              textPromptTemplate: 'textPromptTemplate',
            },
          },
          promptTemplate: {
            textPromptTemplate: 'textPromptTemplate',
          },
          rerankingConfiguration: {
            type: 'type',

            // the properties below are optional
            bedrockRerankingConfiguration: {
              modelConfiguration: {
                modelArn: 'modelArn',

                // the properties below are optional
                additionalModelRequestFields: additionalModelRequestFields,
              },

              // the properties below are optional
              metadataConfiguration: {
                selectionMode: 'selectionMode',

                // the properties below are optional
                selectiveModeConfiguration: {
                  fieldsToExclude: [{
                    fieldName: 'fieldName',
                  }],
                  fieldsToInclude: [{
                    fieldName: 'fieldName',
                  }],
                },
              },
              numberOfRerankedResults: 123,
            },
          },
        },
        lambdaFunction: {
          lambdaArn: 'lambdaArn',
        },
        lex: {
          botAliasArn: 'botAliasArn',
          localeId: 'localeId',
        },
        loop: {
          definition: flowDefinitionProperty_,
        },
        loopController: {
          continueCondition: {
            name: 'name',

            // the properties below are optional
            expression: 'expression',
          },

          // the properties below are optional
          maxIterations: 123,
        },
        loopInput: loopInput,
        output: output,
        prompt: {
          sourceConfiguration: {
            inline: {
              modelId: 'modelId',
              templateConfiguration: {
                text: {
                  text: 'text',

                  // the properties below are optional
                  inputVariables: [{
                    name: 'name',
                  }],
                },
              },
              templateType: 'templateType',

              // the properties below are optional
              inferenceConfiguration: {
                text: {
                  maxTokens: 123,
                  stopSequences: ['stopSequences'],
                  temperature: 123,
                  topP: 123,
                },
              },
            },
            resource: {
              promptArn: 'promptArn',
            },
          },

          // the properties below are optional
          guardrailConfiguration: {
            guardrailIdentifier: 'guardrailIdentifier',
            guardrailVersion: 'guardrailVersion',
          },
        },
        retrieval: {
          serviceConfiguration: {
            s3: {
              bucketName: 'bucketName',
            },
          },
        },
        storage: {
          serviceConfiguration: {
            s3: {
              bucketName: 'bucketName',
            },
          },
        },
      },
      inputs: [{
        expression: 'expression',
        name: 'name',
        type: 'type',

        // the properties below are optional
        category: 'category',
      }],
      outputs: [{
        name: 'name',
        type: 'type',
      }],
    }],
  },
  definitionS3Location: {
    bucket: 'bucket',
    key: 'key',

    // the properties below are optional
    version: 'version',
  },
  definitionString: 'definitionString',
  definitionSubstitutions: {
    definitionSubstitutionsKey: 'definitionSubstitutions',
  },
  description: 'description',
  tags: {
    tagsKey: 'tags',
  },
  testAliasTags: {
    testAliasTagsKey: 'testAliasTags',
  },
};

Properties ​

customerEncryptionKeyArnoptionalstringcustomer_encryption_key_arnoptionalstrcustomerEncryptionKeyArnoptionalStringCustomerEncryptionKeyArnoptionalstringCustomerEncryptionKeyArnoptional*string#
The Amazon Resource Name (ARN) of the KMS key that the flow is encrypted with.
definitionoptionalIResolvable | CfnFlow.FlowDefinitionPropertydefinitionoptionaltyping.Union[IResolvable, FlowDefinitionProperty]definitionoptionalIResolvableDefinitionoptionalIResolvableDefinitionoptionalinterface{}#
The definition of the nodes and connections between the nodes in the flow.
definitionS3LocationoptionalIResolvable | CfnFlow.S3LocationPropertydefinition_s3_locationoptionaltyping.Union[IResolvable, S3LocationProperty]definitionS3LocationoptionalIResolvableDefinitionS3LocationoptionalIResolvableDefinitionS3Locationoptionalinterface{}#
The Amazon S3 location of the flow definition.
definitionStringoptionalstringdefinition_stringoptionalstrdefinitionStringoptionalStringDefinitionStringoptionalstringDefinitionStringoptional*string#
The definition of the flow as a JSON-formatted string.

The string must match the format in FlowDefinition .

definitionSubstitutionsoptionalIResolvable | { [key: string]: string | number | boolean | IResolvable }definition_substitutionsoptionaltyping.Union[IResolvable, typing.Mapping[str, typing.Union[str, int | float, bool, IResolvable]]]definitionSubstitutionsoptionalIResolvableDefinitionSubstitutionsoptionalIResolvableDefinitionSubstitutionsoptionalinterface{}#
A map that specifies the mappings for placeholder variables in the prompt flow definition.
notes

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,...} .

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
A description of the flow.
executionRoleArnstringexecution_role_arnstrexecutionRoleArnStringExecutionRoleArnstringExecutionRoleArn*stringrequired#
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.

namestringnamestrnameStringNamestringName*stringrequired#
The name of the flow.
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string#
Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.
testAliasTagsoptionalIResolvable | { [key: string]: string }test_alias_tagsoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]testAliasTagsoptionalIResolvableTestAliasTagsoptionalIResolvableTestAliasTagsoptionalinterface{}#
A map of tag keys and values.