@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-02T20:25:34.941Z") public class LambdaRestApi extends RestApi
Use the proxy
property to define a greedy proxy ("{proxy+}") and "ANY"
method from the specified path. If not defined, you will need to explicity
add resources and methods to the API.
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"));
Modifier and Type | Class and Description |
---|---|
static class |
LambdaRestApi.Builder
A fluent builder for
LambdaRestApi . |
IRestApi.Jsii$Default
Modifier | Constructor and Description |
---|---|
protected |
LambdaRestApi(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
LambdaRestApi(software.amazon.jsii.JsiiObjectRef objRef) |
|
LambdaRestApi(software.constructs.Construct scope,
java.lang.String id,
LambdaRestApiProps props) |
addModel, addRequestValidator, fromRestApiAttributes, fromRestApiId, getMethods, getRestApiId, getRestApiRootResourceId, getRoot, getUrl, validate
addApiKey, addApiKey, addDomainName, addGatewayResponse, addUsagePlan, addUsagePlan, arnForExecuteApi, arnForExecuteApi, arnForExecuteApi, arnForExecuteApi, configureCloudWatchRole, configureDeployment, getCloudWatchAccount, getDeploymentStage, getDomainName, getLatestDeployment, getRestApiName, metric, metric, metricCacheHitCount, metricCacheHitCount, metricCacheMissCount, metricCacheMissCount, metricClientError, metricClientError, metricCount, metricCount, metricIntegrationLatency, metricIntegrationLatency, metricLatency, metricLatency, metricServerError, metricServerError, setCloudWatchAccount, setDeploymentStage, urlForPath, urlForPath
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected LambdaRestApi(software.amazon.jsii.JsiiObjectRef objRef)
protected LambdaRestApi(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public LambdaRestApi(software.constructs.Construct scope, java.lang.String id, LambdaRestApiProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.