mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-30 21:09:09 -07:00
Paginate DB cluster responses in AWS RDS dynamic inventory
This commit is contained in:
parent
59e499f8f0
commit
0783c172d7
2 changed files with 8 additions and 2 deletions
|
@ -597,7 +597,13 @@ class Ec2Inventory(object):
|
|||
"getting RDS clusters")
|
||||
|
||||
client = ec2_utils.boto3_inventory_conn('client', 'rds', region, **self.credentials)
|
||||
clusters = client.describe_db_clusters()["DBClusters"]
|
||||
|
||||
marker, clusters = '', []
|
||||
while marker is not None:
|
||||
resp = client.describe_db_clusters(Marker=marker)
|
||||
clusters.extend(resp["DBClusters"])
|
||||
marker = resp.get('Marker', None)
|
||||
|
||||
account_id = boto.connect_iam().get_user().arn.split(':')[4]
|
||||
c_dict = {}
|
||||
for c in clusters:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue