Interface CfnFlowVersion.IFlowNodeConfigurationProperty
Contains configurations for a node in your flow.
Namespace: Amazon.CDK.AWS.Bedrock
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface CfnFlowVersion.IFlowNodeConfigurationProperty
Syntax (vb)
Public Interface CfnFlowVersion.IFlowNodeConfigurationProperty
Remarks
For more information, see Node types in a flow in the Amazon Bedrock User Guide.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock;
var additionalModelRequestFields;
var collector;
FlowNodeConfigurationProperty flowNodeConfigurationProperty_;
var input;
var iterator;
var loopInput;
var output;
var flowNodeConfigurationProperty = new FlowNodeConfigurationProperty {
Agent = new AgentFlowNodeConfigurationProperty {
AgentAliasArn = "agentAliasArn"
},
Collector = collector,
Condition = new ConditionFlowNodeConfigurationProperty {
Conditions = new [] { new FlowConditionProperty {
Name = "name",
// the properties below are optional
Expression = "expression"
} }
},
InlineCode = new InlineCodeFlowNodeConfigurationProperty {
Code = "code",
Language = "language"
},
Input = input,
Iterator = iterator,
KnowledgeBase = new KnowledgeBaseFlowNodeConfigurationProperty {
KnowledgeBaseId = "knowledgeBaseId",
// the properties below are optional
GuardrailConfiguration = new GuardrailConfigurationProperty {
GuardrailIdentifier = "guardrailIdentifier",
GuardrailVersion = "guardrailVersion"
},
InferenceConfiguration = new PromptInferenceConfigurationProperty {
Text = new PromptModelInferenceConfigurationProperty {
MaxTokens = 123,
StopSequences = new [] { "stopSequences" },
Temperature = 123,
TopP = 123
}
},
ModelId = "modelId",
NumberOfResults = 123,
OrchestrationConfiguration = new KnowledgeBaseOrchestrationConfigurationProperty {
AdditionalModelRequestFields = additionalModelRequestFields,
InferenceConfig = new PromptInferenceConfigurationProperty {
Text = new PromptModelInferenceConfigurationProperty {
MaxTokens = 123,
StopSequences = new [] { "stopSequences" },
Temperature = 123,
TopP = 123
}
},
PerformanceConfig = new PerformanceConfigurationProperty {
Latency = "latency"
},
PromptTemplate = new KnowledgeBasePromptTemplateProperty {
TextPromptTemplate = "textPromptTemplate"
}
},
PromptTemplate = new KnowledgeBasePromptTemplateProperty {
TextPromptTemplate = "textPromptTemplate"
},
RerankingConfiguration = new VectorSearchRerankingConfigurationProperty {
Type = "type",
// the properties below are optional
BedrockRerankingConfiguration = new VectorSearchBedrockRerankingConfigurationProperty {
ModelConfiguration = new VectorSearchBedrockRerankingModelConfigurationProperty {
ModelArn = "modelArn",
// the properties below are optional
AdditionalModelRequestFields = additionalModelRequestFields
},
// the properties below are optional
MetadataConfiguration = new MetadataConfigurationForRerankingProperty {
SelectionMode = "selectionMode",
// the properties below are optional
SelectiveModeConfiguration = new RerankingMetadataSelectiveModeConfigurationProperty {
FieldsToExclude = new [] { new FieldForRerankingProperty {
FieldName = "fieldName"
} },
FieldsToInclude = new [] { new FieldForRerankingProperty {
FieldName = "fieldName"
} }
}
},
NumberOfRerankedResults = 123
}
}
},
LambdaFunction = new LambdaFunctionFlowNodeConfigurationProperty {
LambdaArn = "lambdaArn"
},
Lex = new LexFlowNodeConfigurationProperty {
BotAliasArn = "botAliasArn",
LocaleId = "localeId"
},
Loop = new LoopFlowNodeConfigurationProperty {
Definition = new FlowDefinitionProperty {
Connections = new [] { new FlowConnectionProperty {
Name = "name",
Source = "source",
Target = "target",
Type = "type",
// the properties below are optional
Configuration = new FlowConnectionConfigurationProperty {
Conditional = new FlowConditionalConnectionConfigurationProperty {
Condition = "condition"
},
Data = new FlowDataConnectionConfigurationProperty {
SourceOutput = "sourceOutput",
TargetInput = "targetInput"
}
}
} },
Nodes = new [] { new FlowNodeProperty {
Name = "name",
Type = "type",
// the properties below are optional
Configuration = flowNodeConfigurationProperty_,
Inputs = new [] { new FlowNodeInputProperty {
Expression = "expression",
Name = "name",
Type = "type"
} },
Outputs = new [] { new FlowNodeOutputProperty {
Name = "name",
Type = "type"
} }
} }
}
},
LoopController = new LoopControllerFlowNodeConfigurationProperty {
ContinueCondition = new FlowConditionProperty {
Name = "name",
// the properties below are optional
Expression = "expression"
},
// the properties below are optional
MaxIterations = 123
},
LoopInput = loopInput,
Output = output,
Prompt = new PromptFlowNodeConfigurationProperty {
SourceConfiguration = new PromptFlowNodeSourceConfigurationProperty {
Inline = new PromptFlowNodeInlineConfigurationProperty {
ModelId = "modelId",
TemplateConfiguration = new PromptTemplateConfigurationProperty {
Text = new TextPromptTemplateConfigurationProperty {
Text = "text",
// the properties below are optional
InputVariables = new [] { new PromptInputVariableProperty {
Name = "name"
} }
}
},
TemplateType = "templateType",
// the properties below are optional
InferenceConfiguration = new PromptInferenceConfigurationProperty {
Text = new PromptModelInferenceConfigurationProperty {
MaxTokens = 123,
StopSequences = new [] { "stopSequences" },
Temperature = 123,
TopP = 123
}
}
},
Resource = new PromptFlowNodeResourceConfigurationProperty {
PromptArn = "promptArn"
}
},
// the properties below are optional
GuardrailConfiguration = new GuardrailConfigurationProperty {
GuardrailIdentifier = "guardrailIdentifier",
GuardrailVersion = "guardrailVersion"
}
},
Retrieval = new RetrievalFlowNodeConfigurationProperty {
ServiceConfiguration = new RetrievalFlowNodeServiceConfigurationProperty {
S3 = new RetrievalFlowNodeS3ConfigurationProperty {
BucketName = "bucketName"
}
}
},
Storage = new StorageFlowNodeConfigurationProperty {
ServiceConfiguration = new StorageFlowNodeServiceConfigurationProperty {
S3 = new StorageFlowNodeS3ConfigurationProperty {
BucketName = "bucketName"
}
}
}
};
Synopsis
Properties
| Agent | Contains configurations for an agent node in your flow. |
| Collector | Contains configurations for a collector node in your flow. |
| Condition | Contains configurations for a condition node in your flow. |
| InlineCode | Contains configurations for an inline code node in your flow. |
| Input | Contains configurations for an input flow node in your flow. |
| Iterator | Contains configurations for an iterator node in your flow. |
| KnowledgeBase | Contains configurations for a knowledge base node in your flow. |
| LambdaFunction | Contains configurations for a Lambda function node in your flow. |
| Lex | Contains configurations for a Lex node in your flow. |
| Loop | Contains configurations for a DoWhile loop in your flow. |
| LoopController | Contains controller node configurations for a DoWhile loop in your flow. |
| LoopInput | Contains input node configurations for a DoWhile loop in your flow. |
| Output | Contains configurations for an output flow node in your flow. |
| Prompt | Contains configurations for a prompt node in your flow. |
| Retrieval | Contains configurations for a retrieval node in your flow. |
| Storage | Contains configurations for a storage node in your flow. |
Properties
Agent
Contains configurations for an agent node in your flow.
object? Agent { get; }
Property Value
Remarks
Invokes an alias of an agent and returns the response.
Type union: either IResolvable or CfnFlowVersion.IAgentFlowNodeConfigurationProperty
Collector
Contains configurations for a collector node in your flow.
object? Collector { get; }
Property Value
Remarks
Collects an iteration of inputs and consolidates them into an array of outputs.
Condition
Contains configurations for a condition node in your flow.
object? Condition { get; }
Property Value
Remarks
Defines conditions that lead to different branches of the flow.
Type union: either IResolvable or CfnFlowVersion.IConditionFlowNodeConfigurationProperty
InlineCode
Contains configurations for an inline code node in your flow.
object? InlineCode { get; }
Property Value
Remarks
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.
Type union: either IResolvable or CfnFlowVersion.IInlineCodeFlowNodeConfigurationProperty
Input
Contains configurations for an input flow node in your flow.
object? Input { get; }
Property Value
Remarks
The first node in the flow. inputs can't be specified for this node.
Iterator
Contains configurations for an iterator node in your flow.
object? Iterator { get; }
Property Value
Remarks
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.
KnowledgeBase
Contains configurations for a knowledge base node in your flow.
object? KnowledgeBase { get; }
Property Value
Remarks
Queries a knowledge base and returns the retrieved results or generated response.
Type union: either IResolvable or CfnFlowVersion.IKnowledgeBaseFlowNodeConfigurationProperty
LambdaFunction
Contains configurations for a Lambda function node in your flow.
object? LambdaFunction { get; }
Property Value
Remarks
Invokes an AWS Lambda function.
Type union: either IResolvable or CfnFlowVersion.ILambdaFunctionFlowNodeConfigurationProperty
Lex
Contains configurations for a Lex node in your flow.
object? Lex { get; }
Property Value
Remarks
Invokes an Amazon Lex bot to identify the intent of the input and return the intent as the output.
Type union: either IResolvable or CfnFlowVersion.ILexFlowNodeConfigurationProperty
Loop
Contains configurations for a DoWhile loop in your flow.
object? Loop { get; }
Property Value
Remarks
LoopController
Contains controller node configurations for a DoWhile loop in your flow.
object? LoopController { get; }
Property Value
Remarks
LoopInput
Contains input node configurations for a DoWhile loop in your flow.
object? LoopInput { get; }
Property Value
Remarks
Output
Contains configurations for an output flow node in your flow.
object? Output { get; }
Property Value
Remarks
The last node in the flow. outputs can't be specified for this node.
Prompt
Contains configurations for a prompt node in your flow.
object? Prompt { get; }
Property Value
Remarks
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.
Type union: either IResolvable or CfnFlowVersion.IPromptFlowNodeConfigurationProperty
Retrieval
Contains configurations for a retrieval node in your flow.
object? Retrieval { get; }
Property Value
Remarks
Retrieves data from an Amazon S3 location and returns it as the output.
Type union: either IResolvable or CfnFlowVersion.IRetrievalFlowNodeConfigurationProperty
Storage
Contains configurations for a storage node in your flow.
object? Storage { get; }
Property Value
Remarks
Stores an input in an Amazon S3 location.
Type union: either IResolvable or CfnFlowVersion.IStorageFlowNodeConfigurationProperty