Amazon Web Services Amazon Web Services: EC2 - Key Pairs

Summary

This module contains actions for viewing EC2 Key Pairs.

Actions

aws.ec2.key_pairs.

get_all

Get all key pairs.

Minimum Plugin Version: 2.2.0

Input
  • aws_client: an AWSClient dictionary

  • region_name: the EC2 region name

Output

A list of KeyPair dictionaries.

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

aws.ec2.key_pairs.

input_table

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

The table will have the following columns:

  • Name
  • ID

Minimum Plugin Version: 2.2.0

Input
  • text: the title of the table

  • key_pairs: a list of KeyPair dictionaries to display in the table

  • minimum: The minimum number of acceptable selections

  • maximum: The maximum number of acceptable selections

Output

A list of KeyPair 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
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
- aws.ec2.key_pairs.get_all:
    region_name: eu-west-2
  load:
    aws_client: aws_secrets
  save: all_key_pairs

- aws.ec2.key_pairs.input_table:
    text: Select a key pair
    minimum: 1
    maximum: 1
  load:
    key_pairs: all_key_pairs
  save: selected_key_pair

aws.ec2.key_pairs.

output_table

Display a list of key pairs in a table.

The table will have the following columns:

  • Name
  • ID

Minimum Plugin Version: 2.2.0

Input
  • text: the title of the table

  • key_pairs: a single or list of KeyPair dictionaries

Output

Nothing is outputted by this action.

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

- aws.ec2.key_pairs.output_table:
    text: All Key Pairs
  load:
    key_pairs: all_key_pairs