Printing Tags #1016

Open
vasiliyb opened this Issue Sep 25, 2012 · 2 comments

Projects

None yet

3 participants

@vasiliyb

Folks, I am trying to retrieve not only instance ids of my running machines, but also the aliased names which I've added to them in the aws console.

Is this the proper way to do this? I am not getting back anything interesting....

import boto
botoEC2 = boto.connect_ec2('asdf','asdfasdfasdfasdf')
rsv = botoEC2.get_all_instances()
tags = botoEC2.get_all_tags()
print tags
dir (tags)
print tags
print tags.status
print tags.pop
print tags.count
print tags.tagSet
print tags.requestId
print tags.index
print tags.
print tags.requestId
print tags.index
print tags.key_marker

print tags

output:
[Tag:ec2tag, Tag:Name, Tag:Name, Tag:Name, Tag:Name, Tag:Name, Tag:Name, Tag:Name, Tag:Name, Tag:Name, Tag:Name, Tag:Name, Tag:ec2tag, Tag:Name, Tag:Name, Tag:Name, Tag:Name, Tag:Name]

Thanks!

@garnaat
the boto project member

get_all_tags() returns a list of Tag objects. Each Tag object has a name attribute and a value attribute. Does that help?

@wt
wt commented Feb 11, 2015

This looks like an issue that could be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment