Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Lists all of the secrets that are stored by Secrets Manager in the
Amazon Web Services account. To list the versions currently stored for a
specific secret, use ListSecretVersionIds. The encrypted fields
SecretString
and SecretBinary
are not included in the output. To get
that information, call the GetSecretValue operation.
Always check the NextToken
response parameter when calling any of the
List*
operations. These operations can occasionally return an empty or
shorter than expected list of results even when there more results
become available. When this happens, the NextToken
response parameter
contains a value to pass to the next call to the same API to request the
next part of the list.
Minimum permissions
To run this command, you must have the following permissions:
- secretsmanager:ListSecrets
Related operations
- To list the versions attached to a secret, use ListSecretVersionIds.
This operation returns paginated results.
Synopsis
- data ListSecrets = ListSecrets' {}
- newListSecrets :: ListSecrets
- listSecrets_filters :: Lens' ListSecrets (Maybe [Filter])
- listSecrets_nextToken :: Lens' ListSecrets (Maybe Text)
- listSecrets_sortOrder :: Lens' ListSecrets (Maybe SortOrderType)
- listSecrets_maxResults :: Lens' ListSecrets (Maybe Natural)
- data ListSecretsResponse = ListSecretsResponse' {
- nextToken :: Maybe Text
- secretList :: Maybe [SecretListEntry]
- httpStatus :: Int
- newListSecretsResponse :: Int -> ListSecretsResponse
- listSecretsResponse_nextToken :: Lens' ListSecretsResponse (Maybe Text)
- listSecretsResponse_secretList :: Lens' ListSecretsResponse (Maybe [SecretListEntry])
- listSecretsResponse_httpStatus :: Lens' ListSecretsResponse Int
Creating a Request
data ListSecrets Source #
See: newListSecrets
smart constructor.
ListSecrets' | |
|
Instances
newListSecrets :: ListSecrets Source #
Create a value of ListSecrets
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:filters:ListSecrets'
, listSecrets_filters
- Lists the secret request filters.
$sel:nextToken:ListSecrets'
, listSecrets_nextToken
- (Optional) Use this parameter in a request if you receive a NextToken
response in a previous request indicating there's more output
available. In a subsequent call, set it to the value of the previous
call NextToken
response to indicate where the output should continue
from.
$sel:sortOrder:ListSecrets'
, listSecrets_sortOrder
- Lists secrets in the requested order.
$sel:maxResults:ListSecrets'
, listSecrets_maxResults
- (Optional) Limits the number of results you want to include in the
response. If you don't include this parameter, it defaults to a value
that's specific to the operation. If additional items exist beyond the
maximum you specify, the NextToken
response element is present and has
a value (isn't null). Include that value as the NextToken
request
parameter in the next call to the operation to get the next part of the
results. Note that Secrets Manager might return fewer results than the
maximum even when there are more results available. You should check
NextToken
after every operation to ensure that you receive all of the
results.
Request Lenses
listSecrets_filters :: Lens' ListSecrets (Maybe [Filter]) Source #
Lists the secret request filters.
listSecrets_nextToken :: Lens' ListSecrets (Maybe Text) Source #
(Optional) Use this parameter in a request if you receive a NextToken
response in a previous request indicating there's more output
available. In a subsequent call, set it to the value of the previous
call NextToken
response to indicate where the output should continue
from.
listSecrets_sortOrder :: Lens' ListSecrets (Maybe SortOrderType) Source #
Lists secrets in the requested order.
listSecrets_maxResults :: Lens' ListSecrets (Maybe Natural) Source #
(Optional) Limits the number of results you want to include in the
response. If you don't include this parameter, it defaults to a value
that's specific to the operation. If additional items exist beyond the
maximum you specify, the NextToken
response element is present and has
a value (isn't null). Include that value as the NextToken
request
parameter in the next call to the operation to get the next part of the
results. Note that Secrets Manager might return fewer results than the
maximum even when there are more results available. You should check
NextToken
after every operation to ensure that you receive all of the
results.
Destructuring the Response
data ListSecretsResponse Source #
See: newListSecretsResponse
smart constructor.
ListSecretsResponse' | |
|
Instances
newListSecretsResponse Source #
Create a value of ListSecretsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:nextToken:ListSecrets'
, listSecretsResponse_nextToken
- If present in the response, this value indicates that there's more
output available than included in the current response. This can occur
even when the response includes no values at all, such as when you ask
for a filtered view of a very long list. Use this value in the
NextToken
request parameter in a subsequent call to the operation to
continue processing and get the next part of the output. You should
repeat this until the NextToken
response element comes back empty (as
null
).
$sel:secretList:ListSecretsResponse'
, listSecretsResponse_secretList
- A list of the secrets in the account.
$sel:httpStatus:ListSecretsResponse'
, listSecretsResponse_httpStatus
- The response's http status code.
Response Lenses
listSecretsResponse_nextToken :: Lens' ListSecretsResponse (Maybe Text) Source #
If present in the response, this value indicates that there's more
output available than included in the current response. This can occur
even when the response includes no values at all, such as when you ask
for a filtered view of a very long list. Use this value in the
NextToken
request parameter in a subsequent call to the operation to
continue processing and get the next part of the output. You should
repeat this until the NextToken
response element comes back empty (as
null
).
listSecretsResponse_secretList :: Lens' ListSecretsResponse (Maybe [SecretListEntry]) Source #
A list of the secrets in the account.
listSecretsResponse_httpStatus :: Lens' ListSecretsResponse Int Source #
The response's http status code.