AWS EC2 EIP实用程序。

eiputil的Python项目详细描述


https://img.shields.io/pypi/v/eiputil.svghttps://img.shields.io/pypi/l/eiputil.svghttps://img.shields.io/pypi/pyversions/eiputil.svghttps://img.shields.io/github/contributors/sig9org/eiputil.svg

埃普提尔

帮助您操作AWS EC2 eip的工具。在

使用

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.

安装单击完成命令完成

安装以使用制表符完成功能。在

^{pr2}$

描述弹性IP地址

显示EIP列表。在

$ eiputil describe
{"IPAddresses": [{"PublicIp": "192.0.2.1",
      "InstanceId": "i-0123456789abcdefg",
      "AllocationId": "eipalloc-1110123456789abcd"},
    {"PublicIp": "192.0.2.2",
      "InstanceId": "",
      "AllocationId": "eipalloc-2220123456789abcd"}]}

要仅显示与实例无关的地址,请指定–unassigned only选项。在

$ eiputil describe --unassigned-only
{"IPAddresses": [{"PublicIp": "192.0.2.2",
      "InstanceId": "",
      "AllocationId": "eipalloc-2220123456789abcd"}]}

分配弹性IP地址

分配EIP。在

$ eiputil allocate
{"AllocatedIPAddresses": [{"PublicIp": "192.0.2.1",
      "AllocationId": "eipalloc-1110123456789abcd"}]}

如果要指定多个EIP,请指定多个EIP。在

$ 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"}]}

指定include选项以仅输出获得的地址中的特定地址。在下面的示例中,仅显示包含175.4.192.0/18和103.4.8.0/21的结果。请注意,它只过滤结果的输出,并实际获得指定数量的地址。在

$ eiputil allocate --include 175.41.192.0/18 --include 103.4.8.0/21 100{"AllocatedIPAddresses": [{"PublicIp": "175.41.221.xx",
      "AllocationId": "eipalloc-0123456789abcdefg"}]}

释放弹性IP地址

释放EIP。在

$ eiputil release 192.0.2.1
{"ReleasedIPAddresses": [{"PublicIp": "192.0.2.1",
      "AllocationId": "eipalloc-1110123456789abcd"}]}

如果要释放多个EIP,请连续指定这些EIP。在

$ 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"}]}

释放所有弹性IP地址

释放所有未分配的EIP。在

$ 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"}]}

显示AWS ip范围

显示AWS ip范围。 (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"}]}

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java JNI和取消异步任务   java整数n作为List<String>的第二个参数传递。子列表(fromIndex,toIndex),但是stacktrace说toIndex在Kotlin中是n+2   如何在Java中正确嵌套多个ArrayList/Maps?   在嵌套条件语句中比较数组中的值时,java List没有打印正确的值   从CRON作业运行java代码   JRE使用jvisualvm检测到java致命错误   java将字符添加到BufferedReader中   带有枚举的java单例与带有双重检查锁定的单例   Java中的编译器构造基类的更改会影响子类的字节码吗?   Java作为Windows服务用户数据路径   java clone():ArrayList。克隆人()我认为它是一个肤浅的复制品   在jfilechooser多文件选择器启用中打开对话框后,java文件将显示所选文件   java在常用的操作方法中使用反射可以吗?   java ReloadableResourceBundleMessageSource。getMessage()不使用我给它的参数