Interface SingletonFunctionProps

All Superinterfaces:
EventInvokeConfigOptions, FunctionOptions, FunctionProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
SingletonFunctionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:40.823Z") @Stability(Stable) public interface SingletonFunctionProps extends software.amazon.jsii.JsiiSerializable, FunctionProps
Properties for a newly created singleton Lambda.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.codeguruprofiler.*;
 import software.amazon.awscdk.services.ec2.*;
 import software.amazon.awscdk.services.iam.*;
 import software.amazon.awscdk.services.kms.*;
 import software.amazon.awscdk.services.lambda.*;
 import software.amazon.awscdk.services.logs.*;
 import software.amazon.awscdk.services.sns.*;
 import software.amazon.awscdk.services.sqs.*;
 import software.amazon.awscdk.core.*;
 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;
 SingletonFunctionProps singletonFunctionProps = SingletonFunctionProps.builder()
         .code(code)
         .handler("handler")
         .runtime(runtime)
         .uuid("uuid")
         // the properties below are optional
         .allowAllOutbound(false)
         .allowPublicSubnet(false)
         .architecture(architecture)
         .architectures(List.of(architecture))
         .codeSigningConfig(codeSigningConfig)
         .currentVersionOptions(VersionOptions.builder()
                 .codeSha256("codeSha256")
                 .description("description")
                 .maxEventAge(Duration.minutes(30))
                 .onFailure(destination)
                 .onSuccess(destination)
                 .provisionedConcurrentExecutions(123)
                 .removalPolicy(RemovalPolicy.DESTROY)
                 .retryAttempts(123)
                 .build())
         .deadLetterQueue(queue)
         .deadLetterQueueEnabled(false)
         .deadLetterTopic(topic)
         .description("description")
         .environment(Map.of(
                 "environmentKey", "environment"))
         .environmentEncryption(key)
         .ephemeralStorageSize(size)
         .events(List.of(eventSource))
         .filesystem(fileSystem)
         .functionName("functionName")
         .initialPolicy(List.of(policyStatement))
         .insightsVersion(lambdaInsightsVersion)
         .lambdaPurpose("lambdaPurpose")
         .layers(List.of(layerVersion))
         .logRetention(RetentionDays.ONE_DAY)
         .logRetentionRetryOptions(LogRetentionRetryOptions.builder()
                 .base(Duration.minutes(30))
                 .maxRetries(123)
                 .build())
         .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(List.of(securityGroup))
         .timeout(Duration.minutes(30))
         .tracing(Tracing.ACTIVE)
         .vpc(vpc)
         .vpcSubnets(SubnetSelection.builder()
                 .availabilityZones(List.of("availabilityZones"))
                 .onePerAz(false)
                 .subnetFilters(List.of(subnetFilter))
                 .subnetGroupName("subnetGroupName")
                 .subnetName("subnetName")
                 .subnets(List.of(subnet))
                 .subnetType(SubnetType.ISOLATED)
                 .build())
         .build();
 
  • Method Details

    • getUuid

      @Stability(Stable) @NotNull String getUuid()
      A unique identifier to identify this lambda.

      The identifier should be unique across all custom resource providers. We recommend generating a UUID per provider.

    • getLambdaPurpose

      @Stability(Stable) @Nullable default String getLambdaPurpose()
      A descriptive name for the purpose of this Lambda.

      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

    • builder

      @Stability(Stable) static SingletonFunctionProps.Builder builder()
      Returns:
      a SingletonFunctionProps.Builder of SingletonFunctionProps