     (if-let [response (ec2-request (merge cr-params {"Action" "CreateSecurityGroup"}))]
       (do
         (first (xml-> (xml-to-map response) :groupId text))))))
+
+
+(defn process [action params]
+  (condp = (keyword action)
+    :CreateSecurityGroup (create params)
+    (ec2-request (merge params {"Action" (name action)}))))
 
 (defn- build-network-params [index [k v]]
   (if (= (name k) "IpRanges")

   [clojure.xml :as xml]
   [clojure.zip :as zip]
   [clojure.data.zip.xml :refer [xml1-> attr xml-> text text= attr=]]))


(defn- xml-to-map [xml-string]
  (zip/xml-zip (xml/parse (java.io.ByteArrayInputStream. (.getBytes xml-string)))))

    (balance-ingress sg-id ingress)
    (balance-egress sg-id egress)))



(defn ensure [opts]
;describe security group
