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(routes=routes)
Release files for aws_tgw_routes 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aws_tgw_routes-1.0.4.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aws_tgw_routes-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / aws_tgw_routes-1.0.4.tar.gz
| Download URL | aws_tgw_routes-1.0.4.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5293dce2d363ccfdde99640905be33778bbdd7b915f86364af58efbdc13b05a7
|
|
BLAKE2b-256 checksum How to use checksums |
c31b708dbf2379e4fe2af7f73f74bf03ba0d1893eb7c5d9179fe8f52449ecc41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.3 Linux/5.15.154+
|
Release files / aws_tgw_routes-1.0.4-py3-none-any.whl
| Download URL | aws_tgw_routes-1.0.4-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74a36c8c979dbc3e7e8210b5a60bca85ab5438c45878aa9c5fc898d6e5cc85b2
|
|
BLAKE2b-256 checksum How to use checksums |
0ce51c53c2168bd99fbfbff32092ec10b8beee61302f0198a46aa7dd0650814b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.3 Linux/5.15.154+
|