Class: Aws::S3::Encryption::Config

Inherits:
Struct
  • Object
show all
Defined in:
lib/aws-sdk-resources/services/s3/encryption/config.rb

Constant Summary collapse

DEFAULTS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  client: lambda { S3::Client.new },
  key_provider: lambda {
    msg = "must specify an :encryption_key or :key_provider"
    raise ArgumentError, msg
  },
  materials_description: '{}',
  materials_location: :metadata,
  instruction_file_suffix: '.instruction',
}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#clientObject

Returns the value of attribute client

Returns:

  • (Object)

    the current value of client



4
5
6
# File 'lib/aws-sdk-resources/services/s3/encryption/config.rb', line 4

def client
  @client
end

#instruction_file_suffixObject

Returns the value of attribute instruction_file_suffix

Returns:

  • (Object)

    the current value of instruction_file_suffix



4
5
6
# File 'lib/aws-sdk-resources/services/s3/encryption/config.rb', line 4

def instruction_file_suffix
  @instruction_file_suffix
end

#key_providerObject

Returns the value of attribute key_provider

Returns:

  • (Object)

    the current value of key_provider



4
5
6
# File 'lib/aws-sdk-resources/services/s3/encryption/config.rb', line 4

def key_provider
  @key_provider
end

#materials_descriptionObject

Returns the value of attribute materials_description

Returns:

  • (Object)

    the current value of materials_description



4
5
6
# File 'lib/aws-sdk-resources/services/s3/encryption/config.rb', line 4

def materials_description
  @materials_description
end

#materials_locationObject

Returns the value of attribute materials_location

Returns:

  • (Object)

    the current value of materials_location



4
5
6
# File 'lib/aws-sdk-resources/services/s3/encryption/config.rb', line 4

def materials_location
  @materials_location
end

Class Method Details

.build(options) ⇒ Object



42
43
44
45
46
47
48
49
# File 'lib/aws-sdk-resources/services/s3/encryption/config.rb', line 42

def build(options)
  config = Config.new
  options.each do |opt_name, opt_value|
    config.send("#{opt_name}=", opt_value)
  end
  apply_defaults(config)
  config
end

Instance Method Details

#encryption_key=(master_key) ⇒ Object



23
24
25
# File 'lib/aws-sdk-resources/services/s3/encryption/config.rb', line 23

def encryption_key= master_key
  self[:key_provider] = DefaultKeyProvider.new(master_key)
end