Skip to content

Instantly share code, notes, and snippets.

@hugoduncan
Created June 18, 2011 13:34
Show Gist options
  • Save hugoduncan/1033105 to your computer and use it in GitHub Desktop.
Save hugoduncan/1033105 to your computer and use it in GitHub Desktop.
Create and destroy security group
(require 'pallet.compute)
(def service (pallet.compute/service "your service name from config.clj here")
(def security-group-client
(..
(clojure.contrib.reflect/get-field
org.jclouds.ec2.compute.EC2ComputeService "ec2Client" (.compute service))
getSecurityGroupServices))
(.createSecurityGroupInRegion security-group-client "us-east-1" "sg" "my new sg)
(.deleteSecurityGroupInRegion security-group-client "us-east-1" "sg")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment