ENH: changes the behavior of delete_parameter to respond with a 400 error when the parameter does not exist.

Currently, the delete_parameter function for the ssm client will respond with a dict containing a key of Invalid Parameter which has a value of a list containing the parameter name that was requested to be deleted when a parameter with said name doesn't exist which doesn't match the behavior of boto3.
This commit is contained in:
Olabode Anise 2020-02-25 20:25:44 -05:00
commit 607e0a8452
3 changed files with 22 additions and 5 deletions

View file

@ -278,10 +278,7 @@ class SimpleSystemManagerBackend(BaseBackend):
self._region = region
def delete_parameter(self, name):
try:
del self._parameters[name]
except KeyError:
pass
return self._parameters.pop(name, None)
def delete_parameters(self, names):
result = []