lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-0.6.7 vs lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-0.6.8
- old
+ new
@@ -87,13 +87,13 @@
config_param :auto_create_bucket, :bool, :default => true
desc "Check AWS key on start"
config_param :check_apikey_on_start, :bool, :default => true
desc "URI of proxy environment"
config_param :proxy_uri, :string, :default => nil
- desc "Use S3 reduced redundancy storage for 33% cheaper pricing"
+ desc "Use S3 reduced redundancy storage for 33% cheaper pricing. Deprecated. Use storage_class instead"
config_param :reduced_redundancy, :bool, :default => false
- desc "The type of storage to use for the object(STANDARD,REDUCED_REDUNDANCY)"
+ desc "The type of storage to use for the object(STANDARD,REDUCED_REDUNDANCY,STANDARD_IA)"
config_param :storage_class, :string, :default => "STANDARD"
desc "Change one line format in the S3 object (out_file,json,ltsv,single_value)"
config_param :format, :string, :default => 'out_file'
desc "Permission for the object in S3"
config_param :acl, :string, :default => nil
@@ -101,10 +101,16 @@
config_param :hex_random_length, :integer, :default => 4
desc "Overwrite already existing path"
config_param :overwrite, :bool, :default => false
desc "Specifies the AWS KMS key ID to use for object encryption"
config_param :ssekms_key_id, :string, :default => nil, :secret => true
+ desc "Specifies the algorithm to use to when encrypting the object"
+ config_param :sse_customer_algorithm, :string, :default => nil
+ desc "Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data"
+ config_param :sse_customer_key, :string, :default => nil, :secret => true
+ desc "Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321"
+ config_param :sse_customer_key_md5, :string, :default => nil, :secret => true
desc "AWS SDK uses MD5 for API request/response by default"
config_param :compute_checksums, :bool, :default => nil # use nil to follow SDK default configuration
desc "Signature version for API Request (s3,v4)"
config_param :signature_version, :string, :default => nil # use nil to follow SDK default configuration
desc "Given a threshold to treat events as delay, output warning logs if delayed events were put into s3"
@@ -149,11 +155,14 @@
if @hex_random_length > MAX_HEX_RANDOM_LENGTH
raise ConfigError, "hex_random_length parameter must be less than or equal to #{MAX_HEX_RANDOM_LENGTH}"
end
- @storage_class = "REDUCED_REDUNDANCY" if @reduced_redundancy
+ if @reduced_redundancy
+ $log.warn "reduced_redundancy parameter is deprecated. Use storage_class parameter instead"
+ @storage_class = "REDUCED_REDUNDANCY"
+ end
@values_for_s3_object_chunk = {}
end
def start
super
@@ -226,9 +235,12 @@
:content_type => @compressor.content_type,
:storage_class => @storage_class,
}
put_options[:server_side_encryption] = @use_server_side_encryption if @use_server_side_encryption
put_options[:ssekms_key_id] = @ssekms_key_id if @ssekms_key_id
+ put_options[:sse_customer_algorithm] = @sse_customer_algorithm if @sse_customer_algorithm
+ put_options[:sse_customer_key] = @sse_customer_key if @sse_customer_key
+ put_options[:sse_customer_key_md5] = @sse_customer_key_md5 if @sse_customer_key_md5
put_options[:acl] = @acl if @acl
@bucket.object(s3path).put(put_options)
@values_for_s3_object_chunk.delete(chunk.unique_id)