iam list_roles method documentation

40 views
Skip to first unread message

Neubyr N

unread,
Mar 27, 2015, 6:43:23 PM3/27/15
to boto-...@googlegroups.com

boto.iam 's list_roles action returns 'list_roles_response' type - http://boto.readthedocs.org/en/latest/ref/iam.html#boto.iam.connection.IAMConnection.list_roles

How do I iterate over this response? Where do I find documentation for 'list_roles_response'?

I found some examples where people have used "list_roles_response.list_roles_result.roles", but is this documented somewhere?


- thanks,
N

Adrian Klaver

unread,
Mar 27, 2015, 7:11:48 PM3/27/15
to boto-...@googlegroups.com
On 03/27/2015 03:37 PM, Neubyr N wrote:
>
> boto.iam 's list_roles action returns 'list_roles_response' type
> - http://boto.readthedocs.org/en/latest/ref/iam.html#boto.iam.connection.IAMConnection.list_roles

So you are you saying it returns a list of list_roles_response objects?

> .

>
> How do I iterate over this response? Where do I find documentation for
> 'list_roles_response'?

What I generally do is in IPython isolate one of the objects, say
something like list_response = list_role[0]. Then either do:

list_response?

or

list_response. and tab to see the attributes presented.

>
> I found some examples where people have used
> "list_roles_response.list_roles_result.roles", but is this documented
> somewhere?
>
>
> - thanks,
> N
>
> --
> 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

Kamal Gill

unread,
Mar 27, 2015, 9:23:07 PM3/27/15
to boto-...@googlegroups.com
You could simplify it to iam_conn.list_roles().roles


Unfortunately boto doesn’t document what list_roles returns at

-Kamal


--
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.
To post to this group, send email to boto-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages