| Copyright | (c) 2013-2018 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 |
| Language | Haskell2010 |
Network.AWS.SecretsManager.ListSecrets
Description
Lists all of the secrets that are stored by Secrets Manager in the AWS 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.
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.
Synopsis
- listSecrets :: ListSecrets
- data ListSecrets
- lsNextToken :: Lens' ListSecrets (Maybe Text)
- lsMaxResults :: Lens' ListSecrets (Maybe Natural)
- listSecretsResponse :: Int -> ListSecretsResponse
- data ListSecretsResponse
- lsrsNextToken :: Lens' ListSecretsResponse (Maybe Text)
- lsrsSecretList :: Lens' ListSecretsResponse [SecretListEntry]
- lsrsResponseStatus :: Lens' ListSecretsResponse Int
Creating a Request
listSecrets :: ListSecrets Source #
Creates a value of ListSecrets with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lsNextToken- (Optional) Use this parameter in a request if you receive aNextTokenresponse in a previous request that indicates that there's more output available. In a subsequent call, set it to the value of the previous call'sNextTokenresponse to indicate where the output should continue from.lsMaxResults- (Optional) Limits the number of results that 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, theNextTokenresponse element is present and has a value (isn't null). Include that value as theNextTokenrequest 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 checkNextTokenafter every operation to ensure that you receive all of the results.
data ListSecrets Source #
See: listSecrets smart constructor.
Instances
Request Lenses
lsNextToken :: Lens' ListSecrets (Maybe Text) Source #
(Optional) Use this parameter in a request if you receive a NextToken response in a previous request that indicates that there's more output available. In a subsequent call, set it to the value of the previous call's NextToken response to indicate where the output should continue from.
lsMaxResults :: Lens' ListSecrets (Maybe Natural) Source #
(Optional) Limits the number of results that 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
Arguments
| :: Int | |
| -> ListSecretsResponse |
Creates a value of ListSecretsResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lsrsNextToken- If present in the response, this value indicates that there's more output available than what's 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 theNextTokenrequest parameter in a subsequent call to the operation to continue processing and get the next part of the output. You should repeat this until theNextTokenresponse element comes back empty (asnull).lsrsSecretList- A list of the secrets in the account.lsrsResponseStatus- -- | The response status code.
data ListSecretsResponse Source #
See: listSecretsResponse smart constructor.
Instances
Response Lenses
lsrsNextToken :: Lens' ListSecretsResponse (Maybe Text) Source #
If present in the response, this value indicates that there's more output available than what's 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 ).
lsrsSecretList :: Lens' ListSecretsResponse [SecretListEntry] Source #
A list of the secrets in the account.
lsrsResponseStatus :: Lens' ListSecretsResponse Int Source #
- - | The response status code.