List of usage examples for com.amazonaws.services.lambda AWSLambda createEventSourceMapping
CreateEventSourceMappingResult createEventSourceMapping( CreateEventSourceMappingRequest createEventSourceMappingRequest);
Creates a mapping between an event source and an AWS Lambda function.
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; }