Class: VectorAmp::GCSSource
Overview
Google Cloud Storage ingestion source.
Constant Summary
Constants inherited from Source
Source::SUPPORTED_SOURCE_TYPES
Instance Attribute Summary
Attributes inherited from Source
#config, #description, #id, #metadata, #name, #source_type
Instance Method Summary collapse
-
#initialize(bucket:, name: nil, prefix: nil, connection_id: nil, description: nil, metadata: nil, id: nil, **config) ⇒ GCSSource
constructor
A new instance of GCSSource.
Methods inherited from Source
#[], from_api, #inspect, normalize_hash, #to_create_body, #to_h
Constructor Details
#initialize(bucket:, name: nil, prefix: nil, connection_id: nil, description: nil, metadata: nil, id: nil, **config) ⇒ GCSSource
Returns a new instance of GCSSource.
228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/vector_amp/source.rb', line 228 def initialize(bucket:, name: nil, prefix: nil, connection_id: nil, description: nil, metadata: nil, id: nil, **config) raise ArgumentError, "bucket is required" if bucket.nil? || bucket.to_s.empty? super( id: id, source_type: "gcs", name: name || SourceNames.gcs(bucket, prefix), description: description, metadata: , config: Utils.compact_hash(config.merge(bucket: bucket, prefix: prefix, connection_id: connection_id)) ) end |