Interface LambdaRestApiProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable,ResourceOptions,RestApiBaseProps,RestApiOptions,RestApiProps
- All Known Implementing Classes:
LambdaRestApiProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:45.000Z")
@Stability(Stable)
public interface LambdaRestApiProps
extends software.amazon.jsii.JsiiSerializable, RestApiProps
Example:
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"));
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forLambdaRestApiPropsstatic final classAn implementation forLambdaRestApiProps -
Method Summary
Modifier and TypeMethodDescriptionstatic LambdaRestApiProps.Builderbuilder()The default Lambda function that handles all requests from this API.default RestApiPropsDeprecated.default BooleangetProxy()If true, route all requests to the Lambda Function.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.apigateway.ResourceOptions
getDefaultCorsPreflightOptions, getDefaultIntegration, getDefaultMethodOptionsMethods inherited from interface software.amazon.awscdk.services.apigateway.RestApiBaseProps
getCloudWatchRole, getDeploy, getDeployOptions, getDisableExecuteApiEndpoint, getDomainName, getEndpointExportName, getEndpointTypes, getFailOnWarnings, getParameters, getPolicy, getRestApiName, getRetainDeploymentsMethods inherited from interface software.amazon.awscdk.services.apigateway.RestApiProps
getApiKeySourceType, getBinaryMediaTypes, getCloneFrom, getDescription, getEndpointConfiguration, getMinimumCompressionSize
-
Method Details
-
getHandler
The default Lambda function that handles all requests from this API.This handler will be used as a the default integration for all methods in this API, unless specified otherwise in
addMethod. -
getOptions
Deprecated.theLambdaRestApiPropsnow extendsRestApiProps, so all options are just available here. Note that the options specified inoptionswill be overridden by any props specified at the root level.Default: - no options. -
getProxy
If true, route all requests to the Lambda Function.If set to false, you will need to explicitly define the API model using
addResourceandaddMethod(oraddProxy).Default: true
-
builder
- Returns:
- a
LambdaRestApiProps.BuilderofLambdaRestApiProps
-
LambdaRestApiPropsnow extendsRestApiProps, so all options are just available here.