Class: AWSCDK::Bedrock::CfnAgent::AgentActionGroupProperty

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

Overview

Contains details of the inline agent's action group.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action_group_name:, action_group_executor: nil, action_group_state: nil, api_schema: nil, description: nil, function_schema: nil, parent_action_group_signature: nil, skip_resource_in_use_check_on_delete: nil) ⇒ AgentActionGroupProperty

Returns a new instance of AgentActionGroupProperty.

Parameters:

  • action_group_name (String)

    The name of the action group.

  • action_group_executor (AWSCDK::IResolvable, AWSCDK::Bedrock::CfnAgent::ActionGroupExecutorProperty, nil) (defaults to: nil)

    The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user.

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

    Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request.

  • api_schema (AWSCDK::IResolvable, AWSCDK::Bedrock::CfnAgent::APISchemaProperty, nil) (defaults to: nil)

    Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML-formatted payload defining the schema.

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

    A description of the action group.

  • function_schema (AWSCDK::IResolvable, AWSCDK::Bedrock::CfnAgent::FunctionSchemaProperty, nil) (defaults to: nil)

    Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema.

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

    If this field is set as AMAZON.UserInput , the agent can request the user for additional information when trying to complete a task. The description , apiSchema , and actionGroupExecutor fields must be blank for this action group.

  • skip_resource_in_use_check_on_delete (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies whether to delete the resource even if it's in use.



972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
# File 'bedrock/cfn_agent.rb', line 972

def initialize(action_group_name:, action_group_executor: nil, action_group_state: nil, api_schema: nil, description: nil, function_schema: nil, parent_action_group_signature: nil, skip_resource_in_use_check_on_delete: nil)
  @action_group_name = action_group_name
  Jsii::Type.check_type(@action_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionGroupName")
  @action_group_executor = action_group_executor.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnAgent::ActionGroupExecutorProperty.new(**action_group_executor.transform_keys(&:to_sym)) : action_group_executor
  Jsii::Type.check_type(@action_group_executor, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkFnZW50LkFjdGlvbkdyb3VwRXhlY3V0b3JQcm9wZXJ0eSJ9XX19")), "actionGroupExecutor") unless @action_group_executor.nil?
  @action_group_state = action_group_state
  Jsii::Type.check_type(@action_group_state, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionGroupState") unless @action_group_state.nil?
  @api_schema = api_schema.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnAgent::APISchemaProperty.new(**api_schema.transform_keys(&:to_sym)) : api_schema
  Jsii::Type.check_type(@api_schema, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkFnZW50LkFQSVNjaGVtYVByb3BlcnR5In1dfX0=")), "apiSchema") unless @api_schema.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @function_schema = function_schema.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnAgent::FunctionSchemaProperty.new(**function_schema.transform_keys(&:to_sym)) : function_schema
  Jsii::Type.check_type(@function_schema, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkFnZW50LkZ1bmN0aW9uU2NoZW1hUHJvcGVydHkifV19fQ==")), "functionSchema") unless @function_schema.nil?
  @parent_action_group_signature = parent_action_group_signature
  Jsii::Type.check_type(@parent_action_group_signature, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "parentActionGroupSignature") unless @parent_action_group_signature.nil?
  @skip_resource_in_use_check_on_delete = skip_resource_in_use_check_on_delete
  Jsii::Type.check_type(@skip_resource_in_use_check_on_delete, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "skipResourceInUseCheckOnDelete") unless @skip_resource_in_use_check_on_delete.nil?
end

Instance Attribute Details

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

The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user.



1000
1001
1002
# File 'bedrock/cfn_agent.rb', line 1000

def action_group_executor
  @action_group_executor
end

#action_group_nameString (readonly)

The name of the action group.



995
996
997
# File 'bedrock/cfn_agent.rb', line 995

def action_group_name
  @action_group_name
end

#action_group_stateString? (readonly)

Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request.



1005
1006
1007
# File 'bedrock/cfn_agent.rb', line 1005

def action_group_state
  @action_group_state
end

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

Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML-formatted payload defining the schema.

For more information, see Action group OpenAPI schemas .



1012
1013
1014
# File 'bedrock/cfn_agent.rb', line 1012

def api_schema
  @api_schema
end

#descriptionString? (readonly)

A description of the action group.



1017
1018
1019
# File 'bedrock/cfn_agent.rb', line 1017

def description
  @description
end

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

Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema.



1022
1023
1024
# File 'bedrock/cfn_agent.rb', line 1022

def function_schema
  @function_schema
end

#parent_action_group_signatureString? (readonly)

If this field is set as AMAZON.UserInput , the agent can request the user for additional information when trying to complete a task. The description , apiSchema , and actionGroupExecutor fields must be blank for this action group.

During orchestration, if the agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information.



1029
1030
1031
# File 'bedrock/cfn_agent.rb', line 1029

def parent_action_group_signature
  @parent_action_group_signature
end

#skip_resource_in_use_check_on_deleteBoolean, ... (readonly)

Note:

Default: - false

Specifies whether to delete the resource even if it's in use.

By default, this value is false .



1037
1038
1039
# File 'bedrock/cfn_agent.rb', line 1037

def skip_resource_in_use_check_on_delete
  @skip_resource_in_use_check_on_delete
end

Class Method Details

.jsii_propertiesObject



1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
# File 'bedrock/cfn_agent.rb', line 1039

def self.jsii_properties
  {
    :action_group_name => "actionGroupName",
    :action_group_executor => "actionGroupExecutor",
    :action_group_state => "actionGroupState",
    :api_schema => "apiSchema",
    :description => "description",
    :function_schema => "functionSchema",
    :parent_action_group_signature => "parentActionGroupSignature",
    :skip_resource_in_use_check_on_delete => "skipResourceInUseCheckOnDelete",
  }
end

Instance Method Details

#to_jsiiObject



1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
# File 'bedrock/cfn_agent.rb', line 1052

def to_jsii
  result = {}
  result.merge!({
    "actionGroupName" => @action_group_name,
    "actionGroupExecutor" => @action_group_executor,
    "actionGroupState" => @action_group_state,
    "apiSchema" => @api_schema,
    "description" => @description,
    "functionSchema" => @function_schema,
    "parentActionGroupSignature" => @parent_action_group_signature,
    "skipResourceInUseCheckOnDelete" => @skip_resource_in_use_check_on_delete,
  })
  result.compact
end