Example usage for com.amazonaws.services.lambda.model CreateEventSourceMappingRequest CreateEventSourceMappingRequest

List of usage examples for com.amazonaws.services.lambda.model CreateEventSourceMappingRequest CreateEventSourceMappingRequest

Introduction

In this page you can find the example usage for com.amazonaws.services.lambda.model CreateEventSourceMappingRequest CreateEventSourceMappingRequest.

Prototype

CreateEventSourceMappingRequest

Source Link

Usage

From source file:com.netflix.spinnaker.clouddriver.lambda.deploy.ops.UpsertLambdaEventSourceAtomicOperation.java

License:Apache License

private CreateEventSourceMappingResult createEventSourceMapping(LambdaFunction cache) {
    updateTaskStatus("Initializing Creation of AWS Lambda Function Event Source Mapping...");

    AWSLambda client = getLambdaClient();
    CreateEventSourceMappingRequest request = new CreateEventSourceMappingRequest()
            .withFunctionName(cache.getFunctionArn()).withBatchSize(description.getBatchsize())
            .withEnabled(description.getEnabled()).withStartingPosition("LATEST")
            .withEventSourceArn(description.getEventSourceArn());

    CreateEventSourceMappingResult result = client.createEventSourceMapping(request);
    updateTaskStatus("Finished Creation of AWS Lambda Function Event Mapping Operation...");

    return result;
}