Module: AWSCDK::BedrockAgentCore::IInterceptor

Included in:
LambdaInterceptor
Defined in:
bedrock_agent_core/i_interceptor.rb

Overview

Represents an interceptor that can be bound to a Gateway.

Interceptors allow custom code execution at specific points in the gateway request/response flow.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



33
34
35
36
37
38
# File 'bedrock_agent_core/i_interceptor.rb', line 33

def self.jsii_overridable_methods
  {
    :interception_point => { kind: :property, name: "interceptionPoint", is_optional: false },
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

Instance Method Details

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

Binds this interceptor to a Gateway.

This method is called when the interceptor is added to a gateway. It should:

  1. Grant any necessary permissions (e.g., Lambda invoke permissions)
  2. Perform any required setup
  3. Return the CloudFormation configuration

Parameters:

  • scope (Constructs::Construct)

    The construct scope for creating any required resources.

  • gateway (AWSCDK::BedrockAgentCore::IGateway)

    The gateway this interceptor is being bound to [disable-awslint:prefer-ref-interface].

Returns:



27
28
29
30
31
# File 'bedrock_agent_core/i_interceptor.rb', line 27

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

#interception_pointAWSCDK::BedrockAgentCore::InterceptionPoint

The interception point where this interceptor will be invoked.



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

def interception_point()
  jsii_get_property("interceptionPoint")
end