Class Gateway.Builder

java.lang.Object
software.amazon.awscdk.services.bedrockagentcore.Gateway.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<Gateway>
Enclosing class:
Gateway

@Stability(Stable) public static final class Gateway.Builder extends Object implements software.amazon.jsii.Builder<Gateway>
A fluent builder for Gateway.
  • Method Details

    • create

      @Stability(Stable) public static Gateway.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Gateway.Builder.
    • authorizerConfiguration

      @Stability(Stable) public Gateway.Builder authorizerConfiguration(IGatewayAuthorizerConfig authorizerConfiguration)
      The authorizer configuration for the gateway.

      Default: - A default authorizer will be created using Cognito

      Parameters:
      authorizerConfiguration - The authorizer configuration for the gateway. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public Gateway.Builder description(String description)
      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

      Parameters:
      description - 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. This parameter is required.
      Returns:
      this
    • exceptionLevel

      @Stability(Stable) public Gateway.Builder exceptionLevel(GatewayExceptionLevel exceptionLevel)
      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

      Parameters:
      exceptionLevel - The verbosity of exception messages Use DEBUG mode to see granular exception messages from a Gateway. This parameter is required.
      Returns:
      this
    • gatewayName

      @Stability(Stable) public Gateway.Builder gatewayName(String gatewayName)
      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

      Parameters:
      gatewayName - 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. This parameter is required.
      Returns:
      this
    • interceptorConfigurations

      @Stability(Stable) public Gateway.Builder interceptorConfigurations(List<? extends IInterceptor> interceptorConfigurations)
      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

      Parameters:
      interceptorConfigurations - Interceptor configurations for the gateway. This parameter is required.
      Returns:
      this
      See Also:
    • kmsKey

      @Stability(Stable) public Gateway.Builder kmsKey(IKey kmsKey)
      The AWS KMS key used to encrypt data associated with the gateway.

      Default: - No encryption

      Parameters:
      kmsKey - The AWS KMS key used to encrypt data associated with the gateway. This parameter is required.
      Returns:
      this
    • protocolConfiguration

      @Stability(Stable) public Gateway.Builder protocolConfiguration(IGatewayProtocolConfig protocolConfiguration)
      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",

      Parameters:
      protocolConfiguration - The protocol configuration for the gateway. This parameter is required.
      Returns:
      this
    • role

      @Stability(Stable) public Gateway.Builder role(IRole role)
      The IAM role that provides permissions for the gateway to access AWS services.

      Default: - A new role will be created

      Parameters:
      role - The IAM role that provides permissions for the gateway to access AWS services. This parameter is required.
      Returns:
      this
    • tags

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

      Default: - No tags

      Parameters:
      tags - Tags for the gateway A list of key:value pairs of tags to apply to this Gateway resource. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public Gateway build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Gateway>
      Returns:
      a newly built instance of Gateway.