Class: AWSCDK::StepFunctions::S3JsonLItemReader

Inherits:
Jsii::Object
  • Object
show all
Includes:
IItemReader
Defined in:
step_functions/s3_json_l_item_reader.rb

Overview

Item Reader configuration for iterating over the rows of the JSONL file stored in S3.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(props) ⇒ S3JsonLItemReader

Returns a new instance of S3JsonLItemReader.



10
11
12
13
14
# File 'step_functions/s3_json_l_item_reader.rb', line 10

def initialize(props)
  props = props.is_a?(Hash) ? ::AWSCDK::StepFunctions::S3FileItemReaderProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5TM0ZpbGVJdGVtUmVhZGVyUHJvcHMifQ==")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(props)
end

Class Method Details

.jsii_overridable_methodsObject



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'step_functions/s3_json_l_item_reader.rb', line 16

def self.jsii_overridable_methods
  {
    :bucket => { kind: :property, name: "bucket", is_optional: false },
    :input_type => { kind: :property, name: "inputType", is_optional: false },
    :key => { kind: :property, name: "key", is_optional: false },
    :resource => { kind: :property, name: "resource", is_optional: false },
    :bucket_name_path => { kind: :property, name: "bucketNamePath", is_optional: true },
    :max_items => { kind: :property, name: "maxItems", is_optional: true },
    :provide_policy_statements => { kind: :method, name: "providePolicyStatements", is_optional: false },
    :render => { kind: :method, name: "render", is_optional: false },
    :validate_item_reader => { kind: :method, name: "validateItemReader", is_optional: false },
  }
end

Instance Method Details

#bucketAWSCDK::S3::IBucket

S3 Bucket containing a file with a list to iterate over.

Returns:



33
34
35
# File 'step_functions/s3_json_l_item_reader.rb', line 33

def bucket()
  jsii_get_property("bucket")
end

#bucket_name_pathString?

S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.

Returns:

  • (String, nil)


59
60
61
# File 'step_functions/s3_json_l_item_reader.rb', line 59

def bucket_name_path()
  jsii_get_property("bucketNamePath")
end

#input_typeString

Returns:

  • (String)


38
39
40
# File 'step_functions/s3_json_l_item_reader.rb', line 38

def input_type()
  jsii_get_property("inputType")
end

#keyString

S3 key of a file with a list to iterate over.

Returns:

  • (String)


45
46
47
# File 'step_functions/s3_json_l_item_reader.rb', line 45

def key()
  jsii_get_property("key")
end

#max_itemsNumeric?

Note:

Default: - No maxItems

Limits the number of items passed to the Distributed Map state.

Returns:

  • (Numeric, nil)


67
68
69
# File 'step_functions/s3_json_l_item_reader.rb', line 67

def max_items()
  jsii_get_property("maxItems")
end

#provide_policy_statementsArray<AWSCDK::IAM::PolicyStatement>

Compile policy statements to provide relevent permissions to the state machine.

Returns:



74
75
76
# File 'step_functions/s3_json_l_item_reader.rb', line 74

def provide_policy_statements()
  jsii_call_method("providePolicyStatements", [])
end

#render(query_language = nil) ⇒ Object

Renders the ItemReader configuration as JSON object.

Parameters:

Returns:

  • (Object)
    • JSON object


82
83
84
85
# File 'step_functions/s3_json_l_item_reader.rb', line 82

def render(query_language = nil)
  Jsii::Type.check_type(query_language, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5RdWVyeUxhbmd1YWdlIn0=")), "queryLanguage") unless query_language.nil?
  jsii_call_method("render", [query_language])
end

#resourceString

ARN for the getObject method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.

Returns:

  • (String)


52
53
54
# File 'step_functions/s3_json_l_item_reader.rb', line 52

def resource()
  jsii_get_property("resource")
end

#validate_item_readerArray<String>

Validate that ItemReader contains exactly either.

Returns:

  • (Array<String>)

See Also:

  • bucketNamePath


91
92
93
# File 'step_functions/s3_json_l_item_reader.rb', line 91

def validate_item_reader()
  jsii_call_method("validateItemReader", [])
end