Class: AWSCDK::Bedrock::CfnFlow::FlowNodeInputProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock/cfn_flow.rb

Overview

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expression:, name:, type:, category: nil) ⇒ FlowNodeInputProperty

Returns a new instance of FlowNodeInputProperty.

Parameters:

  • expression (String)

    An expression that formats the input for the node.

  • name (String)

    Specifies a name for the input that you can reference.

  • type (String)

    Specifies the data type of the input.

  • category (String, nil) (defaults to: nil)

    Specifies how input data flows between iterations in a DoWhile loop.



1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
# File 'bedrock/cfn_flow.rb', line 1305

def initialize(expression:, name:, type:, category: nil)
  @expression = expression
  Jsii::Type.check_type(@expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "expression")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @category = category
  Jsii::Type.check_type(@category, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "category") unless @category.nil?
end

Instance Attribute Details

#categoryString? (readonly)

Specifies how input data flows between iterations in a DoWhile loop.

  • LoopCondition - Controls whether the loop continues by evaluating condition expressions against the input data. Use this category to define the condition that determines if the loop should continue.
  • ReturnValueToLoopStart - Defines data to pass back to the start of the loop's next iteration. Use this category for variables that you want to update for each loop iteration.
  • ExitLoop - Defines the value that's available once the loop ends. Use this category to expose loop results to nodes outside the loop.


1343
1344
1345
# File 'bedrock/cfn_flow.rb', line 1343

def category
  @category
end

#expressionString (readonly)

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 .



1322
1323
1324
# File 'bedrock/cfn_flow.rb', line 1322

def expression
  @expression
end

#nameString (readonly)

Specifies a name for the input that you can reference.



1327
1328
1329
# File 'bedrock/cfn_flow.rb', line 1327

def name
  @name
end

#typeString (readonly)

Specifies the data type of the input.

If the input doesn't match this type at runtime, a validation error will be thrown.



1334
1335
1336
# File 'bedrock/cfn_flow.rb', line 1334

def type
  @type
end

Class Method Details

.jsii_propertiesObject



1345
1346
1347
1348
1349
1350
1351
1352
# File 'bedrock/cfn_flow.rb', line 1345

def self.jsii_properties
  {
    :expression => "expression",
    :name => "name",
    :type => "type",
    :category => "category",
  }
end

Instance Method Details

#to_jsiiObject



1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
# File 'bedrock/cfn_flow.rb', line 1354

def to_jsii
  result = {}
  result.merge!({
    "expression" => @expression,
    "name" => @name,
    "type" => @type,
    "category" => @category,
  })
  result.compact
end