Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Use Paginators for Stack SetInstance Validation #10

Open
flomotlik opened this issue Jul 31, 2019 · 0 comments
Open

Use Paginators for Stack SetInstance Validation #10

flomotlik opened this issue Jul 31, 2019 · 0 comments

Comments

@flomotlik
Copy link
Contributor

The python3.7 boto3 version doesn't support paginators for:

  • list_stack_sets
  • list_stack_set_instances

For now we've implemented our own paginator, but should switch when a newer boto is supported. Code:

paginator = cf.get_paginator('list_stack_sets')
[s['StackSetName'] for page in
    cf.get_paginator('list_stack_sets').paginate(Status='ACTIVE') for s in
    page['Summaries']]
paginator = cf.get_paginator('list_stack_instances')
di = {(i['Account'], (i['Region'])): i['Status'] for page in
      paginator.paginate(StackSetName=sn) for i in page['Summaries']}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant