Main Content

removeSecret

Remove secret from MATLAB vault

Since R2024a

Description

removeSecret(secretname) permanently removes all data associated with the specified secret name from your MATLAB® vault. Your MATLAB vault is accessible only from the exact combination of your operating system account and local machine.

example

Examples

collapse all

View the secrets in your vault.

listSecrets
       SecretName                       SecretMetadata                 
    ________________    _______________________________________________

    "PDFpassword"       {[dictionary (string ⟼ cell) with 2 entries ]}
    "AWS_access_key"    {[dictionary (string ⟼ cell) with 3 entries ]}
    "Azure_WASB_KEY"    {[dictionary (string ⟼ cell) with 2 entries ]}
    "OAuth_token"       {[dictionary (string ⟼ cell) with 3 entries ]}
    "certificate3"      {[dictionary (string ⟼ cell) with no entries]}
    "SFTPpassword"      {[dictionary (string ⟼ cell) with 4 entries ]}

Remove a secret from your vault. When calling removeSecret, you can type the secret name or select its name through tab completion. Then view the contents of your updated vault.

removeSecret("PDFpassword")
listSecrets
       SecretName                       SecretMetadata                 
    ________________    _______________________________________________

    "AWS_access_key"    {[dictionary (string ⟼ cell) with 3 entries ]}
    "Azure_WASB_KEY"    {[dictionary (string ⟼ cell) with 2 entries ]}
    "OAuth_token"       {[dictionary (string ⟼ cell) with 3 entries ]}
    "certificate3"      {[dictionary (string ⟼ cell) with no entries]}
    "SFTPpassword"      {[dictionary (string ⟼ cell) with 4 entries ]}

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

More About

collapse all

Version History

Introduced in R2024a

expand all