1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[aws_ssm_parameter_store] use describe_parameters paginator (#45632)

Fix the service reaching an internal limit while processing the results and returning unexpected data
This commit is contained in:
Jon Cormier 2018-09-14 15:17:15 -04:00 committed by Sloane Hertel
parent 1d754b43de
commit 7aaa5da41d

View file

@ -185,7 +185,10 @@ def create_update_parameter(client, module):
# Description field not available from get_parameter function so get it from describe_parameters
describe_existing_parameter = None
try:
describe_existing_parameter = client.describe_parameters(Filters=[{"Key": "Name", "Values": [args['Name']]}])
describe_existing_parameter_paginator = client.get_paginator('describe_parameters')
describe_existing_parameter = describe_existing_parameter_paginator.paginate(
Filters=[{"Key": "Name", "Values": [args['Name']]}]).build_full_result()
except ClientError as e:
module.fail_json_aws(e, msg="getting description value")