Add Pagination to ssm:get_parameters_by_path. Closes #1864

This commit is contained in:
Adam Smith 2019-11-27 22:12:31 +00:00
commit 051193e1bf
3 changed files with 47 additions and 6 deletions

View file

@ -158,6 +158,20 @@ def test_get_parameters_by_path():
len(response["Parameters"]).should.equal(1)
{p["Name"] for p in response["Parameters"]}.should.equal(set(["/baz/pwd"]))
response = client.get_parameters_by_path(Path="/", Recursive=True, MaxResults=4)
len(response["Parameters"]).should.equal(4)
response["NextToken"].should.equal("4")
response = client.get_parameters_by_path(
Path="/", Recursive=True, MaxResults=4, NextToken=response["NextToken"]
)
len(response["Parameters"]).should.equal(4)
response["NextToken"].should.equal("8")
response = client.get_parameters_by_path(
Path="/", Recursive=True, MaxResults=4, NextToken=response["NextToken"]
)
len(response["Parameters"]).should.equal(1)
response.should_not.have.key("NextToken")
@mock_ssm
def test_put_parameter():