@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.180Z") @Stability(value=Stable) public interface LambdaRestApiProps extends software.amazon.jsii.JsiiSerializable, RestApiProps
Function backend;
LambdaRestApi api = LambdaRestApi.Builder.create(this, "myapi")
.handler(backend)
.proxy(false)
.build();
Resource items = api.root.addResource("items");
items.addMethod("GET"); // GET /items
items.addMethod("POST"); // POST /items
Resource item = items.addResource("{item}");
item.addMethod("GET"); // GET /items/{item}
// the default integration for methods is "handler", but one can
// customize this behavior per method or even a sub path.
item.addMethod("DELETE", new HttpIntegration("http://amazon.com"));
| Modifier and Type | Interface and Description |
|---|---|
static class |
LambdaRestApiProps.Builder
A builder for
LambdaRestApiProps |
static class |
LambdaRestApiProps.Jsii$Proxy
An implementation for
LambdaRestApiProps |
| Modifier and Type | Method and Description |
|---|---|
static LambdaRestApiProps.Builder |
builder() |
IFunction |
getHandler()
The default Lambda function that handles all requests from this API.
|
default LambdaIntegrationOptions |
getIntegrationOptions()
Specific Lambda integration options.
|
default Boolean |
getProxy()
If true, route all requests to the Lambda Function.
|
getApiKeySourceType, getBinaryMediaTypes, getCloneFrom, getEndpointConfiguration, getMinimumCompressionSizegetDefaultCorsPreflightOptions, getDefaultIntegration, getDefaultMethodOptionsgetCloudWatchRole, getDeploy, getDeployOptions, getDescription, getDisableExecuteApiEndpoint, getDomainName, getEndpointExportName, getEndpointTypes, getFailOnWarnings, getParameters, getPolicy, getRestApiName, getRetainDeployments@Stability(value=Stable) @NotNull IFunction getHandler()
This handler will be used as a the default integration for all methods in
this API, unless specified otherwise in addMethod.
@Stability(value=Stable) @Nullable default LambdaIntegrationOptions getIntegrationOptions()
Default: see defaults defined in LambdaIntegrationOptions.
@Stability(value=Stable) @Nullable default Boolean getProxy()
If set to false, you will need to explicitly define the API model using
addResource and addMethod (or addProxy).
Default: true
@Stability(value=Stable) static LambdaRestApiProps.Builder builder()
builder in interface ResourceOptionsbuilder in interface RestApiBasePropsbuilder in interface RestApiPropsLambdaRestApiProps.Builder of LambdaRestApiPropsCopyright © 2022. All rights reserved.