Interface AddRoutesOptions
- All Superinterfaces:
BatchHttpRouteOptions
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AddRoutesOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-17T21:37:25.602Z")
@Stability(Stable)
public interface AddRoutesOptions
extends software.amazon.jsii.JsiiSerializable, BatchHttpRouteOptions
Options for the Route with Integration resource.
Example:
import software.amazon.awscdk.aws_apigatewayv2_integrations.HttpUrlIntegration; import software.amazon.awscdk.aws_apigatewayv2_integrations.HttpLambdaIntegration; Function bookStoreDefaultFn; HttpUrlIntegration getBooksIntegration = new HttpUrlIntegration("GetBooksIntegration", "https://get-books-proxy.example.com"); HttpLambdaIntegration bookStoreDefaultIntegration = new HttpLambdaIntegration("BooksIntegration", bookStoreDefaultFn); HttpApi httpApi = new HttpApi(this, "HttpApi"); httpApi.addRoutes(AddRoutesOptions.builder() .path("/books") .methods(List.of(HttpMethod.GET)) .integration(getBooksIntegration) .build()); httpApi.addRoutes(AddRoutesOptions.builder() .path("/books") .methods(List.of(HttpMethod.ANY)) .integration(bookStoreDefaultIntegration) .build());
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forAddRoutesOptions
static final class
An implementation forAddRoutesOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic AddRoutesOptions.Builder
builder()
The list of OIDC scopes to include in the authorization.default IHttpRouteAuthorizer
Authorizer to be associated to these routes.default List<HttpMethod>
The HTTP methods to be configured.getPath()
The path at which all of these routes are configured.Methods inherited from interface software.amazon.awscdk.services.apigatewayv2.BatchHttpRouteOptions
getIntegration
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getPath
The path at which all of these routes are configured. -
getAuthorizationScopes
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
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
The HTTP methods to be configured.Default: HttpMethod.ANY
-
builder
- Returns:
- a
AddRoutesOptions.Builder
ofAddRoutesOptions
-