Main Content

getSecretMetadata

Retrieve metadata of secret in MATLAB vault

Since R2024a

Description

getSecretMetadata(secretname) retrieves the metadata dictionary of the specified secret in your MATLAB® vault. Your MATLAB vault is accessible only from the exact combination of your operating system account and local machine.

example

m = getSecretMetadata(secretname) assigns the secret metadata dictionary to a variable.

example

Examples

collapse all

List the names and metadata sizes of all the secrets in your MATLAB vault.

listSecrets
      SecretName                      SecretMetadata                
    ______________    ______________________________________________

    "SFTPpassword"    {[dictionary (string ⟼ cell) with 5 entries]}

Retrieve the metadata of a secret.

getSecretMetadata("SFTPpassword")
  dictionary (string ⟼ cell) with 5 entries:

    "CreationDate" ⟼ {[01-Nov-2023 12:41:12]}
    "Description"  ⟼ {["This is an example of metadata"]}
    "Phone"        ⟼ {["123-456-7890"]}
    "TeamMembers"  ⟼ {["Maria Silva, Akane Saito"]}
    "version"      ⟼ {["5.1"]}

List the names and metadata sizes of all the secrets in your MATLAB vault.

listSecrets
      SecretName                      SecretMetadata                
    ______________    ______________________________________________

    "SFTPpassword"    {[dictionary (string ⟼ cell) with 5 entries]}

Retrieve the metadata of a secret, saving it to a variable.

m = getSecretMetadata("SFTPpassword")
  dictionary (string ⟼ cell) with 5 entries:

    "CreationDate" ⟼ {[01-Nov-2023 12:41:12]}
    "Description"  ⟼ {["This is an example of metadata"]}
    "Phone"        ⟼ {["123-456-7890"]}
    "TeamMembers"  ⟼ {["Maria Silva, Akane Saito"]}
    "version"      ⟼ {["5.1"]}

Look up the value of a metadata entry.

team = m("TeamMembers")
team =

  1×1 cell array

    {["Maria Silva, Akane Saito"]}

Input Arguments

collapse all

Unique case-sensitive text identifier for the secret, specified as a string scalar or character vector. You can use a secret to hold sensitive information, such as passwords, certificates, credentials, OAuth tokens, and other configuration data for:

  • SFTP and FTP servers

  • Password-protected files, such as PDFs

  • Password-protected archives, such as zip files

  • Cloud providers, such as Amazon S3™ and Windows Azure® Blob Storage

  • API keys, SSH keys, and encryption keys

  • Databases and applications

Output Arguments

collapse all

Secret metadata, returned as a dictionary.

More About

collapse all

Extended Capabilities

expand all

Version History

Introduced in R2024a

expand all