Class CfnFlowPropsMixin
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.bedrock.CfnFlowPropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)",
date="2026-03-11T13:19:56.512Z")
@Stability(Stable)
public class CfnFlowPropsMixin
extends Mixin
implements software.constructs.IMixin
Creates a prompt flow that you can use to send an input through various steps to yield an output.
You define a flow by configuring nodes, each of which corresponds to a step of the flow, and creating connections between the nodes to create paths to different outputs. You can define the flow in one of the following ways:
- Define a FlowDefinition in the
Definitionproperty. - Provide the definition in the
DefinitionStringproperty as a JSON-formatted string matching the FlowDefinition property. - Provide an Amazon S3 location in the
DefinitionS3Locationproperty that matches the FlowDefinition .
If you use the DefinitionString or DefinitionS3Location property, you can use the DefinitionSubstitutions property to define key-value pairs to replace at runtime.
For more information, see How it works and Create a prompt flow in Amazon Bedrock in the Amazon Bedrock User Guide.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cfnpropertymixins.services.bedrock.*;
import software.amazon.awscdk.*;
Object additionalModelRequestFields;
Object collector;
FlowDefinitionProperty flowDefinitionProperty_;
Object input;
Object iterator;
Object loopInput;
IMergeStrategy mergeStrategy;
Object output;
CfnFlowPropsMixin cfnFlowPropsMixin = CfnFlowPropsMixin.Builder.create(CfnFlowMixinProps.builder()
.customerEncryptionKeyArn("customerEncryptionKeyArn")
.definition(FlowDefinitionProperty.builder()
.connections(List.of(FlowConnectionProperty.builder()
.configuration(FlowConnectionConfigurationProperty.builder()
.conditional(FlowConditionalConnectionConfigurationProperty.builder()
.condition("condition")
.build())
.data(FlowDataConnectionConfigurationProperty.builder()
.sourceOutput("sourceOutput")
.targetInput("targetInput")
.build())
.build())
.name("name")
.source("source")
.target("target")
.type("type")
.build()))
.nodes(List.of(FlowNodeProperty.builder()
.configuration(FlowNodeConfigurationProperty.builder()
.agent(AgentFlowNodeConfigurationProperty.builder()
.agentAliasArn("agentAliasArn")
.build())
.collector(collector)
.condition(ConditionFlowNodeConfigurationProperty.builder()
.conditions(List.of(FlowConditionProperty.builder()
.expression("expression")
.name("name")
.build()))
.build())
.inlineCode(InlineCodeFlowNodeConfigurationProperty.builder()
.code("code")
.language("language")
.build())
.input(input)
.iterator(iterator)
.knowledgeBase(KnowledgeBaseFlowNodeConfigurationProperty.builder()
.guardrailConfiguration(GuardrailConfigurationProperty.builder()
.guardrailIdentifier("guardrailIdentifier")
.guardrailVersion("guardrailVersion")
.build())
.inferenceConfiguration(PromptInferenceConfigurationProperty.builder()
.text(PromptModelInferenceConfigurationProperty.builder()
.maxTokens(123)
.stopSequences(List.of("stopSequences"))
.temperature(123)
.topP(123)
.build())
.build())
.knowledgeBaseId("knowledgeBaseId")
.modelId("modelId")
.numberOfResults(123)
.orchestrationConfiguration(KnowledgeBaseOrchestrationConfigurationProperty.builder()
.additionalModelRequestFields(additionalModelRequestFields)
.inferenceConfig(PromptInferenceConfigurationProperty.builder()
.text(PromptModelInferenceConfigurationProperty.builder()
.maxTokens(123)
.stopSequences(List.of("stopSequences"))
.temperature(123)
.topP(123)
.build())
.build())
.performanceConfig(PerformanceConfigurationProperty.builder()
.latency("latency")
.build())
.promptTemplate(KnowledgeBasePromptTemplateProperty.builder()
.textPromptTemplate("textPromptTemplate")
.build())
.build())
.promptTemplate(KnowledgeBasePromptTemplateProperty.builder()
.textPromptTemplate("textPromptTemplate")
.build())
.rerankingConfiguration(VectorSearchRerankingConfigurationProperty.builder()
.bedrockRerankingConfiguration(VectorSearchBedrockRerankingConfigurationProperty.builder()
.metadataConfiguration(MetadataConfigurationForRerankingProperty.builder()
.selectionMode("selectionMode")
.selectiveModeConfiguration(RerankingMetadataSelectiveModeConfigurationProperty.builder()
.fieldsToExclude(List.of(FieldForRerankingProperty.builder()
.fieldName("fieldName")
.build()))
.fieldsToInclude(List.of(FieldForRerankingProperty.builder()
.fieldName("fieldName")
.build()))
.build())
.build())
.modelConfiguration(VectorSearchBedrockRerankingModelConfigurationProperty.builder()
.additionalModelRequestFields(additionalModelRequestFields)
.modelArn("modelArn")
.build())
.numberOfRerankedResults(123)
.build())
.type("type")
.build())
.build())
.lambdaFunction(LambdaFunctionFlowNodeConfigurationProperty.builder()
.lambdaArn("lambdaArn")
.build())
.lex(LexFlowNodeConfigurationProperty.builder()
.botAliasArn("botAliasArn")
.localeId("localeId")
.build())
.loop(LoopFlowNodeConfigurationProperty.builder()
.definition(flowDefinitionProperty_)
.build())
.loopController(LoopControllerFlowNodeConfigurationProperty.builder()
.continueCondition(FlowConditionProperty.builder()
.expression("expression")
.name("name")
.build())
.maxIterations(123)
.build())
.loopInput(loopInput)
.output(output)
.prompt(PromptFlowNodeConfigurationProperty.builder()
.guardrailConfiguration(GuardrailConfigurationProperty.builder()
.guardrailIdentifier("guardrailIdentifier")
.guardrailVersion("guardrailVersion")
.build())
.sourceConfiguration(PromptFlowNodeSourceConfigurationProperty.builder()
.inline(PromptFlowNodeInlineConfigurationProperty.builder()
.inferenceConfiguration(PromptInferenceConfigurationProperty.builder()
.text(PromptModelInferenceConfigurationProperty.builder()
.maxTokens(123)
.stopSequences(List.of("stopSequences"))
.temperature(123)
.topP(123)
.build())
.build())
.modelId("modelId")
.templateConfiguration(PromptTemplateConfigurationProperty.builder()
.text(TextPromptTemplateConfigurationProperty.builder()
.inputVariables(List.of(PromptInputVariableProperty.builder()
.name("name")
.build()))
.text("text")
.build())
.build())
.templateType("templateType")
.build())
.resource(PromptFlowNodeResourceConfigurationProperty.builder()
.promptArn("promptArn")
.build())
.build())
.build())
.retrieval(RetrievalFlowNodeConfigurationProperty.builder()
.serviceConfiguration(RetrievalFlowNodeServiceConfigurationProperty.builder()
.s3(RetrievalFlowNodeS3ConfigurationProperty.builder()
.bucketName("bucketName")
.build())
.build())
.build())
.storage(StorageFlowNodeConfigurationProperty.builder()
.serviceConfiguration(StorageFlowNodeServiceConfigurationProperty.builder()
.s3(StorageFlowNodeS3ConfigurationProperty.builder()
.bucketName("bucketName")
.build())
.build())
.build())
.build())
.inputs(List.of(FlowNodeInputProperty.builder()
.category("category")
.expression("expression")
.name("name")
.type("type")
.build()))
.name("name")
.outputs(List.of(FlowNodeOutputProperty.builder()
.name("name")
.type("type")
.build()))
.type("type")
.build()))
.build())
.definitionS3Location(S3LocationProperty.builder()
.bucket("bucket")
.key("key")
.version("version")
.build())
.definitionString("definitionString")
.definitionSubstitutions(Map.of(
"definitionSubstitutionsKey", "definitionSubstitutions"))
.description("description")
.executionRoleArn("executionRoleArn")
.name("name")
.tags(Map.of(
"tagsKey", "tags"))
.testAliasTags(Map.of(
"testAliasTagsKey", "testAliasTags"))
.build())
.strategy(mergeStrategy)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDefines an agent node in your flow.static final classA fluent builder forCfnFlowPropsMixin.static interfaceDefines a condition node in your flow.static interfaceSpecifies a field to be used during the reranking process in a Knowledge Base vector search.static interfaceThe configuration of a connection between a condition node and another node.static interfaceDefines a condition in the condition node.static interfaceThe configuration of the connection.static interfaceContains information about a connection between two nodes in the flow.static interfaceThe configuration of a connection originating from a node that isn't a Condition node.static interfaceThe definition of the nodes and connections between nodes in the flow.static interfaceContains configurations for a node in your flow.static interfaceContains configurations for an input in an Amazon Bedrock Flows node.static interfaceContains configurations for an output from a node.static interfaceContains configurations about a node in the flow.static interfaceContains information about validation of the flow.static interfaceConfiguration information for a guardrail that you use with the Converse operation.static interfaceContains configurations for an inline code node in your flow.static interfaceContains configurations for a knowledge base node in a flow.static interfaceConfigures how the knowledge base orchestrates the retrieval and generation process, allowing for customization of prompts, inference parameters, and performance settings.static interfaceDefines a custom prompt template for orchestrating the retrieval and generation process.static interfaceContains configurations for a Lambda function node in the flow.static interfaceContains configurations for a Lex node in the flow.static interfaceContains configurations for the controller node of a DoWhile loop in the flow.static interfaceContains configurations for the nodes of a DoWhile loop in your flow.static interfaceConfiguration for how metadata should be used during the reranking process in Knowledge Base vector searches.static interfacePerformance settings for a model.static interfaceContains configurations for a prompt node in the flow.static interfaceContains configurations for a prompt defined inline in the node.static interfaceContains configurations for a prompt from Prompt management to use in a node.static interfaceContains configurations for a prompt and whether it is from Prompt management or defined inline.static interfaceContains inference configurations for the prompt.static interfaceContains information about a variable in the prompt.static interfaceContains inference configurations related to model inference for a prompt.static interfaceContains the message for a prompt.static interfaceConfiguration for selectively including or excluding metadata fields during the reranking process.static interfaceContains configurations for a Retrieval node in a flow.static interfaceContains configurations for the Amazon S3 location from which to retrieve data to return as the output from the node.static interfaceContains configurations for the service to use for retrieving data to return as the output from the node.static interfaceThe S3 location of the flow definition.static interfaceContains configurations for a Storage node in a flow.static interfaceContains configurations for the Amazon S3 location in which to store the input into the node.static interfaceContains configurations for the service to use for storing the input into the node.static interfaceContains configurations for a text prompt template.static interfaceConfiguration for using Amazon Bedrock foundation models to rerank Knowledge Base vector search results.static interfaceConfiguration for the Amazon Bedrock foundation model used for reranking vector search results.static interfaceConfiguration for reranking vector search results to improve relevance.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::Bedrock::Flow.CfnFlowPropsMixin(CfnFlowMixinProps props, CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::Bedrock::Flow.protectedCfnFlowPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnFlowPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnFlowMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_PROPERTY_KEYS
-
-
Constructor Details
-
CfnFlowPropsMixin
protected CfnFlowPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
CfnFlowPropsMixin
protected CfnFlowPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnFlowPropsMixin
@Stability(Stable) public CfnFlowPropsMixin(@NotNull CfnFlowMixinProps props, @Nullable CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::Bedrock::Flow.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnFlowPropsMixin
Create a mixin to apply properties toAWS::Bedrock::Flow.- Parameters:
props- L1 properties to apply. This parameter is required.
-
-
Method Details
-
applyTo
@Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct) Apply the mixin properties to the construct. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-