Class: AWSCDK::StepFunctions::S3ObjectsItemReader

Inherits:
Jsii::Object
  • Object
show all
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

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_methodsObject



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

#bucketAWSCDK::S3::IBucket

S3 Bucket containing objects to iterate over.

Returns:



32
33
34
# File 'step_functions/s3_objects_item_reader.rb', line 32

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)


46
47
48
# File 'step_functions/s3_objects_item_reader.rb', line 46

def bucket_name_path()
  jsii_get_property("bucketNamePath")
end

#max_itemsNumeric?

Note:

Default: - Distributed Map state will iterate over all items provided by the ItemReader

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

Returns:

  • (Numeric, nil)


54
55
56
# File 'step_functions/s3_objects_item_reader.rb', line 54

def max_items()
  jsii_get_property("maxItems")
end

#prefixString?

Note:

Default: - No prefix

S3 prefix used to limit objects to iterate over.

Returns:

  • (String, nil)


62
63
64
# File 'step_functions/s3_objects_item_reader.rb', line 62

def prefix()
  jsii_get_property("prefix")
end

#provide_policy_statementsArray<AWSCDK::IAM::PolicyStatement>

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

Returns:



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.

Parameters:

Returns:

  • (Object)
    • 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

#resourceString

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

Returns:

  • (String)


39
40
41
# File 'step_functions/s3_objects_item_reader.rb', line 39

def resource()
  jsii_get_property("resource")
end

#validate_item_readerArray<String>

Validate that ItemReader contains exactly either.

Returns:

  • (Array<String>)

See Also:

  • bucketNamePath


86
87
88
# File 'step_functions/s3_objects_item_reader.rb', line 86

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