vendor/bundle/ruby/1.8/gems/aws-2.5.6/lib/rds/rds.rb
#
# identifier: db instance identifier. Must be unique per account per zone.
# instance_class: db.m1.small | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge
# See this for other values: http://docs.amazonwebservices.com/AmazonRDS/latest/APIReference/
#
# options:
#    db_name: if you want a database created at the same time as the instance, specify :db_name option.
#    availability_zone: default is random zone.
db instance identifier. Must be unique per account per zone.

if you want a database created at the same time as the instance, specify :db_name option.
availability_zone: default is random zone.
db instance identifier . Must be unique per account per zone . if you want a database created at the same time as the instance specify : db_name option . availability_zone : default is random zone .
def create_db_instance(identifier, instance_class, allocated_storage, master_username, master_password, options={})
      params                         = {}
      params['DBInstanceIdentifier'] = identifier
      params['DBInstanceClass']      = instance_class
      params['AllocatedStorage']     = allocated_storage
      params['MasterUsername']       = master_username
      params['MasterUserPassword']   = master_password
      params['Engine']               = options[:engine] || "MySQL5.1"
      params['DBName'] = options[:db_name] if options[:db_name]
      params['AvailabilityZone'] = options[:availability_zone] if options[:availability_zone]
      params['PreferredMaintenanceWindow'] = options[:preferred_maintenance_window] if options[:preferred_maintenance_window]
      params['BackupRetentionPeriod'] = options[:preferred_retention_period] if options[:preferred_retention_period]
      params['PreferredBackupWindow'] = options[:preferred_backup_window] if options[:preferred_backup_window]
      @logger.info("Creating DB Instance called #{identifier}")
      link = do_request("CreateDBInstance", params, :pull_out_single=>[:create_db_instance_result, :db_instance])
    rescue Exception
      on_exception
    end
def create_db_instance ( identifier , instance_class , allocated_storage , master_username , master_password , options = { } ) params = { } params [ 'DBInstanceIdentifier' ] = identifier params [ 'DBInstanceClass' ] = instance_class params [ 'AllocatedStorage' ] = allocated_storage params [ 'MasterUsername' ] = master_username params [ 'MasterUserPassword' ] = master_password params [ 'Engine' ] = options [ :engine ] || "MySQL5.1" params [ 'DBName' ] = options [ :db_name ] if options [ :db_name ] params [ 'AvailabilityZone' ] = options [ :availability_zone ] if options [ :availability_zone ] params [ 'PreferredMaintenanceWindow' ] = options [ :preferred_maintenance_window ] if options [ :preferred_maintenance_window ] params [ 'BackupRetentionPeriod' ] = options [ :preferred_retention_period ] if options [ :preferred_retention_period ] params [ 'PreferredBackupWindow' ] = options [ :preferred_backup_window ] if options [ :preferred_backup_window ] @logger . info ( "Creating DB Instance called #{identifier}" ) link = do_request ( "CreateDBInstance" , params , :pull_out_single => [ :create_db_instance_result , :db_instance ] ) rescue Exception on_exception end
identifier: db instance identifier.
identifier : db instance identifier .
identifier
instance_class
allocated_storage
master_username
master_password
options