如何找到在重新启动一个Amazon EC2实例的IP地址 [英] How to find the IP address of an amazon EC2 instance on reboot

查看:1021
本文介绍了如何找到在重新启动一个Amazon EC2实例的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在重新启动时,Amazon实例的IP地址的变化。如何使用Java API来寻找新的IP地址?

On reboot, the IP address of an amazon instance changes. How to find the new IP address using java API?

推荐答案

假设你不想分配弹性IP地址(也有原因,这并不总是一个解决方案),则只需拨打 DescribeInstances 在重新启动实例,返回一串信息,包括公网IP地址。

Assuming you don't want to assign an Elastic IP address (and there are reasons why this is not always a solution) then simply call DescribeInstances on the rebooted instance, which returns a bunch of information including Public IP Address.

这里是的话题AWS EC2 Java API文档

这篇关于如何找到在重新启动一个Amazon EC2实例的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆