Interface PythonFunctionProps

All Superinterfaces:
software.amazon.awscdk.services.lambda.EventInvokeConfigOptions, software.amazon.awscdk.services.lambda.FunctionOptions, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
PythonFunctionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-05-31T18:44:12.801Z") @Stability(Experimental) public interface PythonFunctionProps extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.services.lambda.FunctionOptions
(experimental) Properties for a PythonFunction.

Example:

 String entry = "/path/to/function";
 DockerImage image = DockerImage.fromBuild(entry);
 PythonFunction.Builder.create(this, "function")
         .entry(entry)
         .runtime(Runtime.PYTHON_3_8)
         .bundling(BundlingOptions.builder()
                 .buildArgs(Map.of("PIP_INDEX_URL", "https://your.index.url/simple/", "PIP_EXTRA_INDEX_URL", "https://your.extra-index.url/simple/"))
                 .build())
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for PythonFunctionProps
    static final class 
    An implementation for PythonFunctionProps
  • Method Summary

    Modifier and Type
    Method
    Description
     
    (experimental) Bundling options to use for this function.
    (experimental) Path to the source of the function or the location for dependencies.
    default String
    (experimental) The name of the exported handler in the index file.
    default String
    (experimental) The path (relative to entry) to the index file containing the exported handler.
    software.amazon.awscdk.services.lambda.Runtime
    (experimental) The runtime environment.

    Methods inherited from interface software.amazon.awscdk.services.lambda.EventInvokeConfigOptions

    getMaxEventAge, getOnFailure, getOnSuccess, getRetryAttempts

    Methods inherited from interface software.amazon.awscdk.services.lambda.FunctionOptions

    getAllowAllOutbound, getAllowPublicSubnet, getArchitecture, getArchitectures, getCodeSigningConfig, getCurrentVersionOptions, getDeadLetterQueue, getDeadLetterQueueEnabled, getDeadLetterTopic, getDescription, getEnvironment, getEnvironmentEncryption, getEphemeralStorageSize, getEvents, getFilesystem, getFunctionName, getInitialPolicy, getInsightsVersion, getLayers, getLogRetention, getLogRetentionRetryOptions, getLogRetentionRole, getMemorySize, getProfiling, getProfilingGroup, getReservedConcurrentExecutions, getRole, getSecurityGroup, getSecurityGroups, getTimeout, getTracing, getVpc, getVpcSubnets

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Method Details

    • getEntry

      @Stability(Experimental) @NotNull String getEntry()
      (experimental) Path to the source of the function or the location for dependencies.
    • getRuntime

      @Stability(Experimental) @NotNull software.amazon.awscdk.services.lambda.Runtime getRuntime()
      (experimental) The runtime environment.

      Only runtimes of the Python family are supported.

      Default: Runtime.PYTHON_3_7

    • getBundling

      @Stability(Experimental) @Nullable default BundlingOptions getBundling()
      (experimental) Bundling options to use for this function.

      Use this to specify custom bundling options like the bundling Docker image, asset hash type, custom hash, architecture, etc.

      Default: - Use the default bundling Docker image, with x86_64 architecture.

    • getHandler

      @Stability(Experimental) @Nullable default String getHandler()
      (experimental) The name of the exported handler in the index file.

      Default: handler

    • getIndex

      @Stability(Experimental) @Nullable default String getIndex()
      (experimental) The path (relative to entry) to the index file containing the exported handler.

      Default: index.py

    • builder

      @Stability(Experimental) static PythonFunctionProps.Builder builder()
      Returns:
      a PythonFunctionProps.Builder of PythonFunctionProps