# File lib/aws/ec2/security_group_collection.rb, line 36
      def create name, options = {}

        description = options[:description] || name

        create_opts = {}
        create_opts[:group_name] = name
        create_opts[:description] = description

        vpc_id = options[:vpc]
        vpc_id ||= options[:vpc_id] # for backwards compatability
        vpc_id ||= filter_value_for('vpc-id')
        vpc_id = vpc_id.id if vpc_id.is_a?(VPC)

        create_opts[:vpc_id] = vpc_id if vpc_id

        response = client.create_security_group(create_opts)

        SecurityGroup.new(response.group_id, {
          :name => name,
          :description => description,
          :vpc_id => create_opts[:vpc_id],
          :config => config })

      end