@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-09T19:16:40.664Z") public interface AddRoutesOptions extends 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 java.util.List<java.lang.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 java.util.List<HttpMethod> |
getMethods()
(experimental) The HTTP methods to be configured.
|
java.lang.String |
getPath()
(experimental) The path at which all of these routes are configured.
|
getIntegration
java.lang.String getPath()
default java.util.List<java.lang.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.
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
default java.util.List<HttpMethod> getMethods()
Default: HttpMethod.ANY
static AddRoutesOptions.Builder builder()
builder
in interface BatchHttpRouteOptions
AddRoutesOptions.Builder
of AddRoutesOptions