Sha256: 8d9c9f71e8c8a327669a4afe3c3adfeb853ffd3ae960379fbea9115063eec1bd

Contents?: true

Size: 991 Bytes

Versions: 51

Compression:

Stored size: 991 Bytes

Contents

require 'fog/core/model'

module Fog
  module AWS
    class RDS
      
      class ParameterGroup < Fog::Model

        identity  :id, :aliases => ['DBParameterGroupName', :name]
        attribute  :family, :aliases => 'DBParameterGroupFamily'
        attribute  :description, :aliases => 'Description'
        
        def save
          requires :family
          requires :description
          requires :id
          connection.create_db_parameter_group(id, family, description)
        end
        
        def modify(changes)
          connection.modify_db_parameter_group id, changes.collect {|c| {'ParameterName' => c[:name], 'ParameterValue' => c[:value], 'ApplyMethod' => c[:apply_method]}}
        end
        
        def destroy
          requires :id
          connection.delete_db_parameter_group(id)
          true
        end
        
        def parameters(filters={})
          connection.parameters({:group => self}.merge(filters))
        end
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 14 rubygems

Version Path
fog-0.11.0 lib/fog/aws/models/rds/parameter_group.rb
fog-0.10.0 lib/fog/aws/models/rds/parameter_group.rb
fog4encbs-0.9.0.1 lib/fog/aws/models/rds/parameter_group.rb
fog4encbs-0.9.0 lib/fog/aws/models/rds/parameter_group.rb
fog-0.9.0 lib/fog/aws/models/rds/parameter_group.rb
fog-0.8.2 lib/fog/aws/models/rds/parameter_group.rb
fog-0.8.1 lib/fog/aws/models/rds/parameter_group.rb
fog-0.8.0 lib/fog/aws/models/rds/parameter_group.rb
fog-0.7.2 lib/fog/aws/rds/models/parameter_group.rb
fog-0.7.1 lib/fog/aws/rds/models/parameter_group.rb
fog-0.7.0 lib/fog/aws/rds/models/parameter_group.rb