Class: AWSCDK::StepFunctions::S3JsonLItemReader
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::StepFunctions::S3JsonLItemReader
- 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
-
#bucket ⇒ AWSCDK::S3::IBucket
S3 Bucket containing a file with a list to iterate over.
-
#bucket_name_path ⇒ String?
S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
-
#initialize(props) ⇒ S3JsonLItemReader
constructor
A new instance of S3JsonLItemReader.
- #input_type ⇒ String
-
#key ⇒ String
S3 key of a file with a list to iterate over.
-
#max_items ⇒ Numeric?
Limits the number of items passed to the Distributed Map state.
-
#provide_policy_statements ⇒ Array<AWSCDK::IAM::PolicyStatement>
Compile policy statements to provide relevent permissions to the state machine.
-
#render(query_language = nil) ⇒ Object
Renders the ItemReader configuration as JSON object.
-
#resource ⇒ String
ARN for the
getObjectmethod of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix. -
#validate_item_reader ⇒ Array<String>
Validate that ItemReader contains exactly either.
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_methods ⇒ Object
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
#bucket ⇒ AWSCDK::S3::IBucket
S3 Bucket containing a file with a list to iterate over.
33 34 35 |
# File 'step_functions/s3_json_l_item_reader.rb', line 33 def bucket() jsii_get_property("bucket") end |
#bucket_name_path ⇒ String?
S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
59 60 61 |
# File 'step_functions/s3_json_l_item_reader.rb', line 59 def bucket_name_path() jsii_get_property("bucketNamePath") end |
#input_type ⇒ String
38 39 40 |
# File 'step_functions/s3_json_l_item_reader.rb', line 38 def input_type() jsii_get_property("inputType") end |
#key ⇒ String
S3 key of a file with a list to iterate over.
45 46 47 |
# File 'step_functions/s3_json_l_item_reader.rb', line 45 def key() jsii_get_property("key") end |
#max_items ⇒ Numeric?
Default: - No maxItems
Limits the number of items passed to the Distributed Map state.
67 68 69 |
# File 'step_functions/s3_json_l_item_reader.rb', line 67 def max_items() jsii_get_property("maxItems") end |
#provide_policy_statements ⇒ Array<AWSCDK::IAM::PolicyStatement>
Compile policy statements to provide relevent permissions to the state machine.
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.
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 |
#resource ⇒ String
ARN for the getObject method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.
52 53 54 |
# File 'step_functions/s3_json_l_item_reader.rb', line 52 def resource() jsii_get_property("resource") end |
#validate_item_reader ⇒ Array<String>
Validate that ItemReader contains exactly either.
91 92 93 |
# File 'step_functions/s3_json_l_item_reader.rb', line 91 def validate_item_reader() jsii_call_method("validateItemReader", []) end |