Example usage for com.amazonaws.services.lambda AWSLambda updateEventSourceMapping

List of usage examples for com.amazonaws.services.lambda AWSLambda updateEventSourceMapping

Introduction

In this page you can find the example usage for com.amazonaws.services.lambda AWSLambda updateEventSourceMapping.

Prototype

UpdateEventSourceMappingResult updateEventSourceMapping(
        UpdateEventSourceMappingRequest updateEventSourceMappingRequest);

Source Link

Document

Updates an event source mapping.

Usage

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

License:Apache License

private UpdateEventSourceMappingResult updateEventSourceMappingResult(LambdaFunction cache) {
    updateTaskStatus("Initializing Updating of AWS Lambda Function Event Mapping Operation...");

    AWSLambda client = getLambdaClient();
    UpdateEventSourceMappingRequest request = new UpdateEventSourceMappingRequest()
            .withFunctionName(cache.getFunctionArn()).withBatchSize(description.getBatchsize())
            .withEnabled(description.getEnabled()).withUUID(description.getUuid());

    UpdateEventSourceMappingResult result = client.updateEventSourceMapping(request);
    updateTaskStatus("Finished Updating of AWS Lambda Function Event Mapping Operation...");

    return result;
}