amazonka-secretsmanager-2.0: Amazon Secrets Manager SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.SecretsManager.ListSecrets

Description

Lists the secrets that are stored by Secrets Manager in the Amazon Web Services account, not including secrets that are marked for deletion. To see secrets marked for deletion, use the Secrets Manager console.

ListSecrets is eventually consistent, however it might not reflect changes from the last five minutes. To get the latest information for a specific secret, use DescribeSecret.

To list the versions of a secret, use ListSecretVersionIds.

To get the secret value from SecretString or SecretBinary, call GetSecretValue.

For information about finding secrets in the console, see Find secrets in Secrets Manager.

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

Required permissions: secretsmanager:ListSecrets. For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager.

This operation returns paginated results.

Synopsis

Creating a Request

data ListSecrets Source #

See: newListSecrets smart constructor.

Constructors

ListSecrets' 

Fields

  • filters :: Maybe [Filter]

    The filters to apply to the list of secrets.

  • includePlannedDeletion :: Maybe Bool
     
  • maxResults :: Maybe Natural

    The number of results to include in the response.

    If there are more results available, in the response, Secrets Manager includes NextToken. To get the next results, call ListSecrets again with the value from NextToken.

  • nextToken :: Maybe Text

    A token that indicates where the output should continue from, if a previous call did not show all results. To get the next results, call ListSecrets again with this value.

  • sortOrder :: Maybe SortOrderType

    Secrets are listed by CreatedDate.

Instances

Instances details
ToJSON ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.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

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 #

Generic ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Associated Types

type Rep ListSecrets :: Type -> Type #

Read ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Show ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

NFData ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Methods

rnf :: ListSecrets -> () #

Eq ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Hashable ListSecrets Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

type AWSResponse 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" "amazonka-secretsmanager-2.0-8tljeZ4CwL92E7JavkDb0o" 'False) (C1 ('MetaCons "ListSecrets'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "filters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Filter])) :*: S1 ('MetaSel ('Just "includePlannedDeletion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "sortOrder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SortOrderType))))))

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 - The filters to apply to the list of secrets.

$sel:includePlannedDeletion:ListSecrets', listSecrets_includePlannedDeletion - Undocumented member.

$sel:maxResults:ListSecrets', listSecrets_maxResults - The number of results to include in the response.

If there are more results available, in the response, Secrets Manager includes NextToken. To get the next results, call ListSecrets again with the value from NextToken.

ListSecrets, listSecrets_nextToken - A token that indicates where the output should continue from, if a previous call did not show all results. To get the next results, call ListSecrets again with this value.

$sel:sortOrder:ListSecrets', listSecrets_sortOrder - Secrets are listed by CreatedDate.

Request Lenses

listSecrets_filters :: Lens' ListSecrets (Maybe [Filter]) Source #

The filters to apply to the list of secrets.

listSecrets_maxResults :: Lens' ListSecrets (Maybe Natural) Source #

The number of results to include in the response.

If there are more results available, in the response, Secrets Manager includes NextToken. To get the next results, call ListSecrets again with the value from NextToken.

listSecrets_nextToken :: Lens' ListSecrets (Maybe Text) Source #

A token that indicates where the output should continue from, if a previous call did not show all results. To get the next results, call ListSecrets again with this value.

listSecrets_sortOrder :: Lens' ListSecrets (Maybe SortOrderType) Source #

Secrets are listed by CreatedDate.

Destructuring the Response

data ListSecretsResponse Source #

See: newListSecretsResponse smart constructor.

Constructors

ListSecretsResponse' 

Fields

  • nextToken :: Maybe Text

    Secrets Manager includes this value if there's more output available than what is 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 long list. To get the next results, call ListSecrets again with this value.

  • secretList :: Maybe [SecretListEntry]

    A list of the secrets in the account.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic ListSecretsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Associated Types

type Rep ListSecretsResponse :: Type -> Type #

Read ListSecretsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Show ListSecretsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

NFData ListSecretsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

Methods

rnf :: ListSecretsResponse -> () #

Eq ListSecretsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

type Rep ListSecretsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecrets

type Rep ListSecretsResponse = D1 ('MetaData "ListSecretsResponse" "Amazonka.SecretsManager.ListSecrets" "amazonka-secretsmanager-2.0-8tljeZ4CwL92E7JavkDb0o" '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:

ListSecrets, listSecretsResponse_nextToken - Secrets Manager includes this value if there's more output available than what is 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 long list. To get the next results, call ListSecrets again with this value.

$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 #

Secrets Manager includes this value if there's more output available than what is 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 long list. To get the next results, call ListSecrets again with this value.