Skip to main content

Get AWS Transit Gateway details.

Project description

Overview

Get AWS Transit Gateway details.

Workflow diagram

This module helps to retrieve AWS Transit Gateway details, including the following:

  • Transit Gateways

  • Transit Gateway Route Tables

  • Transit Gateway Routes

  • Transit Gateway Attachments

  • Customer Gateways

  • VPN Connections

The aws_authenticator module is installed with this module, and is used to login to AWS using IAM access key credentials from the following environment variables:

  • TGW_AWS_ACCESS_KEY_ID

  • TGW_AWS_SECRET_ACCESS_KEY

  • TGW_AWS_SESSION_TOKEN (Optional. Default: None.)

If the environment variables are not set, the module will try to use the default AWS credentials from the AWS CLI configuration file.

Usage

  • Installation:

pip3 install aws_tgw_details
# or
python3 -m pip install aws_tgw_details
  • Set environment variables:

export TGW_AWS_ACCESS_KEY_ID=your_access_key_id
export TGW_AWS_SECRET_ACCESS_KEY=your_secret_access_key
export TGW_AWS_SESSION_TOKEN=your_session_token
  • Examples:

# Overview.
aws_tgws

# Help.
aws_tgws -h

# Get all Transit Gateways.
aws_tgws -t ALL

# Get a specific Transit Gateway.
aws_tgws -t tgw-1234567890abcdef0

# Get all Customer Gateways.
aws_tgws -c ALL

You can also use the available functions independently to create your own workflow instead of using the installed aws_tgws command line tool.

Options

-h, --help           show this help message and exit
-V, --version        show program's version number and exit
-t, --tgw_id [TGW_ID]
                     Transit Gateway ID. Use 'ALL' to get all TGWs. Default: None.
-y, --tgw_only       Transit Gateway details only, no other components.
-r, --tgw_rt_id [TGW_RT_ID]
                     Transit Gateway Route Table ID. Default: None.
-a, --tgw_attachment_id [TGW_ATTACHMENT_ID]
                     Transit Gateway Attachment ID. Default: None.
-v, --tgw_vpn_connection_id [TGW_VPN_CONNECTION_ID]
                     VPN Connection ID. Use 'ALL' to get all connections. Default: None.
-c, --cgw_id [CGW_ID]
                     Customer Gateway ID. Use 'ALL' to get all CGWs. Default: None.
-w, --region [REGION]
                     AWS Region. Default: us-east-1.
-l, --log_path [LOG_PATH]
                     Log file path. Default: /tmp.
-e, --log_level [{NONE,DEBUG,INFO,WARNING,ERROR,CRITICAL}]
                     Log level. Default: INFO.
-o, --output_file [OUTPUT_FILE]
                     Output file and path. Default: ./transit_gateway_details.json

Output

The output is in the JSON format. Additionally, the output for the full Transit Gateway details will also be written to file. You can customize the output path and file name using the -o option. More details in help.

Logging

The module creates logs in the /tmp directory with the <application_name>.<utc_date_and_time>.log file name format. This can be customized or disabled by setting the -l and -e options. More details in help.

Boto3 Functions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws_tgw_details-1.0.13.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_tgw_details-1.0.13-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file aws_tgw_details-1.0.13.tar.gz.

File metadata

  • Download URL: aws_tgw_details-1.0.13.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/5.15.154+

File hashes

Hashes for aws_tgw_details-1.0.13.tar.gz
Algorithm Hash digest
SHA256 aab545840a14c87456163569c92d24a5c2db86f5d2885d65a614e971a827bc84
MD5 793acf2480be03bac27dc208fcf710ea
BLAKE2b-256 f5c243ba9a92224e8411847418a8b2adbfb77a9f7f4da6bba0b1dbe5d4679e76

See more details on using hashes here.

File details

Details for the file aws_tgw_details-1.0.13-py3-none-any.whl.

File metadata

  • Download URL: aws_tgw_details-1.0.13-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/5.15.154+

File hashes

Hashes for aws_tgw_details-1.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 5408480088570ef341638f18e704f1342daebdd5de7e5dcab3761da127dcbe62
MD5 aac88ba35660df66f25322bd80c16ce8
BLAKE2b-256 5f1f27d6e96bd5edb427ba40a3055d60eb9d755aab411332e84f1b57e7ea4018

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page