Skip to content

23._Security_Groups

Ahmad Abdo edited this page Jun 26, 2017 · 1 revision

Security Groups

listSecurityGroups


Usage

$ awsm listSecurityGroups --help
NAME:
   awsm listSecurityGroups - List Security Groups

USAGE:
   awsm listSecurityGroups [arguments...]

ARGUMENTS:
   [search] - The keyword to search for

Example Output

awsm listInternetGateways default

This will list all Security Groups matching the term default, the output should look similar to this:

$ awsm listSecurityGroups default
+---------+-------+-------------+----------------------------+---------------+--------------+----------------+
|  NAME   | CLASS |  GROUP ID   |        DESCRIPTION         |      VPC      |    VPC ID    |     REGION     |
+---------+-------+-------------+----------------------------+---------------+--------------+----------------+
| default |       | sg-b38690f6 | default group              |               |              | us-west-1      |
| default |       | sg-08b01861 | default group              |               |              | us-east-1      |
| default |       | sg-32eb145d | default VPC security group | us-east-1-vpc | vpc-abb5efc6 | us-east-1      |
| default |       | sg-c4e877f4 | default group              |               |              | us-west-2      |
| default |       | sg-428c9b20 | default VPC security group | us-west-2-vpc | vpc-551c1637 | us-west-2      |
| default |       | sg-8ebe4ae7 | default VPC security group | vpc-961ef0ff  | vpc-961ef0ff | ca-central-1   |
| default |       | sg-46b6d747 | default group              |               |              | ap-northeast-1 |
| default |       | sg-1abf5073 | default VPC security group | vpc-d56989bc  | vpc-d56989bc | eu-west-2      |
| default |       | sg-e82be19f | default group              |               |              | eu-west-1      |
| default |       | sg-5628cd39 | default VPC security group | eu-west-1-vpc | vpc-20552548 | eu-west-1      |
| default |       | sg-ce7b449c | default group              |               |              | ap-southeast-1 |
| default |       | sg-8ce74591 | default group              |               |              | sa-east-1      |
| default |       | sg-45e3737f | default group              |               |              | ap-southeast-2 |
+---------+-------+-------------+----------------------------+---------------+--------------+----------------+



updateSecurityGroups


Usage

$ awsm updateSecurityGroups --help

NAME:
   awsm updateSecurityGroups - Update Security Groups

USAGE:
   awsm updateSecurityGroups [arguments...]

ARGUMENTS:
   search - The search term of the security groups to update
   [region] - The region to update the security groups in (optional)

Example Output

awsm updateSecurityGroups example-security-group

This will update all Security Groups matching the term example-security-group to match the example-security-group Class configuration, the output should look similar to this:

$ awsm updateSecurityGroups example-security-group
+------------------------+------------------------+-------------+------------------------+---------------+--------------+-----------+
|          NAME          |         CLASS          |  GROUP ID   |      DESCRIPTION       |      VPC      |    VPC ID    |  REGION   |
+------------------------+------------------------+-------------+------------------------+---------------+--------------+-----------+
| example-security-group | example-security-group | sg-6fc2d214 | Example Security Group | us-west-2-vpc | vpc-551c1637 | us-west-2 |
+------------------------+------------------------+-------------+------------------------+---------------+--------------+-----------+

△  Comparing awsm Security Group grants...                                                             

△  [example-security-group us-west-2] - Authorize - [ingress] [tcp :443-443] [0.0.0.0/0]               

✓  Comparison complete!                                                                                

▶  Are you sure you want to update these Security Groups?                                              
◀  y

✓  Done!  



createSecurityGroup


Usage

$ awsm createSecurityGroup --help

NAME:
   awsm createSecurityGroup - Create a Security Groups

USAGE:
   awsm createSecurityGroup [arguments...]

ARGUMENTS:
   class - The class of security group to create
   region - The region to create the security group in
   [vpc] - The vpc to create the security group in (optional)

Example Output

awsm createSecurityGroup example-security-group us-west-2 awsm

This will create a new Security Group named example-security-group in the awsm VPC in us-west-2 and configure it to match the example-security-group Class configuration, the output should look similar to this:

$ awsm createSecurityGroup example-security-group us-west-2 awsm

✓  Found Security Group class configuration for [example-security-group]                               

✓  Found VPC [vpc-551c1637] named [us-west-2-vpc] in [us-west-2]                                       

△  Created Security Group [sg-6fc2d214] in region [us-west-2]                                          

△  Comparing awsm Security Group grants...                                                             

△  [example-security-group us-west-2] - Authorize - [ingress] [tcp :80-80] [0.0.0.0/0]                 

✓  Comparison complete!  



deleteSecurityGroups


Usage

$ awsm deleteSecurityGroups --help

NAME:
   awsm deleteSecurityGroups - Delete Security Groups

USAGE:
   awsm deleteSecurityGroups [arguments...]

ARGUMENTS:
   search - The search term for the security group to delete
   [region] - The region to delete the security group from

Example Output

awsm deleteSecurityGroups example-security-group

This will delete all Security Groups matching the term example-security-group, the output should look similar to this:

$ awsm deleteSecurityGroups example-security-group
+------------------------+------------------------+-------------+------------------------+---------------+--------------+-----------+
|          NAME          |         CLASS          |  GROUP ID   |      DESCRIPTION       |      VPC      |    VPC ID    |  REGION   |
+------------------------+------------------------+-------------+------------------------+---------------+--------------+-----------+
| example-security-group | example-security-group | sg-6fc2d214 | Example Security Group | us-west-2-vpc | vpc-551c1637 | us-west-2 |
+------------------------+------------------------+-------------+------------------------+---------------+--------------+-----------+

▶  Are you sure you want to delete these Security Groups?                                              
◀  y

△  Deleted Security Group [example-security-group] in [us-west-2]!                                     

✓  Done!