Skip to content

Instantly share code, notes, and snippets.

@metalrufflez
Created April 7, 2017 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metalrufflez/3703b181490f26a5e125c281f469f03b to your computer and use it in GitHub Desktop.
Save metalrufflez/3703b181490f26a5e125c281f469f03b to your computer and use it in GitHub Desktop.
# Cada execução retorna 50 items, quero uma lista com todos os
# items que tiverem um filtro no "campo" name do item
lc_filter = "filter"
lc_list = asg_conn.get_all_launch_configurations()
while true:
lc_subset = asg_conn.get_all_launch_configurations(next_token=lc_list[-1].name)
if len(lc_subset) == 0:
break
else:
lc_list.extend(lc_subset)
lc_filtered = [lc for lc in lc_list if lc_filter in lc.name]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment