Class: AWSCDK::BedrockAgentCore::SmithyTargetConfiguration

Inherits:
McpTargetConfiguration
  • Object
show all
Defined in:
bedrock_agent_core/smithy_target_configuration.rb

Overview

Configuration for Smithy-based MCP targets.

This configuration exposes a Smithy-modeled API as MCP tools, allowing the gateway to transform Smithy operations into tool calls.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(smithy_model) ⇒ SmithyTargetConfiguration

Returns a new instance of SmithyTargetConfiguration.

Parameters:



12
13
14
15
# File 'bedrock_agent_core/smithy_target_configuration.rb', line 12

def initialize(smithy_model)
  Jsii::Type.check_type(smithy_model, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BcGlTY2hlbWEifQ==")), "smithyModel")
  Jsii::Object.instance_method(:initialize).bind(self).call(smithy_model)
end

Class Method Details

.create(smithy_model) ⇒ AWSCDK::BedrockAgentCore::SmithyTargetConfiguration

Create a Smithy target configuration.

Parameters:

Returns:

  • (AWSCDK::BedrockAgentCore::SmithyTargetConfiguration)

    A new SmithyTargetConfiguration instance



30
31
32
33
# File 'bedrock_agent_core/smithy_target_configuration.rb', line 30

def self.create(smithy_model)
  Jsii::Type.check_type(smithy_model, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BcGlTY2hlbWEifQ==")), "smithyModel")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.SmithyTargetConfiguration", "create", [smithy_model])
end

.jsii_overridable_methodsObject



17
18
19
20
21
22
23
24
# File 'bedrock_agent_core/smithy_target_configuration.rb', line 17

def self.jsii_overridable_methods
  {
    :target_type => { kind: :property, name: "targetType", is_optional: false },
    :smithy_model => { kind: :property, name: "smithyModel", is_optional: false },
    :bind => { kind: :method, name: "bind", is_optional: false },
    :render_mcp_configuration => { kind: :method, name: "renderMcpConfiguration", is_optional: false },
  }
end

Instance Method Details

#bind(scope, gateway) ⇒ AWSCDK::BedrockAgentCore::TargetConfigurationConfig

Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the Smithy model.

Parameters:

Returns:



54
55
56
57
58
# File 'bedrock_agent_core/smithy_target_configuration.rb', line 54

def bind(scope, gateway)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(gateway, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5JR2F0ZXdheSJ9")), "gateway")
  jsii_call_method("bind", [scope, gateway])
end

#render_mcp_configurationObject

Renders the MCP-specific configuration.

Returns:

  • (Object)


63
64
65
# File 'bedrock_agent_core/smithy_target_configuration.rb', line 63

def render_mcp_configuration()
  jsii_call_method("renderMcpConfiguration", [])
end

#smithy_modelAWSCDK::BedrockAgentCore::APISchema

The Smithy model that defines the API.



45
46
47
# File 'bedrock_agent_core/smithy_target_configuration.rb', line 45

def smithy_model()
  jsii_get_property("smithyModel")
end

#target_typeAWSCDK::BedrockAgentCore::McpTargetType

The target type.



38
39
40
# File 'bedrock_agent_core/smithy_target_configuration.rb', line 38

def target_type()
  jsii_get_property("targetType")
end