-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLambdaFunctionConstructProps.cs
More file actions
40 lines (38 loc) · 1.67 KB
/
Copy pathLambdaFunctionConstructProps.cs
File metadata and controls
40 lines (38 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using Amazon.CDK.AWS.IAM;
namespace LayeredCraft.Cdk.Constructs.Models;
public interface ILambdaFunctionConstructProps
{
string FunctionName { get; set; }
string FunctionSuffix { get; set; }
string AssetPath { get; set; }
string RoleName { get; set; }
string PolicyName { get; set; }
double MemorySize { get; set; }
double TimeoutInSeconds { get; set; }
PolicyStatement[] PolicyStatements { get; set; }
IDictionary<string, string> EnvironmentVariables { get; set; }
bool IncludeOtelLayer { get; set; }
string OtelLayerVersion { get; set; }
string Architecture { get; set; }
List<LambdaPermission> Permissions { get; set; }
bool EnableSnapStart { get; set; }
bool GenerateUrl { get; set; }
}
public sealed record LambdaFunctionConstructProps : ILambdaFunctionConstructProps
{
public required string FunctionName { get; set; }
public required string FunctionSuffix { get; set; }
public required string AssetPath { get; set; }
public required string RoleName { get; set; }
public required string PolicyName { get; set; }
public double MemorySize { get; set; } = 1024;
public double TimeoutInSeconds { get; set; } = 6;
public PolicyStatement[] PolicyStatements { get; set; } = [];
public IDictionary<string, string> EnvironmentVariables { get; set; } = new Dictionary<string, string>();
public bool IncludeOtelLayer { get; set; } = false;
public string OtelLayerVersion { get; set; } = "0-117-0";
public string Architecture { get; set; } = "amd64";
public List<LambdaPermission> Permissions { get; set; } = [];
public bool EnableSnapStart { get; set; }
public bool GenerateUrl { get; set; }
}