Class: AWSCDK::Glue::CfnJob::JobCommandProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
glue/cfn_job.rb

Overview

Specifies code executed when a job is run.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: nil, python_version: nil, runtime: nil, script_location: nil) ⇒ JobCommandProperty

Returns a new instance of JobCommandProperty.

Parameters:

  • name (String, nil) (defaults to: nil)

    The name of the job command.

  • python_version (String, nil) (defaults to: nil)

    The Python version being used to execute a Python shell job.

  • runtime (String, nil) (defaults to: nil)

    In Ray jobs, Runtime is used to specify the versions of Ray, Python and additional libraries available in your environment.

  • script_location (String, nil) (defaults to: nil)

    Specifies the Amazon Simple Storage Service (Amazon S3) path to a script that executes a job (required).



888
889
890
891
892
893
894
895
896
897
# File 'glue/cfn_job.rb', line 888

def initialize(name: nil, python_version: nil, runtime: nil, script_location: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @python_version = python_version
  Jsii::Type.check_type(@python_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pythonVersion") unless @python_version.nil?
  @runtime = runtime
  Jsii::Type.check_type(@runtime, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "runtime") unless @runtime.nil?
  @script_location = script_location
  Jsii::Type.check_type(@script_location, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scriptLocation") unless @script_location.nil?
end

Instance Attribute Details

#nameString? (readonly)

The name of the job command.

For an Apache Spark ETL job, this must be glueetl . For a Python shell job, it must be pythonshell . For an Apache Spark streaming ETL job, this must be gluestreaming . For a Ray job, this must be glueray .



905
906
907
# File 'glue/cfn_job.rb', line 905

def name
  @name
end

#python_versionString? (readonly)

The Python version being used to execute a Python shell job.

Allowed values are 3 or 3.9. Version 2 is deprecated.



912
913
914
# File 'glue/cfn_job.rb', line 912

def python_version
  @python_version
end

#runtimeString? (readonly)

In Ray jobs, Runtime is used to specify the versions of Ray, Python and additional libraries available in your environment.

This field is not used in other job types. For supported runtime environment values, see Working with Ray jobs in the AWS Glue Developer Guide.



919
920
921
# File 'glue/cfn_job.rb', line 919

def runtime
  @runtime
end

#script_locationString? (readonly)

Specifies the Amazon Simple Storage Service (Amazon S3) path to a script that executes a job (required).



924
925
926
# File 'glue/cfn_job.rb', line 924

def script_location
  @script_location
end

Class Method Details

.jsii_propertiesObject



926
927
928
929
930
931
932
933
# File 'glue/cfn_job.rb', line 926

def self.jsii_properties
  {
    :name => "name",
    :python_version => "pythonVersion",
    :runtime => "runtime",
    :script_location => "scriptLocation",
  }
end

Instance Method Details

#to_jsiiObject



935
936
937
938
939
940
941
942
943
944
# File 'glue/cfn_job.rb', line 935

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "pythonVersion" => @python_version,
    "runtime" => @runtime,
    "scriptLocation" => @script_location,
  })
  result.compact
end