Skip to Content
Hybrid Cloud for Developers
book

Hybrid Cloud for Developers

by Manoj Hirway
April 2018
Intermediate to advanced content levelIntermediate to advanced
280 pages
8h 37m
English
Packt Publishing
Content preview from Hybrid Cloud for Developers

Creating a security group

We saw how we can associate a security group to a virtual machine. We can also create a new security group or modify an existing security group to change a firewall rule. For example, we might want to open port 443 on the security group.

The following program demonstrates how we can create a new security group and modify its rules. We first create a security group by invoking the create_security_group() function call and providing a name. This function returns an object of the security group, which can then be passed to the create_security_group_rule() function along with the parameters that define the rule.

The rule opens the port 443 for the HTTPs protocol for all the incoming network traffic:

def open_port(conn ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hybrid Cloud for Architects

Hybrid Cloud for Architects

Alok Shrivastwa
OpenStack: Building a Cloud Environment

OpenStack: Building a Cloud Environment

Alok Shrivastwa, Sunil Sarat, Kevin Jackson, Cody Bunch, Egle Sigler, Tony Campbell

Publisher Resources

ISBN: 9781788830874Supplemental Content