Interface ISingletonFunctionProps
Properties for a newly created singleton Lambda.
Inherited Members
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.AWS.Lambda.dll
Syntax (csharp)
public interface ISingletonFunctionProps : IFunctionProps, IFunctionOptions, IEventInvokeConfigOptions
Syntax (vb)
Public Interface ISingletonFunctionProps
Inherits IFunctionProps, IFunctionOptions, IEventInvokeConfigOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeGuruProfiler;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.KMS;
using Amazon.CDK.AWS.Lambda;
using Amazon.CDK.AWS.Logs;
using Amazon.CDK.AWS.SNS;
using Amazon.CDK.AWS.SQS;
using Amazon.CDK;
Architecture architecture;
Code code;
CodeSigningConfig codeSigningConfig;
IDestination destination;
IEventSource eventSource;
FileSystem fileSystem;
Key key;
LambdaInsightsVersion lambdaInsightsVersion;
LayerVersion layerVersion;
PolicyStatement policyStatement;
ProfilingGroup profilingGroup;
Queue queue;
Role role;
Runtime runtime;
SecurityGroup securityGroup;
Size size;
Subnet subnet;
SubnetFilter subnetFilter;
Topic topic;
Vpc vpc;
var singletonFunctionProps = new SingletonFunctionProps {
Code = code,
Handler = "handler",
Runtime = runtime,
Uuid = "uuid",
// the properties below are optional
AllowAllOutbound = false,
AllowPublicSubnet = false,
Architecture = architecture,
Architectures = new [] { architecture },
CodeSigningConfig = codeSigningConfig,
CurrentVersionOptions = new VersionOptions {
CodeSha256 = "codeSha256",
Description = "description",
MaxEventAge = Duration.Minutes(30),
OnFailure = destination,
OnSuccess = destination,
ProvisionedConcurrentExecutions = 123,
RemovalPolicy = RemovalPolicy.DESTROY,
RetryAttempts = 123
},
DeadLetterQueue = queue,
DeadLetterQueueEnabled = false,
DeadLetterTopic = topic,
Description = "description",
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
EnvironmentEncryption = key,
EphemeralStorageSize = size,
Events = new [] { eventSource },
Filesystem = fileSystem,
FunctionName = "functionName",
InitialPolicy = new [] { policyStatement },
InsightsVersion = lambdaInsightsVersion,
LambdaPurpose = "lambdaPurpose",
Layers = new [] { layerVersion },
LogRetention = RetentionDays.ONE_DAY,
LogRetentionRetryOptions = new LogRetentionRetryOptions {
Base = Duration.Minutes(30),
MaxRetries = 123
},
LogRetentionRole = role,
MaxEventAge = Duration.Minutes(30),
MemorySize = 123,
OnFailure = destination,
OnSuccess = destination,
Profiling = false,
ProfilingGroup = profilingGroup,
ReservedConcurrentExecutions = 123,
RetryAttempts = 123,
Role = role,
SecurityGroup = securityGroup,
SecurityGroups = new [] { securityGroup },
Timeout = Duration.Minutes(30),
Tracing = Tracing.ACTIVE,
Vpc = vpc,
VpcSubnets = new SubnetSelection {
AvailabilityZones = new [] { "availabilityZones" },
OnePerAz = false,
SubnetFilters = new [] { subnetFilter },
SubnetGroupName = "subnetGroupName",
SubnetName = "subnetName",
Subnets = new [] { subnet },
SubnetType = SubnetType.ISOLATED
}
};
Synopsis
Properties
LambdaPurpose | A descriptive name for the purpose of this Lambda. |
Uuid | A unique identifier to identify this lambda. |
Properties
LambdaPurpose
A descriptive name for the purpose of this Lambda.
virtual string LambdaPurpose { get; }
Property Value
System.String
Remarks
If the Lambda does not have a physical name, this string will be reflected its generated name. The combination of lambdaPurpose and uuid must be unique.
Default: SingletonLambda
Uuid
A unique identifier to identify this lambda.
string Uuid { get; }
Property Value
System.String
Remarks
The identifier should be unique across all custom resource providers. We recommend generating a UUID per provider.