Added support for SSM get_parameters_by_path. (#1299)
* Added support for SSM get_parameters_by_path. Signed-off-by: Kai Xia <xiaket@gmail.com> * add logic to handle trailing '/'. Also, fix pep8. Signed-off-by: Kai Xia <kai.xia@sportsbet.com.au> * add tests for parameter value in response. Signed-off-by: Kai Xia <kai.xia@sportsbet.com.au>
This commit is contained in:
parent
2d9e622e79
commit
3740db8059
3 changed files with 79 additions and 0 deletions
|
|
@ -81,6 +81,25 @@ class SimpleSystemManagerResponse(BaseResponse):
|
|||
response['InvalidParameters'].append(name)
|
||||
return json.dumps(response)
|
||||
|
||||
def get_parameters_by_path(self):
|
||||
path = self._get_param('Path')
|
||||
with_decryption = self._get_param('WithDecryption')
|
||||
recursive = self._get_param('Recursive', False)
|
||||
|
||||
result = self.ssm_backend.get_parameters_by_path(
|
||||
path, with_decryption, recursive
|
||||
)
|
||||
|
||||
response = {
|
||||
'Parameters': [],
|
||||
}
|
||||
|
||||
for parameter in result:
|
||||
param_data = parameter.response_object(with_decryption)
|
||||
response['Parameters'].append(param_data)
|
||||
|
||||
return json.dumps(response)
|
||||
|
||||
def describe_parameters(self):
|
||||
page_size = 10
|
||||
filters = self._get_param('Filters')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue