Description Methods Arguments Value See Also Examples
This class represents the collection of storage accounts managed by a vault. It provides methods for adding and removing accounts, and doing backups and restores. For operations with a specific account, see storage.
This class provides the following methods:
1 2 3 4 5 6 7 | add(name, storage_account, key_name, regen_key=TRUE, regen_period=30,
attributes=vault_object_attrs(), ...)
get(name)
remove(name, confirm=TRUE)
list()
backup(name)
restore(backup)
|
name
: A name by which to refer to the storage account.
storage_account
: The Azure resource ID of the account. This can also be an object of class az_resource
or az_storage
, as provided by the AzureRMR or AzureStor packages respectively; in this case, the resource ID is obtained from the object.
key_name
: The name of the storage access key that Key Vault will manage.
regen_key
: Whether to automatically regenerate the access key at periodic intervals.
regen_period
: How often to regenerate the access key. This can be a number, which will be interpreted as days; or as an ISO-8601 string denoting a duration, eg "P30D" (30 days).
attributes
: Optional attributes for the secret. A convenient way to provide this is via the vault_object_attrs helper function.
...
: For create
and import
, other named arguments which will be treated as tags.
confirm
: For remove
, whether to ask for confirmation before removing the account.
backup
: For restore
, a string representing the backup blob for a key.
email
: For set_contacts
, the email addresses of the contacts.
For get
and add
, an object of class stored_account
, representing the storage account itself.
For list
, a vector of account names.
For backup
, a string representing the backup blob for a storage account. If the account has multiple versions, the blob will contain all versions.
storage_account, 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 21 22 23 24 25 26 27 28 | ## Not run:
vault <- key_vault("mykeyvault")
# get the storage account details
library(AzureStor)
stor <- AzureRMR::get_azure_login()$
get_subscription("sub_id")$
get_resource_group("rgname")$
get_storage_account("mystorageacct")
vault$storage$create("mystor", stor, "key1")
vault$storage$list()
vault$storage$get("mystor")
# specifying a regeneration period of 6 months
vault$storage$create("mystor", regen_period="P6M")
# setting management tags
vault$storage$create("mystor", tag1="a value", othertag="another value")
# backup and restore an account
bak <- vault$storage$backup("mystor")
vault$storage$delete("mystor", confirm=FALSE)
vault$storage$restore(bak)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.