Permalink
Browse files

DB Security groups are an array param, not a string param.

  • Loading branch information...
1 parent c1fb8b2 commit 58bd3c90a55e7e4b5e6ec18b4c1d424d0fa244b1 @MrJoy MrJoy committed Nov 19, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/AWS/RDS/rds.rb
View
@@ -14,7 +14,7 @@ class Base < AWS::Base
# @option options [String] :port is the port the database accepts connections on (3306)
# @option options [String] :db_name contains the name of the database to create when created (nil)
# @option options [String] :db_parameter_group is the database parameter group to associate with this instance (nil)
- # @option options [String] :db_security_groups are the list of db security groups to associate with the instance (nil)
+ # @option options [Array] :db_security_groups are the list of db security groups to associate with the instance (nil)
# @option options [String] :availability_zone is the availability_zone to create the instance in (nil)
# @option options [String] :preferred_maintenance_window in format: ddd:hh24:mi-ddd:hh24:mi (nil)
# @option options [String] :backup_retention_period is the number of days which automated backups are retained (1)
@@ -43,7 +43,7 @@ def create_db_instance( options = {})
params["Port"] = options[:port].to_s if options.has?(:port)
params["DBName"] = options[:db_name] if options.has?(:db_name)
params["DBParameterGroup"] = options[:db_parameter_group] if options.has?(:db_parameter_group)
- params["DBSecurityGroups"] = options[:db_security_groups] if options.has?(:db_security_groups)
+ params.merge!(pathlist("DBSecurityGroups.member", [options[:db_security_groups]].flatten)) if options.has_key?(:db_security_groups)
params["AvailabilityZone"] = options[:availability_zone] if options.has?(:availability_zone)
params["PreferredMaintenanceWindow"] = options[:preferred_maintenance_window] if options.has?(:preferred_maintenance_window)
params["BackupRetentionPeriod"] = options[:backup_retention_period].to_s if options.has?(:backup_retention_period)
@@ -344,7 +344,7 @@ def describe_events( options = {} )
# @option options [String] :port is the port the database accepts connections on (3306)
# @option options [String] :db_name contains the name of the database to create when created (nil)
# @option options [String] :db_parameter_group_name is the database parameter group to associate with this instance (nil)
- # @option options [String] :db_security_groups are the list of db security groups to associate with the instance (nil)
+ # @option options [Array] :db_security_groups are the list of db security groups to associate with the instance (nil)
# @option options [String] :availability_zone is the availability_zone to create the instance in (nil)
# @option options [String] :preferred_maintenance_window in format: ddd:hh24:mi-ddd:hh24:mi (nil)
# @option options [String] :backup_retention_period is the number of days which automated backups are retained (1)
@@ -367,7 +367,7 @@ def modify_db_instance( options = {})
params["Port"] = options[:port].to_s if options.has?(:port)
params["DBName"] = options[:db_name] if options.has?(:db_name)
params["DBParameterGroupName"] = options[:db_parameter_group_name] if options.has?(:db_parameter_group_name)
- params["DBSecurityGroups"] = options[:db_security_groups] if options.has?(:db_security_groups)
+ params.merge!(pathlist("DBSecurityGroups.member", [options[:db_security_groups]].flatten)) if options.has_key?(:db_security_groups)
params["AvailabilityZone"] = options[:availability_zone] if options.has?(:availability_zone)
params["PreferredMaintenanceWindow"] = options[:preferred_maintenance_window] if options.has?(:preferred_maintenance_window)
params["BackupRetentionPeriod"] = options[:backup_retention_period].to_s if options.has?(:backup_retention_period)

0 comments on commit 58bd3c9

Please sign in to comment.