Class: AWSCDK::StepFunctions::S3ObjectsItemReader
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::StepFunctions::S3ObjectsItemReader
- Includes:
- IItemReader
- Defined in:
- step_functions/s3_objects_item_reader.rb
Overview
Item Reader configuration for iterating over objects in an S3 bucket.
Class Method Summary collapse
Instance Method Summary collapse
-
#bucket ⇒ AWSCDK::S3::IBucket
S3 Bucket containing objects 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) ⇒ S3ObjectsItemReader
constructor
A new instance of S3ObjectsItemReader.
-
#max_items ⇒ Numeric?
Limits the number of items passed to the Distributed Map state.
-
#prefix ⇒ String?
S3 prefix used to limit objects to iterate over.
-
#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
listObjectsV2method 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) ⇒ S3ObjectsItemReader
Returns a new instance of S3ObjectsItemReader.
10 11 12 13 14 |
# File 'step_functions/s3_objects_item_reader.rb', line 10 def initialize(props) props = props.is_a?(Hash) ? ::AWSCDK::StepFunctions::S3ObjectsItemReaderProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5TM09iamVjdHNJdGVtUmVhZGVyUHJvcHMifQ==")), "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 |
# File 'step_functions/s3_objects_item_reader.rb', line 16 def self.jsii_overridable_methods { :bucket => { kind: :property, name: "bucket", 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 }, :prefix => { kind: :property, name: "prefix", 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 objects to iterate over.
32 33 34 |
# File 'step_functions/s3_objects_item_reader.rb', line 32 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.
46 47 48 |
# File 'step_functions/s3_objects_item_reader.rb', line 46 def bucket_name_path() jsii_get_property("bucketNamePath") end |
#max_items ⇒ Numeric?
Default: - Distributed Map state will iterate over all items provided by the ItemReader
Limits the number of items passed to the Distributed Map state.
54 55 56 |
# File 'step_functions/s3_objects_item_reader.rb', line 54 def max_items() jsii_get_property("maxItems") end |
#prefix ⇒ String?
Default: - No prefix
S3 prefix used to limit objects to iterate over.
62 63 64 |
# File 'step_functions/s3_objects_item_reader.rb', line 62 def prefix() jsii_get_property("prefix") end |
#provide_policy_statements ⇒ Array<AWSCDK::IAM::PolicyStatement>
Compile policy statements to provide relevent permissions to the state machine.
69 70 71 |
# File 'step_functions/s3_objects_item_reader.rb', line 69 def provide_policy_statements() jsii_call_method("providePolicyStatements", []) end |
#render(query_language = nil) ⇒ Object
Renders the ItemReader configuration as JSON object.
77 78 79 80 |
# File 'step_functions/s3_objects_item_reader.rb', line 77 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 listObjectsV2 method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.
39 40 41 |
# File 'step_functions/s3_objects_item_reader.rb', line 39 def resource() jsii_get_property("resource") end |
#validate_item_reader ⇒ Array<String>
Validate that ItemReader contains exactly either.
86 87 88 |
# File 'step_functions/s3_objects_item_reader.rb', line 86 def validate_item_reader() jsii_call_method("validateItemReader", []) end |