Interface GatewayProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
GatewayProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-19T08:18:44.411Z") @Stability(Stable) public interface GatewayProps extends software.amazon.jsii.JsiiSerializable
Properties for defining a Gateway.

Example:

 Gateway gateway = Gateway.Builder.create(this, "MyGateway")
         .gatewayName("my-gateway")
         .build();
 Function lambdaFunction = Function.Builder.create(this, "MyFunction")
         .runtime(Runtime.NODEJS_22_X)
         .handler("index.handler")
         .code(Code.fromInline("\n        exports.handler = async (event) => {\n            return {\n                statusCode: 200,\n                body: JSON.stringify({ message: 'Hello from Lambda!' })\n            };\n        };\n    "))
         .build();
 // Create a gateway target with Lambda and tool schema
 GatewayTarget target = GatewayTarget.forLambda(this, "MyLambdaTarget", GatewayTargetLambdaProps.builder()
         .gatewayTargetName("my-lambda-target")
         .description("Target for Lambda function integration")
         .gateway(gateway)
         .lambdaFunction(lambdaFunction)
         .toolSchema(ToolSchema.fromLocalAsset(path.join(__dirname, "schemas", "my-tool-schema.json")))
         .build());
 
  • Method Details

    • getAuthorizerConfiguration

      @Stability(Stable) @Nullable default IGatewayAuthorizerConfig getAuthorizerConfiguration()
      The authorizer configuration for the gateway.

      Default: - A default authorizer will be created using Cognito

    • getDescription

      @Stability(Stable) @Nullable default String getDescription()
      Optional description for the gateway Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.

      Default: - No description

    • getExceptionLevel

      @Stability(Stable) @Nullable default GatewayExceptionLevel getExceptionLevel()
      The verbosity of exception messages Use DEBUG mode to see granular exception messages from a Gateway.

      Default: - Exception messages are sanitized for presentation to end users

    • getGatewayName

      @Stability(Stable) @Nullable default String getGatewayName()
      The name of the gateway Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen) The name must be unique within your account.

      Default: - auto generate

    • getInterceptorConfigurations

      @Stability(Stable) @Nullable default List<IInterceptor> getInterceptorConfigurations()
      Interceptor configurations for the gateway.

      Interceptors allow you to run custom code during each gateway invocation:

      • REQUEST interceptors execute before the gateway calls the target
      • RESPONSE interceptors execute after the target responds

      A gateway can have at most one REQUEST interceptor and one RESPONSE interceptor.

      Default: - No interceptors

      See Also:
    • getKmsKey

      @Stability(Stable) @Nullable default IKey getKmsKey()
      The AWS KMS key used to encrypt data associated with the gateway.

      Default: - No encryption

    • getProtocolConfiguration

      @Stability(Stable) @Nullable default IGatewayProtocolConfig getProtocolConfiguration()
      The protocol configuration for the gateway.

      Default: - A default protocol configuration will be created using MCP with following params supportedVersions: [MCPProtocolVersion.MCP_2025_03_26], searchType: McpGatewaySearchType.SEMANTIC, instructions: "Default gateway to connect to external MCP tools",

    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      The IAM role that provides permissions for the gateway to access AWS services.

      Default: - A new role will be created

    • getTags

      @Stability(Stable) @Nullable default Map<String,String> getTags()
      Tags for the gateway A list of key:value pairs of tags to apply to this Gateway resource.

      Default: - No tags

    • builder

      @Stability(Stable) static GatewayProps.Builder builder()
      Returns:
      a GatewayProps.Builder of GatewayProps