This commit is contained in:
hong-revo 2018-05-17 12:22:28 +10:00
Родитель 90f802ba13
Коммит bcf6334752
6 изменённых файлов: 24 добавлений и 5 удалений

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

@ -53,7 +53,7 @@ print.blob_container <- function(object, ...)
cat("Azure blob container\n") cat("Azure blob container\n")
cat(sprintf("Endpoint URL: %s\n", object$endpoint$url)) cat(sprintf("Endpoint URL: %s\n", object$endpoint$url))
if(!is_empty(object$endpoint$key)) if(!is_empty(object$endpoint$key))
cat("Access key: <secret>\n") cat("Access key: <hidden>\n")
else cat("Access key: <none supplied>\n") else cat("Access key: <none supplied>\n")
if(!is_empty(object$endpoint$sas)) if(!is_empty(object$endpoint$sas))
cat("Account shared access signature: <hidden>\n") cat("Account shared access signature: <hidden>\n")

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

@ -40,10 +40,10 @@ print.storage_endpoint <- function(object)
cat(sprintf("Azure %s storage endpoint\n", type)) cat(sprintf("Azure %s storage endpoint\n", type))
cat(sprintf("URL: %s\n", object$url)) cat(sprintf("URL: %s\n", object$url))
if(!is_empty(object$key)) if(!is_empty(object$key))
cat("Access key: <secret>\n") cat("Access key: <hidden>\n")
else cat("Access key: <none supplied>\n") else cat("Access key: <none supplied>\n")
if(!is_empty(object$sas)) if(!is_empty(object$sas))
cat("Account shared access signature: <secret>\n") cat("Account shared access signature: <hidden>\n")
else cat("Account shared access signature: <none supplied>\n") else cat("Account shared access signature: <none supplied>\n")
cat(sprintf("Storage API version: %s", object$api_version)) cat(sprintf("Storage API version: %s", object$api_version))
invisible(object) invisible(object)

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

@ -51,7 +51,7 @@ print.file_share <- function(object, ...)
cat("Azure file share\n") cat("Azure file share\n")
cat("Endpoint URL: %s\n", object$endpoint$url) cat("Endpoint URL: %s\n", object$endpoint$url)
if(!is_empty(object$endpoint$key)) if(!is_empty(object$endpoint$key))
cat("Access key: <secret>\n") cat("Access key: <hidden>\n")
else cat("Access key: <none supplied>\n") else cat("Access key: <none supplied>\n")
if(!is_empty(object$endpoint$sas)) if(!is_empty(object$endpoint$sas))
cat("Account shared access signature: <hidden>\n") cat("Account shared access signature: <hidden>\n")

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

@ -8,6 +8,13 @@
#' @details #' @details
#' The `get_storage_properties` generic returns a list of properties for the given storage object. There are methods defined for objects of class `storage_endpoint`, `blob_container` and `file_share`. Similar functions are defined for individual blobs, files and directories. #' The `get_storage_properties` generic returns a list of properties for the given storage object. There are methods defined for objects of class `storage_endpoint`, `blob_container` and `file_share`. Similar functions are defined for individual blobs, files and directories.
#' #'
#' @seealso
#' [storage_endpoint], [blob_container], [file_share],
#' [Blob service properties reference[(https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties).
#' [File service properties reference](https://docs.microsoft.com/en-us/rest/api/storageservices/get-file-service-properties),
#' [Blob container properties reference](https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties),
#' [File share properties reference](https://docs.microsoft.com/en-us/rest/api/storageservices/get-share-properties)
#'
#' @rdname properties #' @rdname properties
#' @export #' @export
get_storage_properties <- function(object, ...) get_storage_properties <- function(object, ...)

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

@ -63,7 +63,7 @@ do_storage_call <- function(endpoint_url, path, options=list(), headers=list(),
storage_error_message <- function(response, for_httr=TRUE) storage_error_message <- function(response, for_httr=TRUE)
{ {
cont <- httr::content(response) cont <- suppressMessages(httr::content(response))
msg <- if(inherits(cont, "xml_node")) msg <- if(inherits(cont, "xml_node"))
{ {
cont <- xml2::as_list(cont) cont <- xml2::as_list(cont)

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

@ -39,3 +39,15 @@ Get storage properties for an endpoint or container
\details{ \details{
The \code{get_storage_properties} generic returns a list of properties for the given storage object. There are methods defined for objects of class \code{storage_endpoint}, \code{blob_container} and \code{file_share}. Similar functions are defined for individual blobs, files and directories. The \code{get_storage_properties} generic returns a list of properties for the given storage object. There are methods defined for objects of class \code{storage_endpoint}, \code{blob_container} and \code{file_share}. Similar functions are defined for individual blobs, files and directories.
} }
\seealso{
\link{storage_endpoint}, \link{blob_container}, \link{file_share},
[Blob service properties reference[(https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties).
\href{https://docs.microsoft.com/en-us/rest/api/storageservices/get-file-service-properties}{File service properties reference},
\href{https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties}{Blob container properties reference},
\href{https://docs.microsoft.com/en-us/rest/api/storageservices/get-share-properties}{File share properties reference}
[Blob service properties reference[(https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties).
[File service properties reference]: R:Blob%20service%20properties%20reference[(https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties).%0A[File%20service%20properties%20reference
[Blob container properties reference]: R:Blob%20container%20properties%20reference
[File share properties reference]: R:File%20share%20properties%20reference
}