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

Description

Lists all of the versions attached to the specified secret. The output does not include the SecretString or SecretBinary fields. By default, the list includes only versions that have at least one staging label in VersionStage attached.

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:ListSecretVersionIds

Related operations

  • To list the secrets in an account, use ListSecrets.

This operation returns paginated results.

Synopsis

Creating a Request

data ListSecretVersionIds Source #

See: newListSecretVersionIds smart constructor.

Constructors

ListSecretVersionIds' 

Fields

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

  • includeDeprecated :: Maybe Bool

    (Optional) Specifies that you want the results to include versions that do not have any staging labels attached to them. Such versions are considered deprecated and are subject to deletion by Secrets Manager as needed.

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

  • secretId :: Text

    The identifier for the secret containing the versions you want to list. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

    For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.

Instances

Instances details
Eq ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

Read ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

Show ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

Generic ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

Associated Types

type Rep ListSecretVersionIds :: Type -> Type #

NFData ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

Methods

rnf :: ListSecretVersionIds -> () #

Hashable ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

ToJSON ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

AWSPager ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

AWSRequest ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

Associated Types

type AWSResponse ListSecretVersionIds #

ToHeaders ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

ToPath ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

ToQuery ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

type Rep ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

type Rep ListSecretVersionIds = D1 ('MetaData "ListSecretVersionIds" "Amazonka.SecretsManager.ListSecretVersionIds" "libZSservicesZSamazonka-secretsmanagerZSamazonka-secretsmanager" 'False) (C1 ('MetaCons "ListSecretVersionIds'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "includeDeprecated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "secretId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse ListSecretVersionIds Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

newListSecretVersionIds Source #

Create a value of ListSecretVersionIds 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:ListSecretVersionIds', listSecretVersionIds_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:includeDeprecated:ListSecretVersionIds', listSecretVersionIds_includeDeprecated - (Optional) Specifies that you want the results to include versions that do not have any staging labels attached to them. Such versions are considered deprecated and are subject to deletion by Secrets Manager as needed.

$sel:maxResults:ListSecretVersionIds', listSecretVersionIds_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.

$sel:secretId:ListSecretVersionIds', listSecretVersionIds_secretId - The identifier for the secret containing the versions you want to list. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.

Request Lenses

listSecretVersionIds_nextToken :: Lens' ListSecretVersionIds (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.

listSecretVersionIds_includeDeprecated :: Lens' ListSecretVersionIds (Maybe Bool) Source #

(Optional) Specifies that you want the results to include versions that do not have any staging labels attached to them. Such versions are considered deprecated and are subject to deletion by Secrets Manager as needed.

listSecretVersionIds_maxResults :: Lens' ListSecretVersionIds (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.

listSecretVersionIds_secretId :: Lens' ListSecretVersionIds Text Source #

The identifier for the secret containing the versions you want to list. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.

Destructuring the Response

data ListSecretVersionIdsResponse Source #

See: newListSecretVersionIdsResponse smart constructor.

Constructors

ListSecretVersionIdsResponse' 

Fields

  • arn :: Maybe Text

    The Amazon Resource Name (ARN) for the secret.

    Secrets Manager automatically adds several random characters to the name at the end of the ARN when you initially create a secret. This affects only the ARN and not the actual friendly name. This ensures that if you create a new secret with the same name as an old secret that you previously deleted, then users with access to the old secret don't automatically get access to the new secret because the ARNs are different.

  • versions :: Maybe [SecretVersionsListEntry]

    The list of the currently available versions of the specified secret.

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

  • name :: Maybe Text

    The friendly name of the secret.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq ListSecretVersionIdsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

Read ListSecretVersionIdsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

Show ListSecretVersionIdsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

Generic ListSecretVersionIdsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

Associated Types

type Rep ListSecretVersionIdsResponse :: Type -> Type #

NFData ListSecretVersionIdsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

type Rep ListSecretVersionIdsResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.ListSecretVersionIds

type Rep ListSecretVersionIdsResponse = D1 ('MetaData "ListSecretVersionIdsResponse" "Amazonka.SecretsManager.ListSecretVersionIds" "libZSservicesZSamazonka-secretsmanagerZSamazonka-secretsmanager" 'False) (C1 ('MetaCons "ListSecretVersionIdsResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "arn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "versions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [SecretVersionsListEntry]))) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

newListSecretVersionIdsResponse Source #

Create a value of ListSecretVersionIdsResponse 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:arn:ListSecretVersionIdsResponse', listSecretVersionIdsResponse_arn - The Amazon Resource Name (ARN) for the secret.

Secrets Manager automatically adds several random characters to the name at the end of the ARN when you initially create a secret. This affects only the ARN and not the actual friendly name. This ensures that if you create a new secret with the same name as an old secret that you previously deleted, then users with access to the old secret don't automatically get access to the new secret because the ARNs are different.

$sel:versions:ListSecretVersionIdsResponse', listSecretVersionIdsResponse_versions - The list of the currently available versions of the specified secret.

$sel:nextToken:ListSecretVersionIds', listSecretVersionIdsResponse_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:name:ListSecretVersionIdsResponse', listSecretVersionIdsResponse_name - The friendly name of the secret.

$sel:httpStatus:ListSecretVersionIdsResponse', listSecretVersionIdsResponse_httpStatus - The response's http status code.

Response Lenses

listSecretVersionIdsResponse_arn :: Lens' ListSecretVersionIdsResponse (Maybe Text) Source #

The Amazon Resource Name (ARN) for the secret.

Secrets Manager automatically adds several random characters to the name at the end of the ARN when you initially create a secret. This affects only the ARN and not the actual friendly name. This ensures that if you create a new secret with the same name as an old secret that you previously deleted, then users with access to the old secret don't automatically get access to the new secret because the ARNs are different.

listSecretVersionIdsResponse_versions :: Lens' ListSecretVersionIdsResponse (Maybe [SecretVersionsListEntry]) Source #

The list of the currently available versions of the specified secret.

listSecretVersionIdsResponse_nextToken :: Lens' ListSecretVersionIdsResponse (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).