Class: ClowderCommonRuby::CloudWatchConfig

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/clowder-common-ruby/types.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ CloudWatchConfig

Returns a new instance of CloudWatchConfig.



84
85
86
87
88
89
90
91
92
93
# File 'lib/clowder-common-ruby/types.rb', line 84

def initialize(attributes)
  super
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))

  attributes = attributes.each_with_object({}) do |(k, v), h|
    raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
    h[k.to_sym] = v
  end

end

Instance Method Details

#valid_keysObject



95
96
97
98
99
100
101
102
# File 'lib/clowder-common-ruby/types.rb', line 95

def valid_keys
  [].tap do |keys|
    keys << :accessKeyId
    keys << :secretAccessKey
    keys << :region
    keys << :logGroup
  end
end