Interface ILambdaRestApiProps
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ILambdaRestApiProps : IRestApiProps, IResourceOptions, IRestApiBaseProps
Syntax (vb)
Public Interface ILambdaRestApiProps
Inherits IRestApiProps, IResourceOptions, IRestApiBaseProps
Remarks
ExampleMetadata: infused
Examples
Queue sourceQueue;
var fn = new Function(this, "MyFunc", new FunctionProps {
Handler = "index.handler",
Runtime = Runtime.NODEJS_LATEST,
Code = Code.FromInline("exports.handler = e => {}")
});
var restApi = new LambdaRestApi(this, "MyRestAPI", new LambdaRestApiProps { Handler = fn });
var apiTarget = new ApiGatewayTarget(restApi);
var pipe = new Pipe(this, "Pipe", new PipeProps {
Source = new SqsSource(sourceQueue),
Target = apiTarget
});
Synopsis
Properties
Handler | The default Lambda function that handles all requests from this API. |
IntegrationOptions | Specific Lambda integration options. |
Proxy | If true, route all requests to the Lambda Function. |
Properties
Handler
The default Lambda function that handles all requests from this API.
IFunction Handler { get; }
Property Value
Remarks
This handler will be used as a the default integration for all methods in
this API, unless specified otherwise in addMethod
.
IntegrationOptions
Specific Lambda integration options.
virtual ILambdaIntegrationOptions IntegrationOptions { get; }
Property Value
Remarks
Default: see defaults defined in LambdaIntegrationOptions
.
Proxy
If true, route all requests to the Lambda Function.
virtual Nullable<bool> Proxy { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
If set to false, you will need to explicitly define the API model using
addResource
and addMethod
(or addProxy
).
Default: true