Skip to content

Amazon Web Services Amazon Web Services: EC2 - Virtual Private Clouds

Summary

This module contains actions for viewing & managing EC2 VPCs.

Actions

aws.ec2.vpcs.

get_all

Get all VPCs.

Minimum Plugin Version: 2.0.0

Input
  • aws_client: an AWSClient dictionary

  • region_name: the EC2 region name

Output

A list of EC2VPC dictionaries.

Example
1
2
3
4
5
- aws.ec2.vpcs.get_all:
    region_name: eu-west-2
  load:
    aws_client: aws_secrets
  save: all_vpcs

aws.ec2.vpcs.

input_table

Display a list of VPCs in a table, & allow the task operator to make a selection.

The table will have the following columns:

  • Name
  • ID
  • CIDR
  • State
  • Default

Minimum Plugin Version: 2.0.0

Input
  • text: the title of the table

  • instances: a list of EC2VPC dictionaries to display in the table

  • minimum: The minimum number of acceptable selections

  • maximum: The maximum number of acceptable selections

Output

A list of EC2VPC dictionaries.

Tip
  • If neither a minimum or maximum is provided, the task operator will be able to submit 0 selections.

  • If minimum or maximum are provided, the operation will repeat until a valid number of selections is made.

Example

Finding VPCs with get_all, saving them as vpcs, & waiting for a single selection:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
- aws.ec2.vpcs.get_all:
    region_name: eu-west-2
  load:
    aws_client: aws_secrets
  save: vpcs

- aws.ec2.vpcs.input_table:
    text: Choose a VPC
    minimum: 1
    maximum: 1
  load:
    vpcs: vpcs
  save: selected_vpc

aws.ec2.vpcs.

output_table

Display a list of VPCs in a table.

The table will have the following columns:

  • Name
  • ID
  • CIDR
  • State
  • Default

Minimum Plugin Version: 2.0.0

Input
  • text: the title of the table

  • vpcs: a single or list of EC2VPC dictionaries

Output

Nothing is outputted by this action.

Multiple VPCs

Finding all VPCs with get_all, saving them as vpcs, & displaying them:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- aws.ec2.vpcs.get_all:
    region_name: eu-west-2
  load:
    aws_client: aws_secrets
  save: vpcs

- aws.ec2.vpcs.output_table:
    text: All VPCs
  load:
    vpcs: vpcs