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(routes=routes)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aws_tgw_routes-1.0.4.tar.gz.
File metadata
- Download URL: aws_tgw_routes-1.0.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5293dce2d363ccfdde99640905be33778bbdd7b915f86364af58efbdc13b05a7
|
|
| MD5 |
160ac68bfce52625bed1aba7b4106332
|
|
| BLAKE2b-256 |
c31b708dbf2379e4fe2af7f73f74bf03ba0d1893eb7c5d9179fe8f52449ecc41
|
File details
Details for the file aws_tgw_routes-1.0.4-py3-none-any.whl.
File metadata
- Download URL: aws_tgw_routes-1.0.4-py3-none-any.whl
- Upload date:
- Size: 5.5 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74a36c8c979dbc3e7e8210b5a60bca85ab5438c45878aa9c5fc898d6e5cc85b2
|
|
| MD5 |
ef63d769f292454c74504d2b4f651859
|
|
| BLAKE2b-256 |
0ce51c53c2168bd99fbfbff32092ec10b8beee61302f0198a46aa7dd0650814b
|