Interface SingletonFunctionProps

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

@Generated(value="jsii-pacmak/1.89.0 (build 2f74b3e)", date="2023-11-02T10:21:19.861Z") @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.*;
 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.*;
 AdotLayerVersion adotLayerVersion;
 Architecture architecture;
 Code code;
 CodeSigningConfig codeSigningConfig;
 IDestination destination;
 IEventSource eventSource;
 FileSystem fileSystem;
 Key key;
 LambdaInsightsVersion lambdaInsightsVersion;
 LayerVersion layerVersion;
 ParamsAndSecretsLayerVersion paramsAndSecretsLayerVersion;
 PolicyStatement policyStatement;
 ProfilingGroup profilingGroup;
 Queue queue;
 Role role;
 Runtime runtime;
 RuntimeManagementMode runtimeManagementMode;
 SecurityGroup securityGroup;
 Size size;
 SnapStartConf snapStartConf;
 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
         .adotInstrumentation(AdotInstrumentationConfig.builder()
                 .execWrapper(AdotLambdaExecWrapper.REGULAR_HANDLER)
                 .layerVersion(adotLayerVersion)
                 .build())
         .allowAllOutbound(false)
         .allowPublicSubnet(false)
         .architecture(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)
         .paramsAndSecrets(paramsAndSecretsLayerVersion)
         .profiling(false)
         .profilingGroup(profilingGroup)
         .reservedConcurrentExecutions(123)
         .retryAttempts(123)
         .role(role)
         .runtimeManagementMode(runtimeManagementMode)
         .securityGroups(List.of(securityGroup))
         .snapStart(snapStartConf)
         .timeout(Duration.minutes(30))
         .tracing(Tracing.ACTIVE)
         .vpc(vpc)
         .vpcSubnets(SubnetSelection.builder()
                 .availabilityZones(List.of("availabilityZones"))
                 .onePerAz(false)
                 .subnetFilters(List.of(subnetFilter))
                 .subnetGroupName("subnetGroupName")
                 .subnets(List.of(subnet))
                 .subnetType(SubnetType.PRIVATE_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