On 06/15/2015 11:00 AM, Jacob Coleman wrote:
> Hi everyone!
>
> I'm attempting to create an AMI from an instance, and then assign it
> tags so that AMI can then be manipulated by other parts of a script.
> When I attempt to add_tags to the create_image, i.e.:
>
> ami = conn.create_image(blah, blah, blah)
> ami.add_tag({tag stuff})
>
> It gives me an error stating that add_tags isn't a part of create_image.
Because it is not. Take the image_id returned from create_image and then
use get_image(image_id) to get the actual image and use image.add_tag()
http://boto.readthedocs.org/en/latest/ref/ec2.html
> I've tried then pulling down a list of images to add tags to, but cannot
> do a partial match on a filter it seems:
>
> conn.get_all_images(filters={'description': 'DRBackup*'})
conn.get_all_images(filters={'tag:description': 'DRBackup*'})
>
> Any advice on solving both issues?
>
> --
> You received this message because you are subscribed to the Google
> Groups "boto-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
boto-users+...@googlegroups.com
> <mailto:
boto-users+...@googlegroups.com>.
> To post to this group, send email to
boto-...@googlegroups.com
> <mailto:
boto-...@googlegroups.com>.
> Visit this group at
http://groups.google.com/group/boto-users.
> For more options, visit
https://groups.google.com/d/optout.
--
Adrian Klaver
adrian...@aklaver.com