Class: BucketConfigurator

Inherits:
Object
  • Object
show all
Defined in:
lib/jets/internal/app/shared/functions/jets/s3_bucket_config.rb

Instance Method Summary collapse

Instance Method Details

#put(props = {}) ⇒ Object



23
24
25
26
27
28
# File 'lib/jets/internal/app/shared/functions/jets/s3_bucket_config.rb', line 23

def put(props={})
  # all props including bucket gets passed from the Custom::S3BucketConfiguration resource
  props = props.deep_transform_keys { |k| k.to_s.underscore.to_sym }
  puts "props: #{JSON.dump(props)}"
  s3.put_bucket_notification_configuration(props)
end

#s3Object



30
31
32
# File 'lib/jets/internal/app/shared/functions/jets/s3_bucket_config.rb', line 30

def s3
  @s3 ||= Aws::S3::Client.new
end