Interface GatewayTargetProps

All Superinterfaces:
GatewayTargetCommonProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
GatewayTargetProps.Jsii$Proxy

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

Example:

 Gateway gateway = Gateway.Builder.create(this, "MyGateway")
         .gatewayName("my-gateway")
         .build();
 Function myLambdaFunction = Function.Builder.create(this, "MyFunction")
         .runtime(Runtime.NODEJS_22_X)
         .handler("index.handler")
         .code(Code.fromInline("\n    exports.handler = async (event) => ({ statusCode: 200 });\n  "))
         .build();
 InlineToolSchema myToolSchema = ToolSchema.fromInline(List.of(ToolDefinition.builder()
         .name("my_tool")
         .description("My custom tool")
         .inputSchema(SchemaDefinition.builder()
                 .type(SchemaDefinitionType.OBJECT)
                 .properties(Map.of())
                 .build())
         .build()));
 // Create a custom Lambda configuration
 LambdaTargetConfiguration customConfig = LambdaTargetConfiguration.create(myLambdaFunction, myToolSchema);
 // Use the GatewayTarget constructor directly
 GatewayTarget target = GatewayTarget.Builder.create(this, "AdvancedTarget")
         .gateway(gateway)
         .gatewayTargetName("advanced-target")
         .targetConfiguration(customConfig) // Manually created configuration
         .credentialProviderConfigurations(List.of(GatewayCredentialProvider.fromIamRole()))
         .build();
 
  • Method Details

    • getGateway

      @Stability(Stable) @NotNull IGateway getGateway()
      The gateway this target belongs to.
    • getTargetConfiguration

      @Stability(Stable) @NotNull ITargetConfiguration getTargetConfiguration()
      The target configuration (Lambda, OpenAPI, or Smithy) Use one of the configuration helper classes: - LambdaTargetConfiguration.create() - OpenApiTargetConfiguration.create() - SmithyTargetConfiguration.create().
    • getCredentialProviderConfigurations

      @Stability(Stable) @Nullable default List<ICredentialProviderConfig> getCredentialProviderConfigurations()
      Credential providers for authentication.

      Default: - [GatewayCredentialProvider.fromIamRole()]

    • builder

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