getSecretMetadata
Description
getSecretMetadata(
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.secretname
)
m = getSecretMetadata(
assigns the
secret metadata dictionary to a variable.secretname
)
Examples
Retrieve Secret Metadata
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"]}
Retrieve Secret Metadata Entry
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
secretname
— Unique case-sensitive text identifier for secret
string scalar | character vector
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
The forward slash character (/
) is not supported in
secretname
.
More About
MATLAB Vault
Your secrets are stored in your MATLAB vault, which is accessible only from the exact combination of your operating system account and local machine. Your vault and secrets, which do not leave your local machine, persist across MATLAB sessions. Each secret consists of a name, value, and optional metadata.
Secret name – A unique case-sensitive text identifier for the secret. The secret name is stored unencrypted in your vault as a string scalar.
Secret value – A text value associated with the secret. The Secret Prompt dialog box, where you enter the secret value, supports copy-paste functionality. The secret value is stored encrypted in your vault using industry standard AES-256 encryption. The secret value is returned as a string scalar.
Secret metadata – A dictionary containing additional information associated with the secret. The optional secret metadata is stored unencrypted in your vault.
To set a secret, use setSecret
.
Extended Capabilities
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool
or accelerate code with Parallel Computing Toolbox™ ThreadPool
.
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
Version History
Introduced in R2024aR2024b: Use function in thread-based environments
This function supports thread-based environments.
See Also
setSecretMetadata
| setSecret
| getSecret
| isSecret
| listSecrets
| removeSecret
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)