Class: AWSCDK::Bedrock::CfnAgent::FunctionProperty

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

Overview

Defines parameters that the agent needs to invoke from the user to complete the function.

Corresponds to an action in an action group.

This data type is used in the following API operations:

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, description: nil, parameters: nil, require_confirmation: nil) ⇒ FunctionProperty

Returns a new instance of FunctionProperty.

Parameters:

  • name (String)

    A name for the function.

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

    A description of the function and its purpose.

  • parameters (AWSCDK::IResolvable, Hash{String => AWSCDK::IResolvable, AWSCDK::Bedrock::CfnAgent::ParameterDetailProperty}, nil) (defaults to: nil)

    The parameters that the agent elicits from the user to fulfill the function.

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

    Contains information if user confirmation is required to invoke the function.



1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
# File 'bedrock/cfn_agent.rb', line 1270

def initialize(name:, description: nil, parameters: nil, require_confirmation: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @parameters = parameters
  Jsii::Type.check_type(@parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9jay5DZm5BZ2VudC5QYXJhbWV0ZXJEZXRhaWxQcm9wZXJ0eSJ9XX19LCJraW5kIjoibWFwIn19XX19")), "parameters") unless @parameters.nil?
  @require_confirmation = require_confirmation
  Jsii::Type.check_type(@require_confirmation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "requireConfirmation") unless @require_confirmation.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

A description of the function and its purpose.



1290
1291
1292
# File 'bedrock/cfn_agent.rb', line 1290

def description
  @description
end

#nameString (readonly)

A name for the function.



1285
1286
1287
# File 'bedrock/cfn_agent.rb', line 1285

def name
  @name
end

#parametersAWSCDK::IResolvable, ... (readonly)

The parameters that the agent elicits from the user to fulfill the function.



1295
1296
1297
# File 'bedrock/cfn_agent.rb', line 1295

def parameters
  @parameters
end

#require_confirmationString? (readonly)

Contains information if user confirmation is required to invoke the function.



1300
1301
1302
# File 'bedrock/cfn_agent.rb', line 1300

def require_confirmation
  @require_confirmation
end

Class Method Details

.jsii_propertiesObject



1302
1303
1304
1305
1306
1307
1308
1309
# File 'bedrock/cfn_agent.rb', line 1302

def self.jsii_properties
  {
    :name => "name",
    :description => "description",
    :parameters => "parameters",
    :require_confirmation => "requireConfirmation",
  }
end

Instance Method Details

#to_jsiiObject



1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
# File 'bedrock/cfn_agent.rb', line 1311

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "description" => @description,
    "parameters" => @parameters,
    "requireConfirmation" => @require_confirmation,
  })
  result.compact
end