java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IResource, IClientVpnConnectionHandler, IConnectable, IGrantable, IFunction, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.102.0 (build e354887)", date="2024-08-29T22:54:27.927Z") @Stability(Experimental) public class PythonFunction extends Function
(experimental) A Python Lambda function.

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();
 
  • Constructor Details

    • PythonFunction

      protected PythonFunction(software.amazon.jsii.JsiiObjectRef objRef)
    • PythonFunction

      protected PythonFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • PythonFunction

      @Stability(Experimental) public PythonFunction(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull PythonFunctionProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.