Description Methods Arguments Value See Also Examples
This class represents the collection of secrets stored in a vault. It provides methods for managing secrets, including creating, importing and deleting secrets, and doing backups and restores.
This class provides the following methods:
1 2 3 4 5 6 |
name: The name of the secret.
value: For create, the secret to store. This should be a character string or a raw vector.
content_type: For create, an optional content type of the secret, such as "application/octet-stream".
attributes: Optional attributes for the secret, such as the expiry date and activation date. A convenient way to provide this is via the vault_object_attrs helper function.
...: For create, other named arguments which will be treated as tags.
include_managed: For list, whether to include secrets that were created by Key Vault to support a managed certificate.
backup: For restore, a string representing the backup blob for a secret.
For get, and create, an object of class stored_secret, representing the secret. The actual value of the secret is in the value field.
For list, a vector of secret names.
For backup, a string representing the backup blob for a secret. If the secret has multiple versions, the blob will contain all versions.
vault_object_attrs
Azure Key Vault documentation, Azure Key Vault API reference
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
vault <- key_vault("mykeyvault")
vault$secrets$create("mysecret", "secret string")
vault$secrets$list()
secret <- vault$secrets$get("mysecret")
secret$value # 'secret string'
# specifying an expiry date
today <- Sys.date()
vault$secrets$create("mysecret", attributes=vault_object_attrs(expiry_date=today+365))
# setting management tags
vault$secrets$create("mysecret", tag1="a value", othertag="another value")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.