Feature: AWS Secrets Manager list-secrets
This commit is contained in:
parent
66dafc6679
commit
120874e408
@ -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")
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user