Feature: AWS Secrets Manager list-secrets

This commit is contained in:
Chris K 2019-04-05 11:00:02 +01:00
parent 66dafc6679
commit 120874e408
2 changed files with 14 additions and 0 deletions

View File

@ -188,6 +188,10 @@ class SecretsManagerBackend(BaseBackend):
return response
def list_secrets(self, max_results, next_token):
# implement here
return secret_list, next_token
available_regions = (
boto3.session.Session().get_available_regions("secretsmanager")

View File

@ -64,3 +64,13 @@ class SecretsManagerResponse(BaseResponse):
rotation_lambda_arn=rotation_lambda_arn,
rotation_rules=rotation_rules
)
def list_secrets(self):
max_results = self._get_int_param("MaxResults")
next_token = self._get_param("NextToken")
secret_list, next_token = self.secretsmanager_backend.list_secrets(
max_results=max_results,
next_token=next_token,
)
# TODO: adjust response
return json.dumps(dict(secretList=secret_list, nextToken=next_token))