SecretsManager: Add ability to list all encrypted values (#108512)
* list all encrypted values and count * separate interfaces * add time filter to global queries * fix lint
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
SELECT COUNT(*) AS count
|
||||
FROM
|
||||
{{ .Ident "secret_encrypted_value" }}
|
||||
{{ if .HasUntilTime }}
|
||||
WHERE {{ .Ident "created" }} <= {{ .Arg .UntilTime }}
|
||||
{{ end }}
|
||||
;
|
||||
@@ -0,0 +1,17 @@
|
||||
SELECT
|
||||
{{ .Ident "namespace" }},
|
||||
{{ .Ident "name" }},
|
||||
{{ .Ident "version" }},
|
||||
{{ .Ident "encrypted_data" }},
|
||||
{{ .Ident "created" }},
|
||||
{{ .Ident "updated" }}
|
||||
FROM
|
||||
{{ .Ident "secret_encrypted_value" }}
|
||||
{{ if .HasUntilTime }}
|
||||
WHERE {{ .Ident "created" }} <= {{ .Arg .UntilTime }}
|
||||
{{ end }}
|
||||
ORDER BY {{ .Ident "created" }} ASC
|
||||
{{ if (gt .Limit 0) }}
|
||||
LIMIT {{ .Arg .Limit }} OFFSET {{ .Arg .Offset }}
|
||||
{{ end }}
|
||||
;
|
||||
Reference in New Issue
Block a user