Class ApiEventSource
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Lambda.EventSources
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ApiEventSource : DeputyBase, IEventSource
Syntax (vb)
Public Class ApiEventSource
Inherits DeputyBase
Implements IEventSource
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;
using Amazon.CDK.AWS.Lambda.EventSources;
Authorizer authorizer;
Model model;
RequestValidator requestValidator;
var apiEventSource = new ApiEventSource("method", "path", new MethodOptions {
ApiKeyRequired = false,
AuthorizationScopes = new [] { "authorizationScopes" },
AuthorizationType = AuthorizationType.NONE,
Authorizer = authorizer,
MethodResponses = new [] { new MethodResponse {
StatusCode = "statusCode",
// the properties below are optional
ResponseModels = new Dictionary<string, IModel> {
{ "responseModelsKey", model }
},
ResponseParameters = new Dictionary<string, boolean> {
{ "responseParametersKey", false }
}
} },
OperationName = "operationName",
RequestModels = new Dictionary<string, IModel> {
{ "requestModelsKey", model }
},
RequestParameters = new Dictionary<string, boolean> {
{ "requestParametersKey", false }
},
RequestValidator = requestValidator,
RequestValidatorOptions = new RequestValidatorOptions {
RequestValidatorName = "requestValidatorName",
ValidateRequestBody = false,
ValidateRequestParameters = false
}
});
Synopsis
Constructors
Api |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Api |
Used by jsii to construct an instance of this class from DeputyProps |
Api |
Methods
Bind(IFunction) | Called by |
Constructors
ApiEventSource(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ApiEventSource(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
ApiEventSource(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ApiEventSource(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
ApiEventSource(String, String, IMethodOptions)
public ApiEventSource(string method, string path, IMethodOptions options = null)
Parameters
- method System.
String - path System.
String - options IMethod
Options
Methods
Bind(IFunction)
Called by lambda.addEventSource
to allow the event source to bind to this function.
public virtual void Bind(IFunction target)
Parameters
- target IFunction