libZSservicesZSamazonka-secretsmanagerZSamazonka-secretsmanager
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.SecretsManager.ListSecrets

Description

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

Creating a Request

data ListSecrets Source #

See: newListSecrets smart constructor.

Constructors

ListSecrets' 

Fields

  • filters :: Maybe [Filter]

    Lists the secret request filters.

  • nextToken :: Maybe Text

    (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.

  • sortOrder :: Maybe SortOrderType

    Lists secrets in the requested order.

  • maxResults :: Maybe Natural

    (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.

Instances

Instances details
Eq ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Read ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Show ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Generic ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Associated Types

type Rep ListSecrets :: Type -> Type #

NFData ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Methods

rnf :: ListSecrets -> () #

Hashable ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

ToJSON ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

AWSPager ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

AWSRequest ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Associated Types

type AWSResponse ListSecrets #

ToHeaders ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Methods

toHeaders :: ListSecrets -> [Header] #

ToPath ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

ToQuery ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

type Rep ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

type Rep ListSecrets = D1 ('MetaData "ListSecrets" "Amazonka.SecretsManager.ListSecrets" "libZSservicesZSamazonka-secretsmanagerZSamazonka-secretsmanager" 'False) (C1 ('MetaCons "ListSecrets'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "filters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Filter])) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "sortOrder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SortOrderType)) :*: S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)))))
type AWSResponse ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

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.

Constructors

ListSecretsResponse' 

Fields

  • nextToken :: Maybe Text

    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).

  • secretList :: Maybe [SecretListEntry]

    A list of the secrets in the account.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq ListSecretsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Read ListSecretsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Show ListSecretsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Generic ListSecretsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Associated Types

type Rep ListSecretsResponse :: Type -> Type #

NFData ListSecretsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Methods

rnf :: ListSecretsResponse -> () #

type Rep ListSecretsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

type Rep ListSecretsResponse = D1 ('MetaData "ListSecretsResponse" "Amazonka.SecretsManager.ListSecrets" "libZSservicesZSamazonka-secretsmanagerZSamazonka-secretsmanager" 'False) (C1 ('MetaCons "ListSecretsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "secretList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [SecretListEntry])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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).