Interface AddApiGatewayTargetOptions

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

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-19T08:18:44.195Z") @Stability(Stable) public interface AddApiGatewayTargetOptions extends software.amazon.jsii.JsiiSerializable
Options for adding an API Gateway target to a gateway.

Example:

 Gateway gateway = Gateway.Builder.create(this, "MyGateway")
         .gatewayName("my-gateway")
         .build();
 RestApi api = RestApi.Builder.create(this, "MyApi")
         .restApiName("my-api")
         .build();
 // Uses IAM authorization for outbound auth by default
 GatewayTarget apiGatewayTarget = gateway.addApiGatewayTarget("MyApiGatewayTarget", AddApiGatewayTargetOptions.builder()
         .restApi(api)
         .apiGatewayToolConfiguration(ApiGatewayToolConfiguration.builder()
                 .toolFilters(List.of(ApiGatewayToolFilter.builder()
                         .filterPath("/pets/*")
                         .methods(List.of(ApiGatewayHttpMethod.GET))
                         .build()))
                 .build())
         .build());
 
  • Method Details

    • getApiGatewayToolConfiguration

      @Stability(Stable) @NotNull ApiGatewayToolConfiguration getApiGatewayToolConfiguration()
      Tool configuration defining which operations to expose.
    • getRestApi

      @Stability(Stable) @NotNull IRestApi getRestApi()
      The REST API to integrate with Must be in the same account and region as the gateway [disable-awslint:prefer-ref-interface].
    • getCredentialProviderConfigurations

      @Stability(Stable) @Nullable default List<ICredentialProviderConfig> getCredentialProviderConfigurations()
      Credential providers for authentication API Gateway targets support IAM and API key authentication.

      Default: - Empty array (service handles IAM automatically)

    • getDescription

      @Stability(Stable) @Nullable default String getDescription()
      Optional description for the gateway target.

      Default: - No description

    • getGatewayTargetName

      @Stability(Stable) @Nullable default String getGatewayTargetName()
      The name of the gateway target Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen).

      Default: - auto generate

    • getMetadataConfiguration

      @Stability(Stable) @Nullable default MetadataConfiguration getMetadataConfiguration()
      Metadata configuration for passing headers and query parameters Allows you to pass additional context through headers and query parameters.

      Default: - No metadata configuration

    • getStage

      @Stability(Stable) @Nullable default String getStage()
      The stage name of the REST API.

      Default: - Uses the deployment stage from the RestApi (restApi.deploymentStage.stageName)

    • builder

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