Interface PythonFunctionProps

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

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:25.993Z") @Stability(Experimental) public interface PythonFunctionProps extends software.amazon.jsii.JsiiSerializable, 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();
 
  • 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 Runtime getRuntime()
      (experimental) The runtime environment.

      Only runtimes of the Python family are supported.

    • 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