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.

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

      • States (active, blackhole).

      • 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.2.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.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aws_tgw_routes-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5a900b4fea42011d18fe98e58c36fd7e25078bcf435ed979618211bcc989d989
MD5 0cbbd99e5155e50e6e5b3bb6989edbac
BLAKE2b-256 e5a6b3274b8912b582079d98fa1ac7abce6a93737c82c74498cd54fb01337d6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aws_tgw_routes-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d4961aeef8b7155338f487789f21bbd146acd9b3d9e1e9dce81839cdaab527fb
MD5 7fbdc53d3d72c7442af81644a7b0bcd3
BLAKE2b-256 30d37a7a702c9eca1348339d17f7ffc0ef16aa83a51a9343f56a7bf21c9660cf

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