security_groups module

Fabric tasks

django_fabfile.security_groups.cleanup_security_groups()[source]

Delete unused AWS Security Groups.

Parameters:delete (boolean) – notify only (i.e. False) by default.

If security group with the same name is used at least in one region, it is treated as used.

django_fabfile.security_groups.sync_rules_by_id()[source]

Update Security Group rules from other Security Group.

Works across regions as well. The sole exception is granted groups, owned by another user - such groups can’t be copied.

Parameters:
  • src_reg_name (str) – region name
  • src_grp_id (str) – group ID
  • dst_reg_name (str) – region name
  • dst_grp_id (str) – group ID
django_fabfile.security_groups.replicate_security_groups()[source]

Replicate updates of Security Groups among regions.

Parameters:filters (dict) – restrict replication to subset of Security Groups, see available options at http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSecurityGroups.html. Not available while running as Fabric task because it should be of dict type.

Per-instance Security Groups without additional rules won’t be replicated.

Raises warnings about synchronization issues that requires manual resolution.

Internals

django_fabfile.security_groups.cleanup_security_groups[source]

Delete unused AWS Security Groups.

Parameters:delete (boolean) – notify only (i.e. False) by default.

If security group with the same name is used at least in one region, it is treated as used.

django_fabfile.security_groups.new_security_group(region, name=None, description=None)[source]

Create Security Groups with SSH access.

django_fabfile.security_groups.replicate_security_groups[source]

Replicate updates of Security Groups among regions.

Parameters:filters (dict) – restrict replication to subset of Security Groups, see available options at http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSecurityGroups.html. Not available while running as Fabric task because it should be of dict type.

Per-instance Security Groups without additional rules won’t be replicated.

Raises warnings about synchronization issues that requires manual resolution.

django_fabfile.security_groups.sync_rules(src_grp, dst_grp=None, dst_region=None)[source]

Copy Security Group rules.

Works across regions as well. The sole exception that won’t be synced is granted groups, owned by another user - such groups can’t be copied recursively.

django_fabfile.security_groups.sync_rules_by_id[source]

Update Security Group rules from other Security Group.

Works across regions as well. The sole exception is granted groups, owned by another user - such groups can’t be copied.

Parameters:
  • src_reg_name (str) – region name
  • src_grp_id (str) – group ID
  • dst_reg_name (str) – region name
  • dst_grp_id (str) – group ID

Table Of Contents

Previous topic

instances module

Next topic

switchdb module

This Page