Show / Hide Table of Contents

Class ApiEventSource

Inheritance
System.Object
ApiEventSource
Implements
IEventSource
Namespace: Amazon.CDK.AWS.Lambda.EventSources
Assembly: Amazon.CDK.AWS.Lambda.EventSources.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

ApiEventSource(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

ApiEventSource(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

ApiEventSource(String, String, IMethodOptions)

Methods

Bind(IFunction)

Called by lambda.addEventSource to allow the event source to bind to this function.

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.ByRefValue

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.DeputyBase.DeputyProps

The deputy props

ApiEventSource(String, String, IMethodOptions)

public ApiEventSource(string method, string path, IMethodOptions options = null)
Parameters
method System.String
path System.String
options IMethodOptions

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

Implements

IEventSource
Back to top Generated by DocFX