Interface AddRoutesOptions

All Superinterfaces:
BatchHttpRouteOptions, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
AddRoutesOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:43.129Z") @Stability(Experimental) public interface AddRoutesOptions extends software.amazon.jsii.JsiiSerializable, BatchHttpRouteOptions
(experimental) Options for the Route with Integration resource.

Example:

 import software.amazon.awscdk.services.apigatewayv2.authorizers.HttpLambdaAuthorizer;
 import software.amazon.awscdk.services.apigatewayv2.authorizers.HttpLambdaResponseType;
 import software.amazon.awscdk.services.apigatewayv2.integrations.HttpUrlIntegration;
 // This function handles your auth logic
 Function authHandler;
 HttpLambdaAuthorizer authorizer = HttpLambdaAuthorizer.Builder.create("BooksAuthorizer", authHandler)
         .responseTypes(List.of(HttpLambdaResponseType.SIMPLE))
         .build();
 HttpApi api = new HttpApi(this, "HttpApi");
 api.addRoutes(AddRoutesOptions.builder()
         .integration(new HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.myproxy.internal"))
         .path("/books")
         .authorizer(authorizer)
         .build());
 
  • Method Details

    • getPath

      @Stability(Experimental) @NotNull String getPath()
      (experimental) The path at which all of these routes are configured.
    • getAuthorizationScopes

      @Stability(Experimental) @Nullable default List<String> getAuthorizationScopes()
      (experimental) The list of OIDC scopes to include in the authorization.

      These scopes will override the default authorization scopes on the gateway. Set to [] to remove default scopes

      Default: - uses defaultAuthorizationScopes if configured on the API, otherwise none.

    • getAuthorizer

      @Stability(Experimental) @Nullable default IHttpRouteAuthorizer getAuthorizer()
      (experimental) Authorizer to be associated to these routes.

      Use NoneAuthorizer to remove the default authorizer for the api

      Default: - uses the default authorizer if one is specified on the HttpApi

    • getMethods

      @Stability(Experimental) @Nullable default List<HttpMethod> getMethods()
      (experimental) The HTTP methods to be configured.

      Default: HttpMethod.ANY

    • builder

      @Stability(Experimental) static AddRoutesOptions.Builder builder()
      Returns:
      a AddRoutesOptions.Builder of AddRoutesOptions