This commit is contained in:
Hong Ooi 2019-04-05 15:50:30 +11:00
Родитель 226db76131
Коммит 6fe6e9b474
2 изменённых файлов: 132 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,57 @@
#' Key vault endpoint class
#'
#' Class representing the client endpoint for a key vault, exposing methods for working with it.
#'
#' @docType class
#' @section Fields:
#' - `keys`: A sub-object for working with encryption keys stored in the vault. See `Keys` below.
#' - `secrets`: A sub-object for working with secrets stored in the vault. See `Secrets` below.
#' - `certificates`: A sub-object for working with certificates stored in the vault. See `Certificates` below.
#' - `storage`: A sub-object for working with storage accounts managed by the vault. See `Storage accounts` below.
#'
#' @section Methods:
#' This class provides one method, for initialization:
#' ```
#' new(url, tenant = "common", app = .az_cli_app_id, ...,
#' domain = "vault.azure.net", token = NULL)
#' ```
#' The arguments are as follows:
#' - `url`: The location of the vault. This can be a full URL, or the vault name alone; in the latter case, the `domain` argument is appended to obtain the URL.
#' - `tenant, app, ...`: Authentication arguments that will be passed to [AzureAuth::get_azure_token]. The default is to authenticate interactively.
#' - `domain`: The domain of the vault; for the public Azure cloud, this is `vault.azure.net`. Also the resource for OAuth authentication.
#' - `token`: An OAuth token obtained via [AzureAuth::get_azure_token]. If provided, this overrides the other authentication arguments.
#'
#' To work with objects stored in the key vault, use the methods provided by one of the sub-objects listed in 'Fields'.
#'
#' @section Keys:
#'
#'
#' @section Secrets:
#'
#' @section Certificates:
#'
#' @section Storage accounts:
#'
#' @seealso
#' [az_vault],
#'
#' [Azure Key Vault documentation](https://docs.microsoft.com/en-us/azure/key-vault/),
#' [Azure Key Vault API reference](https://docs.microsoft.com/en-us/rest/api/keyvault)
#'
#' @examples
#' \dontrun{
#'
#' key_vault("mykeyvault")
#' key_vault("https://mykeyvault.vault.azure.net")
#'
#' # authenticating as a service principal
#' key_vault("mykeyvault", tenant="myaadtenant", app="app_id", password="password")
#'
#' # authenticating with an existing token
#' token <- AzureAuth::get_azure_token("myaadtenant", "app_id", password="password")
#' key_vault("mykeyvault", token=token)
#'
#' }
#' @export
key_vault <- R6::R6Class("key_vault", public=list(

78
man/key_vault.Rd Normal file
Просмотреть файл

@ -0,0 +1,78 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vault_endpoint.R
\docType{class}
\name{key_vault}
\alias{key_vault}
\title{Key vault endpoint class}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
key_vault
}
\description{
Class representing the client endpoint for a key vault, exposing methods for working with it.
}
\section{Fields}{
\itemize{
\item \code{keys}: A sub-object for working with encryption keys stored in the vault. See \code{Keys} below.
\item \code{secrets}: A sub-object for working with secrets stored in the vault. See \code{Secrets} below.
\item \code{certificates}: A sub-object for working with certificates stored in the vault. See \code{Certificates} below.
\item \code{storage}: A sub-object for working with storage accounts managed by the vault. See \code{Storage accounts} below.
}
}
\section{Methods}{
This class provides one method, for initialization:\preformatted{new(url, tenant = "common", app = .az_cli_app_id, ...,
domain = "vault.azure.net", token = NULL)
}
The arguments are as follows:
\itemize{
\item \code{url}: The location of the vault. This can be a full URL, or the vault name alone; in the latter case, the \code{domain} argument is appended to obtain the URL.
\item \code{tenant, app, ...}: Authentication arguments that will be passed to \link[AzureAuth:get_azure_token]{AzureAuth::get_azure_token}. The default is to authenticate interactively.
\item \code{domain}: The domain of the vault; for the public Azure cloud, this is \code{vault.azure.net}. Also the resource for OAuth authentication.
\item \code{token}: An OAuth token obtained via \link[AzureAuth:get_azure_token]{AzureAuth::get_azure_token}. If provided, this overrides the other authentication arguments.
}
To work with objects stored in the key vault, use the methods provided by one of the sub-objects listed in 'Fields'.
}
\section{Keys}{
}
\section{Secrets}{
}
\section{Certificates}{
}
\section{Storage accounts}{
}
\examples{
\dontrun{
key_vault("mykeyvault")
key_vault("https://mykeyvault.vault.azure.net")
# authenticating as a service principal
key_vault("mykeyvault", tenant="myaadtenant", app="app_id", password="password")
# authenticating with an existing token
token <- AzureAuth::get_azure_token("myaadtenant", "app_id", password="password")
key_vault("mykeyvault", token=token)
}
}
\seealso{
\link{az_vault},
\href{https://docs.microsoft.com/en-us/azure/key-vault/}{Azure Key Vault documentation},
\href{https://docs.microsoft.com/en-us/rest/api/keyvault}{Azure Key Vault API reference}
}
\keyword{datasets}