List of usage examples for com.amazonaws.services.lambda.model CreateEventSourceMappingRequest CreateEventSourceMappingRequest
CreateEventSourceMappingRequest
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; }