Boto Ec2 and elastic IP's

[亡魂溺海] 提交于 2019-12-12 14:44:06

问题


Is it possible to associate an an elastic IP address with an ec2 instance using python boto? I'm trying to automate a deploy. I searched the api documentation in the ec2 section and found nothing.


回答1:


Don't know what documentation you were looking at, but it's in there:

http://boto.readthedocs.org/en/latest/ref/ec2.html#boto.ec2.address.Address.associate

associate(instance_id=None, network_interface_id=None, private_ip_address=None, allow_reassociation=False, dry_run=False)

Associate this Elastic IP address with a currently running instance. :see: boto.ec2.connection.EC2Connection.associate_address()



来源:https://stackoverflow.com/questions/20448428/boto-ec2-and-elastic-ips

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!