Skip to content

Instantly share code, notes, and snippets.

@natea
Created June 22, 2011 10:41
Show Gist options
  • Save natea/1039845 to your computer and use it in GitHub Desktop.
Save natea/1039845 to your computer and use it in GitHub Desktop.
>>> app = conn.create_security_group('appserver', 'The application tier')
>>> app.authorize(src_group=web)
True
>>> web.authorize(ip_protocol='tcp', from_port=22, to_port=22, \
cidr_ip='192.168.1.130/32')
True
>>> web.rules
[IPPermissions:tcp(80-80),
IPPermissions:tcp(22-22)]
>>> web.revoke('tcp', 22, 22, cidr_ip='192.168.1.130/32')
True
>>> web.rules
[IPPermissions:tcp(80-80)]
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment