Class: AWSCDK::StepFunctions::S3ObjectsItemReaderProps

Inherits:
ItemReaderProps
  • Object
show all
Defined in:
step_functions/s3_objects_item_reader_props.rb

Overview

Properties for configuring an Item Reader that iterates over objects in an S3 bucket.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket: nil, bucket_name_path: nil, max_items: nil, prefix: nil) ⇒ S3ObjectsItemReaderProps

Returns a new instance of S3ObjectsItemReaderProps.

Parameters:

  • bucket (AWSCDK::S3::IBucket, nil) (defaults to: nil)

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

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

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

  • max_items (Numeric, nil) (defaults to: nil)

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

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

    S3 prefix used to limit objects to iterate over.



11
12
13
14
15
16
17
18
19
20
# File 'step_functions/s3_objects_item_reader_props.rb', line 11

def initialize(bucket: nil, bucket_name_path: nil, max_items: nil, prefix: nil)
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket") unless @bucket.nil?
  @bucket_name_path = bucket_name_path
  Jsii::Type.check_type(@bucket_name_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketNamePath") unless @bucket_name_path.nil?
  @max_items = max_items
  Jsii::Type.check_type(@max_items, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxItems") unless @max_items.nil?
  @prefix = prefix
  Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil?
end

Instance Attribute Details

#bucketAWSCDK::S3::IBucket? (readonly)

Note:

Default: - S3 bucket will be determined from

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

Returns:

See Also:

  • bucketNamePath


27
28
29
# File 'step_functions/s3_objects_item_reader_props.rb', line 27

def bucket
  @bucket
end

#bucket_name_pathString? (readonly)

Note:

Default: - S3 bucket will be determined from

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

Returns:

  • (String, nil)

See Also:



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

def bucket_name_path
  @bucket_name_path
end

#max_itemsNumeric? (readonly)

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)


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

def max_items
  @max_items
end

#prefixString? (readonly)

Note:

Default: - No prefix

S3 prefix used to limit objects to iterate over.

Returns:

  • (String, nil)


43
44
45
# File 'step_functions/s3_objects_item_reader_props.rb', line 43

def prefix
  @prefix
end

Class Method Details

.jsii_propertiesObject



45
46
47
48
49
50
51
52
# File 'step_functions/s3_objects_item_reader_props.rb', line 45

def self.jsii_properties
  {
    :bucket => "bucket",
    :bucket_name_path => "bucketNamePath",
    :max_items => "maxItems",
    :prefix => "prefix",
  }
end

Instance Method Details

#to_jsiiObject



54
55
56
57
58
59
60
61
62
63
64
# File 'step_functions/s3_objects_item_reader_props.rb', line 54

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "bucket" => @bucket,
    "bucketNamePath" => @bucket_name_path,
    "maxItems" => @max_items,
    "prefix" => @prefix,
  })
  result.compact
end