Code: Select all
def get_raw_parameters_group_by_namespace(namespace_path):
raw_params_response = None
try:
if not namespace_path:
raise Exception('Namespace path should be specified to get data')
raw_params_response = ssm_ps.get_parameters_by_path(Path = namespace_path)
except Exception as e:
raise Exception('An error ocurred while trying to get parameters group: ' + str(e))
return raw_params_response
< /code>
Ich hatte früher etwa 7 bis 10 Parameter in SSM und diese Methode hat gut funktioniert. Wir benötigten heutzutage einige zusätzliche Parameter und die Anzahl von ihnen auf 14. Deshalb habe ich versucht, eine Eigenschaft in der Boto3 -SSM -Methode mit dem Namen "MaxResults" hinzuzufügen und auf 50: < /p>
ssm_ps.get_parameters_by_path(Path = namespace_path, MaxResults = 50)
< /code>
, aber ich erhalte Folgendes: < /p>
"error": "An error ocurred while trying to get parameters group: An error occurred (ValidationException) when calling the GetParametersByPath operation: 1 validation error detected: Value '50' at 'maxResults' failed to satisfy constraint: Member must have value less than or equal to 10."
Code: Select all
raw_params_response = ssm_ps.get_parameters_by_path(Path = namespace_path, NextToken = 'Token')
Danke im Voraus.