- add nextToken support (#64598)

* - add nextToken support

* - add changelog fragment

* - use boto3 paginator for describe_log_groups
This commit is contained in:
Rene Schumann 2019-11-11 19:27:09 +01:00 committed by ansibot
parent 0f491c0289
commit f145057c5c
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- cloudwatchlogs_log_group_info - remove limitation of max 50 results

View file

@ -89,7 +89,8 @@ def describe_log_group(client, log_group_name, module):
if log_group_name:
params['logGroupNamePrefix'] = log_group_name
try:
desc_log_group = client.describe_log_groups(**params)
paginator = client.get_paginator('describe_log_groups')
desc_log_group = paginator.paginate(**params).build_full_result()
return desc_log_group
except botocore.exceptions.ClientError as e:
module.fail_json(msg="Unable to describe log group {0}: {1}".format(log_group_name, to_native(e)),