java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.glue.alpha.Code
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Direct Known Subclasses:
AssetCode, S3Code

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:15.750Z") @Stability(Experimental) public abstract class Code extends software.amazon.jsii.JsiiObject
(experimental) Represents a Glue Job's Code assets (an asset can be a scripts, a jar, a python file or any other file).

Example:

 Job.Builder.create(this, "EnableSparkUI")
         .jobName("EtlJobWithSparkUIPrefix")
         .sparkUI(SparkUIProps.builder()
                 .enabled(true)
                 .build())
         .executable(JobExecutable.pythonEtl(PythonSparkJobExecutableProps.builder()
                 .glueVersion(GlueVersion.V3_0)
                 .pythonVersion(PythonVersion.THREE)
                 .script(Code.fromAsset(join(__dirname, "job-script", "hello_world.py")))
                 .build()))
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    Code(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Code(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract CodeConfig
    bind(software.constructs.Construct scope, IGrantable grantable)
    (experimental) Called when the Job is initialized to allow this object to bind.
    static AssetCode
    (experimental) Job code from a local disk path.
    static AssetCode
    fromAsset(String path, AssetOptions options)
    (experimental) Job code from a local disk path.
    static S3Code
    fromBucket(IBucket bucket, String key)
    (experimental) Job code as an S3 object.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Code

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

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

      @Stability(Experimental) protected Code()
  • Method Details

    • fromAsset

      @Stability(Experimental) @NotNull public static AssetCode fromAsset(@NotNull String path, @Nullable AssetOptions options)
      (experimental) Job code from a local disk path.

      Parameters:
      path - code file (not a directory). This parameter is required.
      options -
    • fromAsset

      @Stability(Experimental) @NotNull public static AssetCode fromAsset(@NotNull String path)
      (experimental) Job code from a local disk path.

      Parameters:
      path - code file (not a directory). This parameter is required.
    • fromBucket

      @Stability(Experimental) @NotNull public static S3Code fromBucket(@NotNull IBucket bucket, @NotNull String key)
      (experimental) Job code as an S3 object.

      Parameters:
      bucket - The S3 bucket. This parameter is required.
      key - The object key. This parameter is required.
    • bind

      @Stability(Experimental) @NotNull public abstract CodeConfig bind(@NotNull software.constructs.Construct scope, @NotNull IGrantable grantable)
      (experimental) Called when the Job is initialized to allow this object to bind.

      Parameters:
      scope - This parameter is required.
      grantable - This parameter is required.