Class PythonFunction

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:41.177Z") @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 Construct scope, @NotNull String id, @NotNull PythonFunctionProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.