mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
This commit is contained in:
parent
2d90f50eeb
commit
67cd641c04
1 changed files with 1 additions and 1 deletions
|
@ -181,7 +181,7 @@ class CloudFrontInvalidationServiceManager(object):
|
|||
# find all invalidations for the distribution
|
||||
try:
|
||||
paginator = self.client.get_paginator('list_invalidations')
|
||||
invalidations = paginator.paginate(DistributionId=distribution_id).build_full_result()['InvalidationList'].get('Items', [])
|
||||
invalidations = paginator.paginate(DistributionId=distribution_id).build_full_result().get('InvalidationList', {}).get('Items', [])
|
||||
invalidation_ids = [inv['Id'] for inv in invalidations]
|
||||
except (BotoCoreError, ClientError) as e:
|
||||
self.module.fail_json_aws(e, msg="Error listing CloudFront invalidations.")
|
||||
|
|
Loading…
Reference in a new issue