Learn R Programming

paws.security.identity (version 0.1.12)

secretsmanager_list_secrets: Lists all of the secrets that are stored by Secrets Manager in the AWS account

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 list_secret_version_ids. The encrypted fields SecretString and SecretBinary are not included in the output. To get that information, call the get_secret_value 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 list_secret_version_ids.

Usage

secretsmanager_list_secrets(MaxResults, NextToken, Filters, SortOrder)

Value

A list with the following syntax:

list(
  SecretList = list(
    list(
      ARN = "string",
      Name = "string",
      Description = "string",
      KmsKeyId = "string",
      RotationEnabled = TRUE|FALSE,
      RotationLambdaARN = "string",
      RotationRules = list(
        AutomaticallyAfterDays = 123
      ),
      LastRotatedDate = as.POSIXct(
        "2015-01-01"
      ),
      LastChangedDate = as.POSIXct(
        "2015-01-01"
      ),
      LastAccessedDate = as.POSIXct(
        "2015-01-01"
      ),
      DeletedDate = as.POSIXct(
        "2015-01-01"
      ),
      Tags = list(
        list(
          Key = "string",
          Value = "string"
        )
      ),
      SecretVersionsToStages = list(
        list(
          "string"
        )
      ),
      OwningService = "string",
      CreatedDate = as.POSIXct(
        "2015-01-01"
      )
    )
  ),
  NextToken = "string"
)

Arguments

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.

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.

Filters

Lists the secret request filters.

SortOrder

Lists secrets in the requested order.

Request syntax

svc$list_secrets(
  MaxResults = 123,
  NextToken = "string",
  Filters = list(
    list(
      Key = "description"|"name"|"tag-key"|"tag-value"|"all",
      Values = list(
        "string"
      )
    )
  ),
  SortOrder = "asc"|"desc"
)

Examples

Run this code
if (FALSE) {
# The following example shows how to list all of the secrets in your
# account.
svc$list_secrets()
}

Run the code above in your browser using DataLab