- add nextToken support (#64598)
* - add nextToken support * - add changelog fragment * - use boto3 paginator for describe_log_groups
This commit is contained in:
parent
0f491c0289
commit
f145057c5c
2 changed files with 4 additions and 1 deletions
2
changelogs/fragments/64598-add-next-token-support.yml
Normal file
2
changelogs/fragments/64598-add-next-token-support.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- cloudwatchlogs_log_group_info - remove limitation of max 50 results
|
|
@ -89,7 +89,8 @@ def describe_log_group(client, log_group_name, module):
|
||||||
if log_group_name:
|
if log_group_name:
|
||||||
params['logGroupNamePrefix'] = log_group_name
|
params['logGroupNamePrefix'] = log_group_name
|
||||||
try:
|
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
|
return desc_log_group
|
||||||
except botocore.exceptions.ClientError as e:
|
except botocore.exceptions.ClientError as e:
|
||||||
module.fail_json(msg="Unable to describe log group {0}: {1}".format(log_group_name, to_native(e)),
|
module.fail_json(msg="Unable to describe log group {0}: {1}".format(log_group_name, to_native(e)),
|
||||||
|
|
Loading…
Reference in a new issue