Boto Ec2和弹性IP [英] Boto Ec2 and elastic IP's

查看:74
本文介绍了Boto Ec2和弹性IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用python boto将弹性IP地址与ec2实例相关联?我正在尝试自动化部署.我在ec2部分中搜索了api文档,却一无所获.

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.

推荐答案

不知道您要查看的文档是什么,但是它在那里:

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)

将此弹性IP地址与当前正在运行的实例相关联. :请参阅:boto.ec2.connection.EC2Connection.associate_address()

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

这篇关于Boto Ec2和弹性IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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