Show / Hide Table of Contents

Class LambdaQueueFunctionDependencyProvider

The LambdaQueueFunctionDependencyProvider class provides all the default, runtime dependencies for ALambdaQueueFunction<TMessage> instances.

Inheritance
System.Object
LambdaFunctionDependencyProvider
LambdaQueueFunctionDependencyProvider
Implements
ILambdaQueueFunctionDependencyProvider
ILambdaFunctionDependencyProvider
Inherited Members
LambdaFunctionDependencyProvider.UtcNow
LambdaFunctionDependencyProvider.ConfigSource
LambdaFunctionDependencyProvider.KmsClient
LambdaFunctionDependencyProvider.SqsClient
LambdaFunctionDependencyProvider.EventsClient
LambdaFunctionDependencyProvider.DebugLoggingEnabled
LambdaFunctionDependencyProvider.Log(String)
LambdaFunctionDependencyProvider.DecryptSecretAsync(Byte[], Dictionary<String, String>, CancellationToken)
LambdaFunctionDependencyProvider.EncryptSecretAsync(Byte[], String, Dictionary<String, String>, CancellationToken)
LambdaFunctionDependencyProvider.SendMessageToQueueAsync(String, String, IEnumerable<KeyValuePair<String, String>>, CancellationToken)
LambdaFunctionDependencyProvider.SendEventAsync(DateTimeOffset, String, String, String, String, IEnumerable<String>, CancellationToken)
Namespace: LambdaSharp.SimpleQueueService
Assembly: LambdaSharp.SimpleQueueService.dll
Syntax
public class LambdaQueueFunctionDependencyProvider : LambdaFunctionDependencyProvider, ILambdaQueueFunctionDependencyProvider, ILambdaFunctionDependencyProvider

Constructors

LambdaQueueFunctionDependencyProvider(Func<DateTime>, Action<String>, ILambdaConfigSource, IAmazonKeyManagementService, IAmazonSQS)

Creates new instance of LambdaQueueFunctionDependencyProvider, which provides the implementation for the required dependencies for ALambdaQueueFunction<TMessage>.

Declaration
public LambdaQueueFunctionDependencyProvider(Func<DateTime> utcNowCallback = null, Action<string> logCallback = null, ILambdaConfigSource configSource = null, IAmazonKeyManagementService kmsClient = null, IAmazonSQS sqsClient = null)
Parameters
Type Name Description
System.Func<System.DateTime> utcNowCallback

A function that return the current DateTime in UTC timezone. Defaults to System.DateTime.UtcNow when null.

System.Action<System.String> logCallback

An action that logs a string message. Defaults to Amazon.Lambda.Core.LambdaLogger.Log(System.String) when null.

ILambdaConfigSource configSource

A ILambdaConfigSource instance from which the Lambda function configuration is read. Defaults to LambdaSystemEnvironmentSource instance when null.

Amazon.KeyManagementService.IAmazonKeyManagementService kmsClient

A Amazon.KeyManagementService.IAmazonKeyManagementService client instance. Defaults to Amazon.KeyManagementService.AmazonKeyManagementServiceClient when null.

Amazon.SQS.IAmazonSQS sqsClient

A Amazon.SQS.IAmazonSQS client instance. Defaults to Amazon.SQS.AmazonSQSClient when null.

Methods

DeleteMessagesFromQueueAsync(String, IEnumerable<(String MessageId, String ReceiptHandle)>)

Delete a batch of message from an SQS queue. The Lambda function requires sqs:DeleteMessageBatch permission on the specified SQS URL.

Declaration
public Task DeleteMessagesFromQueueAsync(string queueArn, IEnumerable<(string MessageId, string ReceiptHandle)> messages)
Parameters
Type Name Description
System.String queueArn

SQS ARN.

System.Collections.Generic.IEnumerable<System.ValueTuple<System.String, System.String>> messages

Enumeration of (string MessageId, string ReceiptHandle) tuples specifying which messages to delete.

Returns
Type Description
System.Threading.Tasks.Task

The task object representing the asynchronous operation.

GetMaxRetriesForQueueAsync(String)

Determine how many times a message should be retried for a given SQS queue.

Declaration
public async Task<int> GetMaxRetriesForQueueAsync(string queueArn)
Parameters
Type Name Description
System.String queueArn

SQS ARN.

Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

The task object representing the asynchronous operation.

Implements

ILambdaQueueFunctionDependencyProvider
ILambdaFunctionDependencyProvider
In This Article
Back to top Generated by DocFX