Class: AWSCDK::BedrockAgentCore::APIGatewayTargetConfiguration
- Inherits:
-
McpTargetConfiguration
- Object
- McpTargetConfiguration
- AWSCDK::BedrockAgentCore::APIGatewayTargetConfiguration
- Defined in:
- bedrock_agent_core/api_gateway_target_configuration.rb
Overview
Configuration for API Gateway-based MCP targets.
This configuration connects your gateway to an Amazon API Gateway REST API stage. The gateway translates incoming MCP requests into HTTP requests to your REST API and handles response formatting.
Key considerations:
- API must be in the same account and region as the gateway
- Only REST APIs are supported (no HTTP or WebSocket APIs)
- API must use a public endpoint type
- Methods with both AWS_IAM authorization and API key requirements are not supported
- Proxy resources (e.g.,
/pets/{proxy+}) are not supported
Class Method Summary collapse
-
.create(props) ⇒ AWSCDK::BedrockAgentCore::APIGatewayTargetConfiguration
Create an API Gateway target configuration.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#api_gateway_tool_configuration ⇒ AWSCDK::BedrockAgentCore::APIGatewayToolConfiguration
Tool configuration for the API Gateway target.
-
#bind(_scope, gateway) ⇒ AWSCDK::BedrockAgentCore::TargetConfigurationConfig
Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the API Gateway.
-
#initialize(props) ⇒ APIGatewayTargetConfiguration
constructor
A new instance of APIGatewayTargetConfiguration.
-
#metadata_configuration ⇒ AWSCDK::BedrockAgentCore::MetadataConfiguration?
Metadata configuration for the API Gateway target.
-
#render_mcp_configuration ⇒ Object
Renders the MCP-specific configuration.
-
#rest_api_id ⇒ String
The ID of the REST API.
-
#stage ⇒ String
The stage name of the REST API.
-
#target_type ⇒ AWSCDK::BedrockAgentCore::McpTargetType
The target type.
Constructor Details
#initialize(props) ⇒ APIGatewayTargetConfiguration
Returns a new instance of APIGatewayTargetConfiguration.
21 22 23 24 25 |
# File 'bedrock_agent_core/api_gateway_target_configuration.rb', line 21 def initialize(props) props = props.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::APIGatewayTargetConfigurationProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BcGlHYXRld2F5VGFyZ2V0Q29uZmlndXJhdGlvblByb3BzIn0=")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(props) end |
Class Method Details
.create(props) ⇒ AWSCDK::BedrockAgentCore::APIGatewayTargetConfiguration
Create an API Gateway target configuration.
43 44 45 46 47 |
# File 'bedrock_agent_core/api_gateway_target_configuration.rb', line 43 def self.create(props) props = props.is_a?(Hash) ? ::AWSCDK::BedrockAgentCore::APIGatewayTargetConfigurationProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9ja2FnZW50Y29yZS5BcGlHYXRld2F5VGFyZ2V0Q29uZmlndXJhdGlvblByb3BzIn0=")), "props") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_bedrockagentcore.ApiGatewayTargetConfiguration", "create", [props]) end |
.jsii_overridable_methods ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'bedrock_agent_core/api_gateway_target_configuration.rb', line 27 def self.jsii_overridable_methods { :target_type => { kind: :property, name: "targetType", is_optional: false }, :api_gateway_tool_configuration => { kind: :property, name: "apiGatewayToolConfiguration", is_optional: false }, :rest_api_id => { kind: :property, name: "restApiId", is_optional: false }, :stage => { kind: :property, name: "stage", is_optional: false }, :metadata_configuration => { kind: :property, name: "metadataConfiguration", is_optional: true }, :bind => { kind: :method, name: "bind", is_optional: false }, :render_mcp_configuration => { kind: :method, name: "renderMcpConfiguration", is_optional: false }, } end |
Instance Method Details
#api_gateway_tool_configuration ⇒ AWSCDK::BedrockAgentCore::APIGatewayToolConfiguration
Tool configuration for the API Gateway target.
59 60 61 |
# File 'bedrock_agent_core/api_gateway_target_configuration.rb', line 59 def api_gateway_tool_configuration() jsii_get_property("apiGatewayToolConfiguration") end |
#bind(_scope, gateway) ⇒ AWSCDK::BedrockAgentCore::TargetConfigurationConfig
Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the API Gateway.
89 90 91 92 93 |
# File 'bedrock_agent_core/api_gateway_target_configuration.rb', line 89 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 |
#metadata_configuration ⇒ AWSCDK::BedrockAgentCore::MetadataConfiguration?
Metadata configuration for the API Gateway target.
80 81 82 |
# File 'bedrock_agent_core/api_gateway_target_configuration.rb', line 80 def () jsii_get_property("metadataConfiguration") end |
#render_mcp_configuration ⇒ Object
Renders the MCP-specific configuration.
98 99 100 |
# File 'bedrock_agent_core/api_gateway_target_configuration.rb', line 98 def render_mcp_configuration() jsii_call_method("renderMcpConfiguration", []) end |
#rest_api_id ⇒ String
The ID of the REST API.
66 67 68 |
# File 'bedrock_agent_core/api_gateway_target_configuration.rb', line 66 def rest_api_id() jsii_get_property("restApiId") end |
#stage ⇒ String
The stage name of the REST API.
73 74 75 |
# File 'bedrock_agent_core/api_gateway_target_configuration.rb', line 73 def stage() jsii_get_property("stage") end |
#target_type ⇒ AWSCDK::BedrockAgentCore::McpTargetType
The target type.
52 53 54 |
# File 'bedrock_agent_core/api_gateway_target_configuration.rb', line 52 def target_type() jsii_get_property("targetType") end |