@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:01.900Z") @Stability(value=Experimental) public interface AddRoutesOptions extends software.amazon.jsii.JsiiSerializable, BatchHttpRouteOptions
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());
| Modifier and Type | Interface and Description |
|---|---|
static class |
AddRoutesOptions.Builder
A builder for
AddRoutesOptions |
static class |
AddRoutesOptions.Jsii$Proxy
An implementation for
AddRoutesOptions |
| Modifier and Type | Method and Description |
|---|---|
static AddRoutesOptions.Builder |
builder() |
default List<String> |
getAuthorizationScopes()
(experimental) The list of OIDC scopes to include in the authorization.
|
default IHttpRouteAuthorizer |
getAuthorizer()
(experimental) Authorizer to be associated to these routes.
|
default List<HttpMethod> |
getMethods()
(experimental) The HTTP methods to be configured.
|
String |
getPath()
(experimental) The path at which all of these routes are configured.
|
getIntegration@Stability(value=Experimental) @NotNull String getPath()
@Stability(value=Experimental) @Nullable default List<String> getAuthorizationScopes()
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.
@Stability(value=Experimental) @Nullable default IHttpRouteAuthorizer getAuthorizer()
Use NoneAuthorizer to remove the default authorizer for the api
Default: - uses the default authorizer if one is specified on the HttpApi
@Stability(value=Experimental) @Nullable default List<HttpMethod> getMethods()
Default: HttpMethod.ANY
@Stability(value=Experimental) static AddRoutesOptions.Builder builder()
builder in interface BatchHttpRouteOptionsAddRoutesOptions.Builder of AddRoutesOptionsCopyright © 2022. All rights reserved.