eiputil
A tool to help you operate AWS EC2 EIPs.
Usage
Usage: eiputil [OPTIONS] COMMAND [ARGS]...
Shell completion for click-completion-command
Available shell types:
bash Bourne again shell
fish Friendly interactive shell
powershell Windows PowerShell
zsh Z shell
Default type: auto
Options:
--help Show this message and exit.
Commands:
allocate Allocate Elastic IP addresses.
describe Describe Elastic IP addresses.
install Install the click-completion-command completion.
release Release Elastic IP addresses.
release-all Release all Elastic IP addresses.
show-ipranges Show AWS ip-ranges.
Install the click-completion-command completion
Install to use the tab completion function.
$ eiputil install bash
bash completion installed in /home/user/.bash_completion
Describe Elastic IP addresses.
Displays a list of EIPs.
$ eiputil describe
{
"IPAddresses": [
{
"PublicIp": "192.0.2.1",
"InstanceId": "i-0123456789abcdefg",
"AllocationId": "eipalloc-1110123456789abcd"
},
{
"PublicIp": "192.0.2.2",
"InstanceId": "",
"AllocationId": "eipalloc-2220123456789abcd"
}
]
}
To display only addresses that are not associated with an instance, specify the –unassigned-only option.
$ eiputil describe --unassigned-only
{
"IPAddresses": [
{
"PublicIp": "192.0.2.2",
"InstanceId": "",
"AllocationId": "eipalloc-2220123456789abcd"
}
]
}
Allocate Elastic IP addresses.
Assign an EIP.
$ eiputil allocate
{
"AllocatedIPAddresses": [
{
"PublicIp": "192.0.2.1",
"AllocationId": "eipalloc-1110123456789abcd"
}
]
}
If you want to assign multiple EIPs, specify the number.
$ eiputil allocate 3
{
"AllocatedIPAddresses": [
{
"PublicIp": "192.0.2.1",
"AllocationId": "eipalloc-1110123456789abcd"
},
{
"PublicIp": "192.0.2.2",
"AllocationId": "eipalloc-2220123456789abcd"
},
{
"PublicIp": "192.0.2.3",
"AllocationId": "eipalloc-3330123456789abcd"
}
]
}
Specify the include option to output only specific addresses among the obtained addresses. In the example below, only results containing 175.4.192.0/18 and 103.4.8.0/21 are displayed. Note that it only filters the output of the result and actually gets the specified number of addresses.
$ eiputil allocate --include 175.41.192.0/18 --include 103.4.8.0/21 100
{
"AllocatedIPAddresses": [
{
"PublicIp": "175.41.221.xx",
"AllocationId": "eipalloc-0123456789abcdefg"
}
]
}
Release Elastic IP addresses.
Release EIP.
$ eiputil release 192.0.2.1
{
"ReleasedIPAddresses": [
{
"PublicIp": "192.0.2.1",
"AllocationId": "eipalloc-1110123456789abcd"
}
]
}
If you want to release multiple EIPs, specify the EIPs consecutively.
$ eiputil release 192.0.2.1 192.0.2.2
{
"ReleasedIPAddresses": [
{
"PublicIp": "192.0.2.1",
"AllocationId": "eipalloc-1110123456789abcd"
},
{
"PublicIp": "192.0.2.2",
"AllocationId": "eipalloc-2220123456789abcd"
}
]
}
Release all Elastic IP addresses.
Release all unassigned EIPs.
$ eiputil release-all
{
"ReleasedIPAddresses": [
{
"PublicIp": "192.0.2.1",
"AllocationId": "eipalloc-1110123456789abcd"
},
{
"PublicIp": "192.0.2.2",
"AllocationId": "eipalloc-2220123456789abcd"
},
{
"PublicIp": "192.0.2.3",
"AllocationId": "eipalloc-3330123456789abcd"
}
]
}
Show AWS ip-ranges.
Show AWS ip-ranges. (https://ip-ranges.amazonaws.com/ip-ranges.json)
$ eiputil show-ipranges
{
"syncToken": "1582935190",
"createDate": "2020-02-29-00-13-10",
"prefixes": [
{
"ip_prefix": "13.248.118.0/24",
"region": "eu-west-1",
"service": "AMAZON"
},
{
"ip_prefix": "18.208.0.0/13",
"region": "us-east-1",
"service": "AMAZON"
},
.
.
.
{
"ipv6_prefix": "2600:9000:ddd::/48",
"region": "GLOBAL",
"service": "CLOUDFRONT"
},
{
"ipv6_prefix": "2600:9000:5300::/40",
"region": "GLOBAL",
"service": "CLOUDFRONT"
}
]
}
Metadata
Release files for eiputil 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eiputil-0.0.2.tar.gz | 6.4 kB | Without provenance | Details for eiputil-0.0.2.tar.gz |
Release files / eiputil-0.0.2.tar.gz
| Download URL | eiputil-0.0.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cde9067378b30717b1cf3668b319f2eb83d9ce79015ec6d862d36a02dc69fcd2
|
|
BLAKE2b-256 checksum How to use checksums |
53ea1dc781687b90177c3a3cf880367bd4d5f79df4199e238983e4b3243c9767
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.8
|
Security for eiputil 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.