Skip to main content

Manage AWS Transit Gateway routes.

Project description

Overview

Manage AWS Transit Gateway routes.

Functions

  • get_tgw_routes
    • Filter by:
      • Transit Gateway Route Table IDs.

      • [Optional] Resource Types (vpc, vpn, direct-connect-gateway, peering, connect).

      • [Optional] States (active, blackhole).

      • [Optional] Types (static, propagated).

  • add_tgw_routes
    • Add static routes: specify CIDR in route dictionary.

    • Add propagated routes: don’t specify CIDR in route dictionary.

Usage

  • Installation:

pip3 install aws_tgw_routes
# or
python3 -m pip install aws_tgw_routes
  • Set common environment variables (or use them as function arguments):

export AWS_ACCESS_KEY_ID=your_access_key_id
export AWS_SECRET_ACCESS_KEY=your_secret_access_key
export AWS_SESSION_TOKEN=your_session_token
export AWS_REGION=your_aws_region
  • GET examples:

Set environment variables (or use them as function arguments):

export AWS_TGW_RT_IDS=comma-separated_tgw_route_table_ids
export RESOURCE_TYPES=comma-separated_resource_types
export STATES=comma-separated_states
export TYPES=comma-separated_types

Execute function:

from pprint import pprint
from aws_tgw_routes import get_tgw_routes

response = get_tgw_routes.main()
pprint(response, indent=2)
  • ADD examples:

Set function arguments and execute function:

from aws_tgw_routes import add_tgw_routes

routes = [
   {
      "rt": "tgw-rtb-0123456789abcdef0",
      "att": "tgw-attach-0123456789abcdef0",
      "cidr": "10.0.0.0/16"
   },
   {
      "rt": "tgw-rtb-0123456789abcdef0",
      "att": "tgw-attach-0fedcba9876543210"
   }
]

add_tgw_routes.main()

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_routes-1.0.3.tar.gz (3.1 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_routes-1.0.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file aws_tgw_routes-1.0.3.tar.gz.

File metadata

  • Download URL: aws_tgw_routes-1.0.3.tar.gz
  • Upload date:
  • Size: 3.1 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_routes-1.0.3.tar.gz
Algorithm Hash digest
SHA256 47db9a8ab6018041d57855f9d90d2d412a3644909dd1b1a365f240b748ca0f74
MD5 a6b133424cff93cc558bb8fa32230b87
BLAKE2b-256 3269cfed7adbd545b5b6c954ee482d993bbc4326ef3a02f56a273752fa1c710b

See more details on using hashes here.

File details

Details for the file aws_tgw_routes-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: aws_tgw_routes-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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_routes-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 01fad122d4385c875c9442e0a53e661d10f9f350ff4fbc90d2f5d3685e28a5c5
MD5 7523099341fd05adae8f4df17d78a661
BLAKE2b-256 2dd4e9afd2035d2bf5296b709920fd700ec897f30ac8e1fb62c46316f8a09170

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