Clean roxygen and add missing parameter documentation #3
This commit is contained in:
Родитель
5206cf9bb3
Коммит
089cdc3bee
|
@ -22,7 +22,7 @@ export(AzureGetBlob)
|
|||
export(AzureHDIConf)
|
||||
export(AzureHiveSQL)
|
||||
export(AzureHiveStatus)
|
||||
export(AzureListAllRecources)
|
||||
export(AzureListAllResources)
|
||||
export(AzureListHDI)
|
||||
export(AzureListRG)
|
||||
export(AzureListSA)
|
||||
|
|
449
R/AzureBlob.R
449
R/AzureBlob.R
|
@ -1,24 +1,11 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
#' List Storage Containers for Specified Storage Account.
|
||||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureSAGetKey
|
||||
|
||||
#' @family Storage account
|
||||
# @param AzureActiveContext Azure Context Object
|
||||
# @param StorageAccount StorageAccount
|
||||
# @param StorageKey StorageKey
|
||||
# @param Container Storage Container
|
||||
# @param ResourceGroup ResourceGroup Object (or use AzureActiveContext)
|
||||
# @param SubscriptionID SubscriptionID Object (or use AzureActiveContext)
|
||||
# @param AzToken Token Object (or use AzureActiveContext)
|
||||
# @param verbose Print Tracing information (Default False)
|
||||
#'
|
||||
#' @family Blob store functions
|
||||
#' @export
|
||||
AzureListSABlobs <- function(AzureActiveContext,StorageAccount,StorageKey,Container,ResourceGroup,SubscriptionID,AzToken,verbose = FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
|
@ -99,229 +86,16 @@ AzureListSABlobs <- function(AzureActiveContext,StorageAccount,StorageKey,Contai
|
|||
}
|
||||
|
||||
|
||||
#' Get contents from a specifed Storage Blob.
|
||||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureSAGetKey
|
||||
|
||||
#' @family Storage account
|
||||
# @param AzureActiveContext Azure Context Object
|
||||
# @param Blob Blob Directory (leave for current directory)
|
||||
# @param Blob Blob Name
|
||||
# @param Blob Type ("Text" or "Raw")
|
||||
# @param StorageAccount StorageAccount
|
||||
# @param StorageKey StorageKey
|
||||
# @param Container Storage Container
|
||||
# @param ResourceGroup ResourceGroup Object (or use AzureActiveContext)
|
||||
# @param Token Token Object (or use AzureActiveContext)
|
||||
# @param SubscriptionID SubscriptionID Object (or use AzureActiveContext)
|
||||
# @param verbose Print Tracing information (Default False)
|
||||
#'
|
||||
#' @export
|
||||
|
||||
AzureGetBlob <- function(AzureActiveContext,Blob, Directory,Type="text",StorageAccount,StorageKey,Container,ResourceGroup,SubscriptionID,AzToken,verbose=FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
if(missing(SubscriptionID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SubscriptionID)
|
||||
if(missing(AzToken)) {ATI <- AzureActiveContext$Token} else (ATI = AzToken)
|
||||
if(missing(ResourceGroup)) {RGI <- AzureActiveContext$ResourceGroup} else (RGI = ResourceGroup)
|
||||
if(missing(StorageAccount)) {SAI <- AzureActiveContext$StorageAccount} else (SAI = StorageAccount)
|
||||
if(missing(StorageKey)) {STK <- AzureActiveContext$StorageKey} else (STK = StorageKey)
|
||||
if(missing(Container)) {CNTR <- AzureActiveContext$Container} else (CNTR = Container)
|
||||
if(missing(Blob)) {BLOBI <- AzureActiveContext$Blob} else (BLOBI = Blob)
|
||||
verbosity <- if(verbose) httr::verbose(TRUE) else NULL
|
||||
|
||||
if (length(RGI)<1) {stop("Error: No ResourceGroup provided: Use ResourceGroup argument or set in AzureContext")}
|
||||
if (length(SAI)<1) {stop("Error: No StorageAccount provided: Use StorageAccount argument or set in AzureContext")}
|
||||
if (length(CNTR)<1) {stop("Error: No Container provided: Use Container argument or set in AzureContext")}
|
||||
if (length(BLOBI)<1) {stop("Error: No Blob provided: Use Blob argument or set in AzureContext")}
|
||||
|
||||
if (length(AzureActiveContext$StorageAccountK) <1 || SAI != AzureActiveContext$StorageAccountK|| length(AzureActiveContext$StorageKey) <1)
|
||||
{
|
||||
cat("Fetching Storage Key..")
|
||||
STK <- AzureSAGetKey(sc,ResourceGroup = RGI,StorageAccount = SAI)
|
||||
}
|
||||
else
|
||||
STK <- AzureActiveContext$StorageKey
|
||||
|
||||
if (length(STK)<1) {stop("Error: No StorageKey provided: Use StorageKey argument or set in AzureContext")}
|
||||
|
||||
DIR <- AzureActiveContext$Directory
|
||||
DC <- AzureActiveContext$DContainer
|
||||
|
||||
if(missing(Directory))
|
||||
{
|
||||
if (length(DIR)<1) DIR = "" # No previous Dir value
|
||||
if (length(DC)<1)
|
||||
{
|
||||
DIR <- "" # No previous Dir value
|
||||
DC <- ""
|
||||
}
|
||||
else
|
||||
if (CNTR != DC) DIR = "" # Change of Container
|
||||
}
|
||||
else
|
||||
DIR <- Directory
|
||||
|
||||
if (nchar(DIR) > 0) DIR <- paste0(DIR,"/")
|
||||
|
||||
BLOBI <- paste0(DIR,BLOBI)
|
||||
BLOBI <- gsub("^/","",BLOBI)
|
||||
BLOBI <- gsub("^\\./","",BLOBI)
|
||||
cat(BLOBI)
|
||||
|
||||
URL <- paste("http://",SAI,".blob.core.windows.net/",CNTR,"/",BLOBI,sep="")
|
||||
|
||||
|
||||
D1 <- Sys.getlocale("LC_TIME"); Sys.setlocale("LC_TIME", "C")
|
||||
#`x-ms-date` <- format(Sys.time(),"%a, %d %b %Y %H:%M:%S %Z", tz="GMT")
|
||||
Sys.setlocale("LC_TIME", D1)
|
||||
D1 <- format(Sys.time(),"%a, %d %b %Y %H:%M:%S %Z", tz="GMT")
|
||||
|
||||
SIG <- GetSig(AzureActiveContext,URL,"GET",STK,SAI,Container=CNTR,CMD=paste0("/",BLOBI),DateS=D1)
|
||||
|
||||
AT <- paste0("SharedKey ", SAI, ":", SIG)
|
||||
|
||||
r <- GET(URL,add_headers(.headers = c("Authorization" = AT, "Content-Length" = "0","x-ms-version"="2015-04-05","x-ms-date"=D1)),verbosity)
|
||||
|
||||
if (status_code(r) == 404) {
|
||||
cat(BLOBI)
|
||||
warning("File not found");
|
||||
return(NULL)
|
||||
}
|
||||
else
|
||||
if (status_code(r) != 200) {stop(paste0("Error: Return code(",status_code(r),")" ))}
|
||||
|
||||
r2 <- content(r,Type,encoding="UTF-8")
|
||||
|
||||
AzureActiveContext$StorageAccount <- SAI
|
||||
AzureActiveContext$ResourceGroup <- RGI
|
||||
AzureActiveContext$StorageKey <- STK
|
||||
AzureActiveContext$Container <- CNTR
|
||||
AzureActiveContext$Blob <- BLOBI
|
||||
return(r2)
|
||||
}
|
||||
|
||||
|
||||
#' Write contents to a specifed Storage Blob.
|
||||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureSAGetKey
|
||||
|
||||
#' @family Storage account
|
||||
# @param AzureActiveContext -Azure Context Object
|
||||
# @param Blob - Blob Name
|
||||
# @param Contents - Object to Store or Value
|
||||
# @param File - Local FileName to Store in Azure Blob
|
||||
# @param Directory - Directory location (leave for current directory)
|
||||
# @param StorageAccount - StorageAccount
|
||||
# @param StorageKey - StorageKey
|
||||
# @param Container - Storage Container
|
||||
# @param ResourceGroup ResourceGroup Object (or use AzureActiveContext)
|
||||
# @param Token - Token Object (or use AzureActiveContext)
|
||||
# @param SubscriptionID - SubscriptionID Object (or use AzureActiveContext)
|
||||
# @param verbose - Print Tracing information (Default False)
|
||||
#'
|
||||
#' @export
|
||||
AzurePutBlob <- function(AzureActiveContext,Blob, Contents="",File="",Directory,StorageAccount,StorageKey,Container,ResourceGroup,SubscriptionID,AzToken,verbose=FALSE) {
|
||||
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
|
||||
if(missing(SubscriptionID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SubscriptionID)
|
||||
if(missing(AzToken)) {ATI <- AzureActiveContext$Token} else (ATI = AzToken)
|
||||
if(missing(ResourceGroup)) {RGI <- AzureActiveContext$ResourceGroup} else (RGI = ResourceGroup)
|
||||
if(missing(StorageAccount)) {SAI <- AzureActiveContext$StorageAccount} else (SAI = StorageAccount)
|
||||
if(missing(StorageKey)) {STK <- AzureActiveContext$StorageKey} else (STK = StorageKey)
|
||||
if(missing(Container)) {CNTR <- AzureActiveContext$Container} else (CNTR = Container)
|
||||
if(missing(Blob)) {BLOBI <- AzureActiveContext$Blob} else (BLOBI = Blob)
|
||||
verbosity <- if(verbose) httr::verbose(TRUE) else NULL
|
||||
|
||||
if (length(RGI)<1) {stop("Error: No ResourceGroup provided: Use ResourceGroup argument or set in AzureContext")}
|
||||
if (length(SAI)<1) {stop("Error: No StorageAccount provided: Use StorageAccount argument or set in AzureContext")}
|
||||
if (length(CNTR)<1) {stop("Error: No Container provided: Use Container argument or set in AzureContext")}
|
||||
if (length(BLOBI)<1) {stop("Error: No Blob provided: Use Blob argument or set in AzureContext")}
|
||||
|
||||
DIR <- AzureActiveContext$Directory
|
||||
DC <- AzureActiveContext$DContainer
|
||||
|
||||
if(missing(Directory))
|
||||
{
|
||||
|
||||
if (length(DIR)<1) DIR = "" # No previous Dir value
|
||||
if (length(DC)<1)
|
||||
{
|
||||
DIR <- "" # No previous Dir value
|
||||
DC <- ""
|
||||
}
|
||||
else
|
||||
if (CNTR != DC) DIR = "" # Change of Container
|
||||
}
|
||||
else
|
||||
DIR <- Directory
|
||||
if (nchar(DIR) > 0) DIR <- paste0(DIR,"/")
|
||||
|
||||
BLOBI <- paste0(DIR,BLOBI)
|
||||
BLOBI <- gsub("^/","",BLOBI)
|
||||
BLOBI <- gsub("//","/",BLOBI)
|
||||
BLOBI <- gsub("//","/",BLOBI)
|
||||
|
||||
if(missing(Contents) && missing(File)) stop("Content or File needs to be supplied")
|
||||
|
||||
if(!missing(Contents) && !missing(File)) stop("Provided either Content OR File Argument")
|
||||
|
||||
print(typeof(Contents))
|
||||
|
||||
if (length(AzureActiveContext$StorageAccountK) <1 || SAI != AzureActiveContext$StorageAccountK|| length(AzureActiveContext$StorageKey) <1) {
|
||||
cat("Fetching Storage Key..")
|
||||
STK <- AzureSAGetKey(sc,ResourceGroup = RGI,StorageAccount = SAI)
|
||||
}
|
||||
else
|
||||
STK <- AzureActiveContext$StorageKey
|
||||
|
||||
if (length(STK)<1) {stop("Error: No StorageKey provided: Use StorageKey argument or set in AzureContext")}
|
||||
|
||||
URL <- paste("http://",SAI,".blob.core.windows.net/",CNTR,"/",BLOBI,sep="")
|
||||
|
||||
D1 <- Sys.getlocale("LC_TIME"); Sys.setlocale("LC_TIME", "C")
|
||||
# `x-ms-date` <- format(Sys.time(),"%a, %d %b %Y %H:%M:%S %Z", tz="GMT")
|
||||
Sys.setlocale("LC_TIME", D1)
|
||||
D1 <- format(Sys.time(),"%a, %d %b %Y %H:%M:%S %Z", tz="GMT")
|
||||
if (nchar(Contents) == 0) Contents <- "-"
|
||||
|
||||
SIG <- GetSig(AzureActiveContext,URL,"PUT",STK,SAI,ContentType = "text/plain; charset=UTF-8" , Size=nchar(Contents),Headers="x-ms-blob-type:BlockBlob",Container=CNTR,CMD=paste0("/",BLOBI),DateS=D1)
|
||||
|
||||
AT <- paste0("SharedKey ", SAI, ":", SIG)
|
||||
|
||||
r <- PUT(URL,add_headers(.headers = c("Authorization" = AT, "Content-Length" = nchar(Contents) ,"x-ms-version"="2015-04-05","x-ms-date"=D1,"x-ms-blob-type"="BlockBlob","Content-Type" = "text/plain; charset=UTF-8")),body = Contents,verbosity)
|
||||
|
||||
# r <- PUT(URL,add_headers(.headers = c("Authorization" = AT, "Content-Length" = nchar(Contents) ,"x-ms-version"="2015-04-05","x-ms-date"=D1,"x-ms-blob-type"="BlockBlob","Content-Type" = "text/plain; charset=UTF-8")),body = upload_file(path= path.expand("c:\\temp\\fred"),type = 'text/csv'),verbosity)
|
||||
|
||||
|
||||
AzureActiveContext$Blob <- BLOBI
|
||||
return(paste("Blob:", BLOBI," Saved:",nchar(Contents),"bytes written"))
|
||||
}
|
||||
|
||||
|
||||
|
||||
#' List Blob files in a Storage account directory.
|
||||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureSAGetKey
|
||||
|
||||
#' @family Storage account
|
||||
# @param AzureActiveContext Azure Context Object
|
||||
# @param Directory - Set Directory to list
|
||||
# @param Recursive - List directories recursively (Default FALSE)
|
||||
# @param StorageAccount StorageAccount
|
||||
# @param StorageKey StorageKey
|
||||
# @param Container Storage Container
|
||||
# @param ResourceGroup ResourceGroup Object (or use AzureActiveContext)
|
||||
# @param Token Token Object (or use AzureActiveContext)
|
||||
# @param SubscriptionID SubscriptionID Object (or use AzureActiveContext)
|
||||
# @param verbose Print Tracing information (Default False)
|
||||
#' @param Directory Set Directory to list
|
||||
#' @param Recursive List directories recursively (Default FALSE)
|
||||
#'
|
||||
#' @family Blob store functions
|
||||
#' @export
|
||||
AzureBlobLS <- function(AzureActiveContext,Directory,Recursive=FALSE,StorageAccount,StorageKey,Container,ResourceGroup,SubscriptionID,AzToken,verbose=FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
|
@ -467,22 +241,202 @@ AzureBlobLS <- function(AzureActiveContext,Directory,Recursive=FALSE,StorageAcco
|
|||
}
|
||||
|
||||
|
||||
#' Get contents from a specifed Storage Blob.
|
||||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureSAGetKey
|
||||
#' @inheritParams AzureBlobLS
|
||||
|
||||
#' @param Type "Text" or "Raw"
|
||||
#'
|
||||
#' @family Blob store functions
|
||||
#' @export
|
||||
|
||||
AzureGetBlob <- function(AzureActiveContext,Blob, Directory,Type="text",StorageAccount,StorageKey,Container,ResourceGroup,SubscriptionID,AzToken,verbose=FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
if(missing(SubscriptionID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SubscriptionID)
|
||||
if(missing(AzToken)) {ATI <- AzureActiveContext$Token} else (ATI = AzToken)
|
||||
if(missing(ResourceGroup)) {RGI <- AzureActiveContext$ResourceGroup} else (RGI = ResourceGroup)
|
||||
if(missing(StorageAccount)) {SAI <- AzureActiveContext$StorageAccount} else (SAI = StorageAccount)
|
||||
if(missing(StorageKey)) {STK <- AzureActiveContext$StorageKey} else (STK = StorageKey)
|
||||
if(missing(Container)) {CNTR <- AzureActiveContext$Container} else (CNTR = Container)
|
||||
if(missing(Blob)) {BLOBI <- AzureActiveContext$Blob} else (BLOBI = Blob)
|
||||
verbosity <- if(verbose) httr::verbose(TRUE) else NULL
|
||||
|
||||
if (length(RGI)<1) {stop("Error: No ResourceGroup provided: Use ResourceGroup argument or set in AzureContext")}
|
||||
if (length(SAI)<1) {stop("Error: No StorageAccount provided: Use StorageAccount argument or set in AzureContext")}
|
||||
if (length(CNTR)<1) {stop("Error: No Container provided: Use Container argument or set in AzureContext")}
|
||||
if (length(BLOBI)<1) {stop("Error: No Blob provided: Use Blob argument or set in AzureContext")}
|
||||
|
||||
if (length(AzureActiveContext$StorageAccountK) <1 || SAI != AzureActiveContext$StorageAccountK|| length(AzureActiveContext$StorageKey) <1)
|
||||
{
|
||||
cat("Fetching Storage Key..")
|
||||
STK <- AzureSAGetKey(sc,ResourceGroup = RGI,StorageAccount = SAI)
|
||||
}
|
||||
else
|
||||
STK <- AzureActiveContext$StorageKey
|
||||
|
||||
if (length(STK)<1) {stop("Error: No StorageKey provided: Use StorageKey argument or set in AzureContext")}
|
||||
|
||||
DIR <- AzureActiveContext$Directory
|
||||
DC <- AzureActiveContext$DContainer
|
||||
|
||||
if(missing(Directory))
|
||||
{
|
||||
if (length(DIR)<1) DIR = "" # No previous Dir value
|
||||
if (length(DC)<1)
|
||||
{
|
||||
DIR <- "" # No previous Dir value
|
||||
DC <- ""
|
||||
}
|
||||
else
|
||||
if (CNTR != DC) DIR = "" # Change of Container
|
||||
}
|
||||
else
|
||||
DIR <- Directory
|
||||
|
||||
if (nchar(DIR) > 0) DIR <- paste0(DIR,"/")
|
||||
|
||||
BLOBI <- paste0(DIR,BLOBI)
|
||||
BLOBI <- gsub("^/","",BLOBI)
|
||||
BLOBI <- gsub("^\\./","",BLOBI)
|
||||
cat(BLOBI)
|
||||
|
||||
URL <- paste("http://",SAI,".blob.core.windows.net/",CNTR,"/",BLOBI,sep="")
|
||||
|
||||
|
||||
D1 <- Sys.getlocale("LC_TIME"); Sys.setlocale("LC_TIME", "C")
|
||||
#`x-ms-date` <- format(Sys.time(),"%a, %d %b %Y %H:%M:%S %Z", tz="GMT")
|
||||
Sys.setlocale("LC_TIME", D1)
|
||||
D1 <- format(Sys.time(),"%a, %d %b %Y %H:%M:%S %Z", tz="GMT")
|
||||
|
||||
SIG <- GetSig(AzureActiveContext,URL,"GET",STK,SAI,Container=CNTR,CMD=paste0("/",BLOBI),DateS=D1)
|
||||
|
||||
AT <- paste0("SharedKey ", SAI, ":", SIG)
|
||||
|
||||
r <- GET(URL,add_headers(.headers = c("Authorization" = AT, "Content-Length" = "0","x-ms-version"="2015-04-05","x-ms-date"=D1)),verbosity)
|
||||
|
||||
if (status_code(r) == 404) {
|
||||
cat(BLOBI)
|
||||
warning("File not found");
|
||||
return(NULL)
|
||||
}
|
||||
else
|
||||
if (status_code(r) != 200) {stop(paste0("Error: Return code(",status_code(r),")" ))}
|
||||
|
||||
r2 <- content(r,Type,encoding="UTF-8")
|
||||
|
||||
AzureActiveContext$StorageAccount <- SAI
|
||||
AzureActiveContext$ResourceGroup <- RGI
|
||||
AzureActiveContext$StorageKey <- STK
|
||||
AzureActiveContext$Container <- CNTR
|
||||
AzureActiveContext$Blob <- BLOBI
|
||||
return(r2)
|
||||
}
|
||||
|
||||
|
||||
#' Write contents to a specifed Storage Blob.
|
||||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureSAGetKey
|
||||
#' @inheritParams AzureBlobLS
|
||||
#'
|
||||
#' @param Contents - Object to Store or Value
|
||||
#' @param File - Local FileName to Store in Azure Blob
|
||||
#'
|
||||
#' @family Blob store functions
|
||||
#' @export
|
||||
AzurePutBlob <- function(AzureActiveContext,Blob, Contents="",File="",Directory,StorageAccount,StorageKey,Container,ResourceGroup,SubscriptionID,AzToken,verbose=FALSE) {
|
||||
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
|
||||
if(missing(SubscriptionID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SubscriptionID)
|
||||
if(missing(AzToken)) {ATI <- AzureActiveContext$Token} else (ATI = AzToken)
|
||||
if(missing(ResourceGroup)) {RGI <- AzureActiveContext$ResourceGroup} else (RGI = ResourceGroup)
|
||||
if(missing(StorageAccount)) {SAI <- AzureActiveContext$StorageAccount} else (SAI = StorageAccount)
|
||||
if(missing(StorageKey)) {STK <- AzureActiveContext$StorageKey} else (STK = StorageKey)
|
||||
if(missing(Container)) {CNTR <- AzureActiveContext$Container} else (CNTR = Container)
|
||||
if(missing(Blob)) {BLOBI <- AzureActiveContext$Blob} else (BLOBI = Blob)
|
||||
verbosity <- if(verbose) httr::verbose(TRUE) else NULL
|
||||
|
||||
if (length(RGI)<1) {stop("Error: No ResourceGroup provided: Use ResourceGroup argument or set in AzureContext")}
|
||||
if (length(SAI)<1) {stop("Error: No StorageAccount provided: Use StorageAccount argument or set in AzureContext")}
|
||||
if (length(CNTR)<1) {stop("Error: No Container provided: Use Container argument or set in AzureContext")}
|
||||
if (length(BLOBI)<1) {stop("Error: No Blob provided: Use Blob argument or set in AzureContext")}
|
||||
|
||||
DIR <- AzureActiveContext$Directory
|
||||
DC <- AzureActiveContext$DContainer
|
||||
|
||||
if(missing(Directory))
|
||||
{
|
||||
|
||||
if (length(DIR)<1) DIR = "" # No previous Dir value
|
||||
if (length(DC)<1)
|
||||
{
|
||||
DIR <- "" # No previous Dir value
|
||||
DC <- ""
|
||||
}
|
||||
else
|
||||
if (CNTR != DC) DIR = "" # Change of Container
|
||||
}
|
||||
else
|
||||
DIR <- Directory
|
||||
if (nchar(DIR) > 0) DIR <- paste0(DIR,"/")
|
||||
|
||||
BLOBI <- paste0(DIR,BLOBI)
|
||||
BLOBI <- gsub("^/","",BLOBI)
|
||||
BLOBI <- gsub("//","/",BLOBI)
|
||||
BLOBI <- gsub("//","/",BLOBI)
|
||||
|
||||
if(missing(Contents) && missing(File)) stop("Content or File needs to be supplied")
|
||||
|
||||
if(!missing(Contents) && !missing(File)) stop("Provided either Content OR File Argument")
|
||||
|
||||
print(typeof(Contents))
|
||||
|
||||
if (length(AzureActiveContext$StorageAccountK) <1 || SAI != AzureActiveContext$StorageAccountK|| length(AzureActiveContext$StorageKey) <1) {
|
||||
cat("Fetching Storage Key..")
|
||||
STK <- AzureSAGetKey(sc,ResourceGroup = RGI,StorageAccount = SAI)
|
||||
}
|
||||
else
|
||||
STK <- AzureActiveContext$StorageKey
|
||||
|
||||
if (length(STK)<1) {stop("Error: No StorageKey provided: Use StorageKey argument or set in AzureContext")}
|
||||
|
||||
URL <- paste("http://",SAI,".blob.core.windows.net/",CNTR,"/",BLOBI,sep="")
|
||||
|
||||
D1 <- Sys.getlocale("LC_TIME"); Sys.setlocale("LC_TIME", "C")
|
||||
# `x-ms-date` <- format(Sys.time(),"%a, %d %b %Y %H:%M:%S %Z", tz="GMT")
|
||||
Sys.setlocale("LC_TIME", D1)
|
||||
D1 <- format(Sys.time(),"%a, %d %b %Y %H:%M:%S %Z", tz="GMT")
|
||||
if (nchar(Contents) == 0) Contents <- "-"
|
||||
|
||||
SIG <- GetSig(AzureActiveContext,URL,"PUT",STK,SAI,ContentType = "text/plain; charset=UTF-8" , Size=nchar(Contents),Headers="x-ms-blob-type:BlockBlob",Container=CNTR,CMD=paste0("/",BLOBI),DateS=D1)
|
||||
|
||||
AT <- paste0("SharedKey ", SAI, ":", SIG)
|
||||
|
||||
r <- PUT(URL,add_headers(.headers = c("Authorization" = AT, "Content-Length" = nchar(Contents) ,"x-ms-version"="2015-04-05","x-ms-date"=D1,"x-ms-blob-type"="BlockBlob","Content-Type" = "text/plain; charset=UTF-8")),body = Contents,verbosity)
|
||||
|
||||
# r <- PUT(URL,add_headers(.headers = c("Authorization" = AT, "Content-Length" = nchar(Contents) ,"x-ms-version"="2015-04-05","x-ms-date"=D1,"x-ms-blob-type"="BlockBlob","Content-Type" = "text/plain; charset=UTF-8")),body = upload_file(path= path.expand("c:\\temp\\fred"),type = 'text/csv'),verbosity)
|
||||
|
||||
|
||||
AzureActiveContext$Blob <- BLOBI
|
||||
return(paste("Blob:", BLOBI," Saved:",nchar(Contents),"bytes written"))
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#' Find File in a Storage account directory.
|
||||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureSAGetKey
|
||||
|
||||
#' @family Storage account
|
||||
# @param AzureActiveContext Azure Context Object
|
||||
# @param StorageAccount StorageAccount
|
||||
# @param StorageKey StorageKey
|
||||
# @param Container Storage Container
|
||||
# @param ResourceGroup ResourceGroup Object (or use AzureActiveContext)
|
||||
# @param Token Token Object (or use AzureActiveContext)
|
||||
# @param SubscriptionID SubscriptionID Object (or use AzureActiveContext)
|
||||
# @param verbose Print Tracing information (Default False)
|
||||
#' @inheritParams AzurePutBlob
|
||||
#'
|
||||
#' @family Blob store functions
|
||||
#' @export
|
||||
AzureBlobFind <- function(AzureActiveContext,File,StorageAccount,StorageKey,Container,ResourceGroup,SubscriptionID,AzToken,verbose=FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
|
@ -536,19 +490,12 @@ AzureBlobFind <- function(AzureActiveContext,File,StorageAccount,StorageKey,Cont
|
|||
#' Azure Blob change current Directory.
|
||||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureSAGetKey
|
||||
|
||||
#' @family Storage account
|
||||
# @param AzureActiveContext Azure Context Object
|
||||
# @param Directory - Set Directory to Path (Supports (../ and ../..))
|
||||
# @param Container Storage Container
|
||||
# @param StorageAccount StorageAccount
|
||||
# @param StorageKey StorageKey
|
||||
# @param ResourceGroup ResourceGroup Object (or use AzureActiveContext)
|
||||
# @param Token Token Object (or use AzureActiveContext)
|
||||
# @param SubscriptionID SubscriptionID Object (or use AzureActiveContext)
|
||||
# @param verbose Print Tracing information (Default False)
|
||||
#' @inheritParams AzureBlobLS
|
||||
#' @inheritParams AzurePutBlob
|
||||
#'
|
||||
#' @family Blob store functions
|
||||
#' @export
|
||||
AzureBlobCD <- function(AzureActiveContext,Directory,Container,File,StorageAccount,StorageKey,ResourceGroup,SubscriptionID,AzToken,verbose=FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
|
|
55
R/AzureHDI.R
55
R/AzureHDI.R
|
@ -2,19 +2,19 @@
|
|||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @param ClusterName ResourceGroup Object (or use AzureActiveContext)
|
||||
# @param Token Token Object (or use AzureActiveContext)
|
||||
#' @param verbose Print Tracing information (Default False)
|
||||
#' @inheritParams AzureListAllResources
|
||||
#'
|
||||
#' @family HDInsight
|
||||
#' @param ClusterName Cluster name
|
||||
#'
|
||||
#' @family HDInsight functions
|
||||
#'
|
||||
#' @return Returns Dataframe of HDInsight Clusters
|
||||
#' @export
|
||||
AzureListHDI <- function(AzureActiveContext,ResourceGroup,ClusterName="*",
|
||||
SubscriptionID,ATI,Name, Type,Location,verbose = FALSE) {
|
||||
SubscriptionID,AzToken,Name, Type,Location,verbose = FALSE) {
|
||||
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
if(missing(ATI)) {AT <- AzureActiveContext$Token} else (AT = ATI)
|
||||
if(missing(AzToken)) {AT <- AzureActiveContext$Token} else (AT = AzToken)
|
||||
if(missing(SubscriptionID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SubscriptionID)
|
||||
if(missing(ResourceGroup)) {RGI <- AzureActiveContext$ResourceGroup} else (RGI = ResourceGroup)
|
||||
verbosity <- if(verbose) httr::verbose(TRUE) else NULL
|
||||
|
@ -108,14 +108,15 @@ AzureListHDI <- function(AzureActiveContext,ResourceGroup,ClusterName="*",
|
|||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureListHDI
|
||||
#'
|
||||
#' @family HDInsight
|
||||
#'
|
||||
#' @return Returns Dataframe of HDInsight Clusters information
|
||||
#' @family HDInsight functions
|
||||
#' @export
|
||||
AzureHDIConf <- function(AzureActiveContext,ClusterName,ResourceGroup,SUBID,ATI,Name, Type,Location,verbose = FALSE) {
|
||||
AzureHDIConf <- function(AzureActiveContext,ClusterName,ResourceGroup,SubscriptionID,
|
||||
AzToken,Name, Type,Location,verbose = FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
if(missing(ATI)) {AT <- AzureActiveContext$Token} else (AT = ATI)
|
||||
if(missing(SUBID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SUBID)
|
||||
if(missing(AzToken)) {AT <- AzureActiveContext$Token} else (AT = AzToken)
|
||||
if(missing(SubscriptionID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SubscriptionID)
|
||||
if(missing(ResourceGroup)) {RGI <- AzureActiveContext$ResourceGroup} else (RGI = ResourceGroup)
|
||||
if(missing(ClusterName)) {CN <- AzureActiveContext$ClusterName} else (CN = ClusterName)
|
||||
verbosity <- if(verbose) httr::verbose(TRUE) else NULL
|
||||
|
@ -158,17 +159,17 @@ AzureHDIConf <- function(AzureActiveContext,ClusterName,ResourceGroup,SUBID,ATI,
|
|||
}
|
||||
|
||||
|
||||
#' Resize a HDInsight CLuster Role.
|
||||
#' Resize a HDInsight Cluster Role.
|
||||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureListHDI
|
||||
#'
|
||||
#' @family HDInsight
|
||||
#' @param Role Role Type: "worker", "head" or "Edge"
|
||||
#' @param Size Desired size of Role Type
|
||||
#' @param Mode "Sync" or "Async"
|
||||
#'
|
||||
#' @family HDInsight functions
|
||||
#' @export
|
||||
AzureResizeHDI <- function(AzureActiveContext,ClusterName, Role="worker", Size=2, Mode="Sync",AzToken, SubscriptionID,ResourceGroup,verbose = FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
|
@ -245,9 +246,8 @@ AzureResizeHDI <- function(AzureActiveContext,ClusterName, Role="worker", Size=2
|
|||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureListHDI
|
||||
#'
|
||||
#' @family HDInsight
|
||||
#'
|
||||
#' @return Returns Dataframe of HDInsight Clusters information
|
||||
#' @family HDInsight functions
|
||||
#' @export
|
||||
AzureDeleteHDI <- function(AzureActiveContext,ClusterName,AzToken, SubscriptionID,ResourceGroup,verbose = FALSE) {
|
||||
|
||||
|
@ -283,7 +283,6 @@ AzureDeleteHDI <- function(AzureActiveContext,ClusterName,AzToken, SubscriptionI
|
|||
#'
|
||||
#'
|
||||
#' @param ClusterName ResourceGroup Object (or use AzureActiveContext)
|
||||
#' @param Location Location string
|
||||
#' @param SKey Storage Key
|
||||
#' @param Version Version
|
||||
#' @param AdminUser Admin user name
|
||||
|
@ -298,24 +297,24 @@ AzureDeleteHDI <- function(AzureActiveContext,ClusterName,AzToken, SubscriptionI
|
|||
#' @param Mode Mode
|
||||
#'
|
||||
#' @return Success message
|
||||
#' @family HDInsight
|
||||
#' @family HDInsight functions
|
||||
#' @export
|
||||
AzureCreateHDI <- function(AzureActiveContext,ClusterName,
|
||||
Location,Kind = "spark",
|
||||
StorageAcc, SKey, Version="3.4", Workers=2,
|
||||
StorageAccount, SKey, Version="3.4", Workers=2,
|
||||
AdminUser,AdminPassword,
|
||||
SSHUser,SSHPassword,
|
||||
HiveServer,HiveDB,HiveUser,HivePassword,
|
||||
ResourceGroup,AzToken, subscriptionID,
|
||||
ResourceGroup,AzToken, SubscriptionID,
|
||||
Mode="Sync",verbose = FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
|
||||
if(missing(ResourceGroup)) {RGI <- AzureActiveContext$ResourceGroup} else (RGI = ResourceGroup)
|
||||
if(missing(subscriptionID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = subscriptionID)
|
||||
if(missing(SubscriptionID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SubscriptionID)
|
||||
if(missing(AzToken)) {ATI <- AzureActiveContext$Token} else (ATI = AzToken)
|
||||
verbosity <- if(verbose) httr::verbose(TRUE) else NULL
|
||||
|
||||
if (!length(StorageAcc)) {stop("Error: No Storage Account (StorageAcc) provided")}
|
||||
if (!length(StorageAccount)) {stop("Error: No Storage Account (StorageAcc) provided")}
|
||||
# if (!length(SKey)) {stop("Error: No Storage Key (SKey) provided")}
|
||||
if (!length(Location)) {stop("Error: No Location provided")}
|
||||
if (!length(ClusterName)) {stop("Error: No Valid ClusterName provided")}
|
||||
|
@ -326,7 +325,7 @@ AzureCreateHDI <- function(AzureActiveContext,ClusterName,
|
|||
if (!length(RGI)) {stop("Error: No ResourceGroup provided: Use ResourceGroup argument or set in AzureContext")}
|
||||
|
||||
cat("Fetching Storage Key..")
|
||||
SKey <- AzureSAGetKey(AzureActiveContext,ResourceGroup = RGI,StorageAccount = StorageAcc)
|
||||
SKey <- AzureSAGetKey(AzureActiveContext,ResourceGroup = RGI,StorageAccount = StorageAccount)
|
||||
|
||||
HIVE <- FALSE
|
||||
print("1")
|
||||
|
@ -524,8 +523,8 @@ AzureCreateHDI <- function(AzureActiveContext,ClusterName,
|
|||
#' @param EdgeNode install on worker nodes (default FALSE)
|
||||
#' @param Parameters Parameters
|
||||
#'
|
||||
#' @family HDInsight
|
||||
#' @return Returns Success Message
|
||||
#' @family HDInsight functions
|
||||
#' @export
|
||||
AzureRunScriptAction <- function(AzureActiveContext,ScriptName = "script1",ScriptURL,
|
||||
HeadNode=TRUE,WorkerNode=FALSE,EdgeNode=FALSE,
|
||||
|
@ -598,18 +597,14 @@ AzureRunScriptAction <- function(AzureActiveContext,ScriptName = "script1",Scrip
|
|||
#' @inheritParams AzureListHDI
|
||||
#' @inheritParams AzureRunScriptAction
|
||||
#'
|
||||
#' @param ATI ATI
|
||||
#' @param Name Name
|
||||
#' @param Type Type
|
||||
#'
|
||||
#' @family HDInsight
|
||||
#'
|
||||
#' @return Returns Dataframe of HDInsight Clusters
|
||||
#' @family HDInsight functions
|
||||
#' @export
|
||||
AzureScriptActionHistory <- function(AzureActiveContext,ResourceGroup,
|
||||
ClusterName="*",SubscriptionID,ATI,Name, Type,verbose = FALSE) {
|
||||
ClusterName="*",SubscriptionID,
|
||||
AzToken,Name, Type,verbose = FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
if(missing(ATI)) {AT <- AzureActiveContext$Token} else (AT = ATI)
|
||||
if(missing(AzToken)) {AT <- AzureActiveContext$Token} else (AT = AzToken)
|
||||
if(missing(ClusterName)) {CN <- AzureActiveContext$ClusterName} else (CN = ClusterName)
|
||||
if(missing(SubscriptionID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SubscriptionID)
|
||||
if(missing(ResourceGroup)) {RGI <- AzureActiveContext$ResourceGroup} else (RGI = ResourceGroup)
|
||||
|
|
|
@ -4,15 +4,11 @@
|
|||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#'
|
||||
# @param Azure Context Object
|
||||
# @param Token Token Object (or use AzureActiveContext)
|
||||
# @param Verbose Print Tracing information (Default False)
|
||||
#'
|
||||
#' @return Returns Dataframe of SubscriptionID sets AzureContext SubscriptionID
|
||||
#' @family Resources
|
||||
#' @family Resource group functions
|
||||
#' @export
|
||||
AzureListSubscriptions <- function(AzureActiveContext,ATI,verbose = FALSE) {
|
||||
if(missing(ATI)) {AT <- AzureActiveContext$Token} else (AT = ATI)
|
||||
AzureListSubscriptions <- function(AzureActiveContext,AzToken,verbose = FALSE) {
|
||||
if(missing(AzToken)) {AT <- AzureActiveContext$Token} else (AT = AzToken)
|
||||
if (nchar(AT)<5) {stop("Error: No Token / Not currently Authenticated.")}
|
||||
verbosity <- if(verbose) httr::verbose(TRUE) else NULL
|
||||
|
||||
|
@ -33,14 +29,13 @@ AzureListSubscriptions <- function(AzureActiveContext,ATI,verbose = FALSE) {
|
|||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @family Resources
|
||||
#'
|
||||
#' @return Returns Dataframe of ResourceGroups
|
||||
#' @family Resources
|
||||
#' @family Resource group functions
|
||||
#' @export
|
||||
AzureListRG <- function(AzureActiveContext,subscriptionID,AT,verbose = FALSE) {
|
||||
AzureListRG <- function(AzureActiveContext,SubscriptionID,AzToken,verbose = FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
if(missing(AT)) {ATI <- AzureActiveContext$Token} else (ATI = AT)
|
||||
if(missing(AzToken)) {ATI <- AzureActiveContext$Token} else (ATI = AzToken)
|
||||
if(missing(SubscriptionID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SubscriptionID)
|
||||
if (!length(ATI)) {stop("Error: No Token / Not currently Authenticated.")}
|
||||
if (!length(SUBIDI)) {stop("Error: No SubscriptionID provided: Use SUBID argument or set in AzureContext")}
|
||||
|
@ -71,13 +66,15 @@ AzureListRG <- function(AzureActiveContext,subscriptionID,AT,verbose = FALSE) {
|
|||
#'
|
||||
#' @param AzureActiveContext Azure Context Object
|
||||
#' @param ResourceGroup ResourceGroup Object (or use AzureActiveContext)
|
||||
# @param AzToken Token Object (or use AzureActiveContext)
|
||||
#' @param SubscriptionID SubscriptionID Object (or use AzureActiveContext)
|
||||
#' @param Name Name
|
||||
#' @param Type Type
|
||||
#' @param Location Location string
|
||||
#'
|
||||
#' @return Returns Dataframe of Resources
|
||||
#' @family Resources
|
||||
#' @family Resource group functions
|
||||
#' @export
|
||||
AzureListAllRecources <- function(AzureActiveContext,ResourceGroup,
|
||||
AzureListAllResources <- function(AzureActiveContext,ResourceGroup,
|
||||
SubscriptionID,AzToken,Name, Type, Location,verbose = FALSE) {
|
||||
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
|
@ -131,21 +128,17 @@ AzureListAllRecources <- function(AzureActiveContext,ResourceGroup,
|
|||
#' Create a ResourceGroup.
|
||||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @family Resources
|
||||
#'
|
||||
# @param AzureActiveContext - Azure Context Object
|
||||
# @param ResourceGroup - ResourceGroup Object (or use AzureActiveContext)
|
||||
# @param AT - Token Object (or use AzureActiveContext)
|
||||
# @param SUBID - SubscriptionID Object (or use AzureActiveContext)
|
||||
# @param Verbose - Print Tracing information (Default False)
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureListAllResources
|
||||
#'
|
||||
#' @return Returns Dataframe of Resources
|
||||
#' @family Resources
|
||||
#' @family Resource group functions
|
||||
#' @export
|
||||
AzureCreateResourceGroup <- function(AzureActiveContext,ResourceGroup,Location,SUBID,AT,verbose=FALSE) {
|
||||
AzureCreateResourceGroup <- function(AzureActiveContext,ResourceGroup,
|
||||
Location,SubscriptionID,AzToken,verbose=FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
if(missing(AT)) {ATI <- AzureActiveContext$Token} else (ATI = AT)
|
||||
if(missing(SUBID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SUBID)
|
||||
if(missing(AzToken)) {ATI <- AzureActiveContext$Token} else (ATI = AzToken)
|
||||
if(missing(SubscriptionID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SubscriptionID)
|
||||
# if (ATI == "") stop("Token not provided")
|
||||
# if (SUBIDI == "") stop("Subscription not provided")
|
||||
if(missing(ResourceGroup)) {RGI <- AzureActiveContext$ResourceGroup} else (RGI = ResourceGroup)
|
||||
|
@ -175,21 +168,17 @@ AzureCreateResourceGroup <- function(AzureActiveContext,ResourceGroup,Location,S
|
|||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @family Resources
|
||||
# @param AzureActiveContext Azure Context Object
|
||||
# @param ResourceGroup ResourceGroup Object (or use AzureActiveContext)
|
||||
# @param SubscriptionID SubscriptionID Object (or use AzureActiveContext)
|
||||
# @param Token Token Object (or use AzureActiveContext)
|
||||
# @param Verbose Print Tracing information (Default False)
|
||||
#' @inheritParams AzureListAllResources
|
||||
#'
|
||||
#' @return Returns Dataframe of Resources
|
||||
#' @family Resources
|
||||
#' @family Resource group functions
|
||||
#' @export
|
||||
AzureDeleteResourceGroup <- function(AzureActiveContext,ResourceGroup,SUBID,AT, Type,verbose=FALSE) {
|
||||
AzureDeleteResourceGroup <- function(AzureActiveContext,ResourceGroup,SubscriptionID,
|
||||
AzToken, Type,verbose=FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
|
||||
if(missing(AT)) {ATI <- AzureActiveContext$Token} else (ATI = AT)
|
||||
if(missing(SUBID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SUBID)
|
||||
if(missing(AzToken)) {ATI <- AzureActiveContext$Token} else (ATI = AzToken)
|
||||
if(missing(SubscriptionID)) {SUBIDI <- AzureActiveContext$SubscriptionID} else (SUBIDI = SubscriptionID)
|
||||
# if (ATI == "") stop("Token not provided")
|
||||
# if (SUBIDI == "") stop("Subscription not provided")
|
||||
if(missing(ResourceGroup)) stop("Please supply Resource Group to Confirm")
|
||||
|
|
|
@ -204,9 +204,9 @@ AzureListSA <- function(AzureActiveContext,ResourceGroup,SubscriptionID,AzToken,
|
|||
if (!length(SUBIDI)) {stop("Error: No SubscriptionID provided: Use SUBID argument or set in AzureContext")}
|
||||
verbosity <- if(verbose) httr::verbose(TRUE) else NULL
|
||||
if(missing(ResourceGroup))
|
||||
SA <- AzureListAllRecources(AzureActiveContext, Type="Microsoft.Storage/storageAccounts")
|
||||
SA <- AzureListAllResources(AzureActiveContext, Type="Microsoft.Storage/storageAccounts")
|
||||
else
|
||||
SA <- AzureListAllRecources(AzureActiveContext, Type="Microsoft.Storage/storageAccounts",ResourceGroup ="myResourceGroup")
|
||||
SA <- AzureListAllResources(AzureActiveContext, Type="Microsoft.Storage/storageAccounts",ResourceGroup ="myResourceGroup")
|
||||
rownames(SA) <- NULL
|
||||
return(SA)
|
||||
}
|
||||
|
|
|
@ -1,19 +1,22 @@
|
|||
#' Submit a Azure Resource ManagerTemplate.
|
||||
#' Deploy an Azure Resource Manager Template.
|
||||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
# @param AzureActiveContext Azure Context Object
|
||||
# @param DeplName DeplName
|
||||
# @param TemplateURL TemplateURL
|
||||
# @param ParamURL ParamURL
|
||||
# @param ResourceGroup ResourceGroup Object (or use AzureActiveContext)
|
||||
# @param Token Token Object (or use AzureActiveContext)
|
||||
# @param SubscriptionID SubscriptionID Object (or use AzureActiveContext)
|
||||
# @param verbose Print Tracing information (Default False)
|
||||
#' @inheritParams AzureResizeHDI
|
||||
#'
|
||||
#' @param DeplName DeplName
|
||||
#' @param TemplateURL TemplateURL
|
||||
#' @param ParamURL ParamURL
|
||||
#' @param TemplateJSON TemplateJSON
|
||||
#' @param ParamJSON ParamJSON
|
||||
#'
|
||||
#' @family Template functions
|
||||
#' @export
|
||||
AzureDeployTemplate <- function(AzureActiveContext,DeplName,TemplateURL,ParamURL,TemplateJSON,ParamJSON,Mode="Sync",ResourceGroup,SubscriptionID,AzToken, verbose = FALSE) {
|
||||
AzureDeployTemplate <- function(AzureActiveContext,DeplName,
|
||||
TemplateURL,ParamURL,
|
||||
TemplateJSON,ParamJSON,
|
||||
Mode="Sync",ResourceGroup,SubscriptionID,
|
||||
AzToken, verbose = FALSE) {
|
||||
AzureCheckToken(AzureActiveContext)
|
||||
|
||||
if(missing(AzToken)) {AT <- AzureActiveContext$Token} else (AT = AzToken)
|
||||
|
@ -103,7 +106,11 @@ AzureDeployTemplate <- function(AzureActiveContext,DeplName,TemplateURL,ParamURL
|
|||
}
|
||||
|
||||
|
||||
#' Check Template DeployStatus.
|
||||
#' Check Template Deployment Status.
|
||||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureDeployTemplate
|
||||
#'
|
||||
# @param AzureActiveContext Azure Context Object
|
||||
# @param DeplName DeplName
|
||||
|
@ -142,6 +149,7 @@ AzureDeployStatus <- function(AzureActiveContext,DeplName,ResourceGroup, Subscri
|
|||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureDeployTemplate
|
||||
# @param AzureActiveContext Azure Context Object
|
||||
# @param DeplName DeplName
|
||||
# @param ResourceGroup ResourceGroup Object (or use AzureActiveContext)
|
||||
|
@ -180,6 +188,7 @@ AzureDeleteDeploy <- function(AzureActiveContext,DeplName,ResourceGroup,Subscrip
|
|||
#'
|
||||
#' @inheritParams SetAzureContext
|
||||
#' @inheritParams AzureAuthenticate
|
||||
#' @inheritParams AzureDeployTemplate
|
||||
#'
|
||||
#' @family Template functions
|
||||
#' @export
|
||||
|
|
|
@ -30,11 +30,6 @@ See \url{https://azure.microsoft.com/en-us/documentation/articles/resource-group
|
|||
\url{https://azure.microsoft.com/en-us/documentation/articles/resource-group-create-service-principal-portal/}
|
||||
}
|
||||
\seealso{
|
||||
Other Resources: \code{\link{AzureCheckToken}},
|
||||
\code{\link{AzureCreateResourceGroup}},
|
||||
\code{\link{AzureDeleteResourceGroup}},
|
||||
\code{\link{AzureListAllRecources}},
|
||||
\code{\link{AzureListRG}},
|
||||
\code{\link{AzureListSubscriptions}}
|
||||
Other Resources: \code{\link{AzureCheckToken}}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,12 @@ AzureBlobCD(AzureActiveContext, Directory, Container, File, StorageAccount,
|
|||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
||||
\item{Directory}{Set Directory to list}
|
||||
|
||||
\item{Container}{Container Object}
|
||||
|
||||
\item{File}{- Local FileName to Store in Azure Blob}
|
||||
|
||||
\item{StorageAccount}{StorageAccount Object}
|
||||
|
||||
\item{StorageKey}{StorageKey Object}
|
||||
|
@ -21,21 +25,16 @@ AzureBlobCD(AzureActiveContext, Directory, Container, File, StorageAccount,
|
|||
\item{SubscriptionID}{SubscriptionID Object}
|
||||
|
||||
\item{AzToken}{Token Object}
|
||||
|
||||
\item{verbose}{Print Tracing information (Default False)}
|
||||
}
|
||||
\description{
|
||||
Azure Blob change current Directory.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobFind}},
|
||||
\code{\link{AzureBlobLS}},
|
||||
\code{\link{AzureCreateSAContainer}},
|
||||
\code{\link{AzureCreateStorageAccount}},
|
||||
\code{\link{AzureDeleteSAContainer}},
|
||||
\code{\link{AzureDeleteStorageAccount}},
|
||||
\code{\link{AzureGetBlob}},
|
||||
Other Blob store functions: \code{\link{AzureBlobFind}},
|
||||
\code{\link{AzureBlobLS}}, \code{\link{AzureGetBlob}},
|
||||
\code{\link{AzureListSABlobs}},
|
||||
\code{\link{AzureListSAContainers}},
|
||||
\code{\link{AzureListSA}}, \code{\link{AzurePutBlob}},
|
||||
\code{\link{AzureSAGetKey}}
|
||||
\code{\link{AzurePutBlob}}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ AzureBlobFind(AzureActiveContext, File, StorageAccount, StorageKey, Container,
|
|||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
||||
\item{File}{- Local FileName to Store in Azure Blob}
|
||||
|
||||
\item{StorageAccount}{StorageAccount Object}
|
||||
|
||||
\item{StorageKey}{StorageKey Object}
|
||||
|
@ -28,16 +30,9 @@ AzureBlobFind(AzureActiveContext, File, StorageAccount, StorageKey, Container,
|
|||
Find File in a Storage account directory.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobLS}},
|
||||
\code{\link{AzureCreateSAContainer}},
|
||||
\code{\link{AzureCreateStorageAccount}},
|
||||
\code{\link{AzureDeleteSAContainer}},
|
||||
\code{\link{AzureDeleteStorageAccount}},
|
||||
\code{\link{AzureGetBlob}},
|
||||
Other Blob store functions: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobLS}}, \code{\link{AzureGetBlob}},
|
||||
\code{\link{AzureListSABlobs}},
|
||||
\code{\link{AzureListSAContainers}},
|
||||
\code{\link{AzureListSA}}, \code{\link{AzurePutBlob}},
|
||||
\code{\link{AzureSAGetKey}}
|
||||
\code{\link{AzurePutBlob}}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,10 @@ AzureBlobLS(AzureActiveContext, Directory, Recursive = FALSE, StorageAccount,
|
|||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
||||
\item{Directory}{Set Directory to list}
|
||||
|
||||
\item{Recursive}{List directories recursively (Default FALSE)}
|
||||
|
||||
\item{StorageAccount}{StorageAccount Object}
|
||||
|
||||
\item{StorageKey}{StorageKey Object}
|
||||
|
@ -29,16 +33,9 @@ AzureBlobLS(AzureActiveContext, Directory, Recursive = FALSE, StorageAccount,
|
|||
List Blob files in a Storage account directory.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobFind}},
|
||||
\code{\link{AzureCreateSAContainer}},
|
||||
\code{\link{AzureCreateStorageAccount}},
|
||||
\code{\link{AzureDeleteSAContainer}},
|
||||
\code{\link{AzureDeleteStorageAccount}},
|
||||
\code{\link{AzureGetBlob}},
|
||||
Other Blob store functions: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobFind}}, \code{\link{AzureGetBlob}},
|
||||
\code{\link{AzureListSABlobs}},
|
||||
\code{\link{AzureListSAContainers}},
|
||||
\code{\link{AzureListSA}}, \code{\link{AzurePutBlob}},
|
||||
\code{\link{AzureSAGetKey}}
|
||||
\code{\link{AzurePutBlob}}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ AzureCancelDeploy(AzureActiveContext, DeplName, ResourceGroup, SubscriptionID,
|
|||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
||||
\item{DeplName}{DeplName}
|
||||
|
||||
\item{ResourceGroup}{ResourceGroup Object}
|
||||
|
||||
\item{SubscriptionID}{SubscriptionID Object}
|
||||
|
|
|
@ -13,11 +13,6 @@ AzureCheckToken(AzureActiveContext)
|
|||
Check the timestamp of a Token and Renew if needed.
|
||||
}
|
||||
\seealso{
|
||||
Other Resources: \code{\link{AzureAuthenticate}},
|
||||
\code{\link{AzureCreateResourceGroup}},
|
||||
\code{\link{AzureDeleteResourceGroup}},
|
||||
\code{\link{AzureListAllRecources}},
|
||||
\code{\link{AzureListRG}},
|
||||
\code{\link{AzureListSubscriptions}}
|
||||
Other Resources: \code{\link{AzureAuthenticate}}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,9 +5,10 @@
|
|||
\title{Create Specifed HDInsight Cluster.}
|
||||
\usage{
|
||||
AzureCreateHDI(AzureActiveContext, ClusterName, Location, Kind = "spark",
|
||||
StorageAcc, SKey, Version = "3.4", Workers = 2, AdminUser, AdminPassword,
|
||||
SSHUser, SSHPassword, HiveServer, HiveDB, HiveUser, HivePassword,
|
||||
ResourceGroup, AzToken, subscriptionID, Mode = "Sync", verbose = FALSE)
|
||||
StorageAccount, SKey, Version = "3.4", Workers = 2, AdminUser,
|
||||
AdminPassword, SSHUser, SSHPassword, HiveServer, HiveDB, HiveUser,
|
||||
HivePassword, ResourceGroup, AzToken, SubscriptionID, Mode = "Sync",
|
||||
verbose = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
@ -18,6 +19,8 @@ AzureCreateHDI(AzureActiveContext, ClusterName, Location, Kind = "spark",
|
|||
|
||||
\item{Kind}{"hadoop","spark" or "pyspark"}
|
||||
|
||||
\item{StorageAccount}{StorageAccount Object}
|
||||
|
||||
\item{SKey}{Storage Key}
|
||||
|
||||
\item{Version}{Version}
|
||||
|
@ -44,6 +47,8 @@ AzureCreateHDI(AzureActiveContext, ClusterName, Location, Kind = "spark",
|
|||
|
||||
\item{AzToken}{Token Object}
|
||||
|
||||
\item{SubscriptionID}{SubscriptionID Object}
|
||||
|
||||
\item{Mode}{Mode}
|
||||
|
||||
\item{verbose}{Print Tracing information (Default False)}
|
||||
|
@ -55,7 +60,7 @@ Success message
|
|||
Create Specifed HDInsight Cluster.
|
||||
}
|
||||
\seealso{
|
||||
Other HDInsight: \code{\link{AzureDeleteHDI}},
|
||||
Other HDInsight functions: \code{\link{AzureDeleteHDI}},
|
||||
\code{\link{AzureHDIConf}}, \code{\link{AzureListHDI}},
|
||||
\code{\link{AzureResizeHDI}},
|
||||
\code{\link{AzureRunScriptAction}},
|
||||
|
|
|
@ -4,13 +4,21 @@
|
|||
\alias{AzureCreateResourceGroup}
|
||||
\title{Create a ResourceGroup.}
|
||||
\usage{
|
||||
AzureCreateResourceGroup(AzureActiveContext, ResourceGroup, Location, SUBID, AT,
|
||||
verbose = FALSE)
|
||||
AzureCreateResourceGroup(AzureActiveContext, ResourceGroup, Location,
|
||||
SubscriptionID, AzToken, verbose = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
||||
\item{ResourceGroup}{ResourceGroup Object}
|
||||
|
||||
\item{Location}{Location string}
|
||||
|
||||
\item{SubscriptionID}{SubscriptionID Object}
|
||||
|
||||
\item{AzToken}{Token Object}
|
||||
|
||||
\item{verbose}{Print Tracing information (Default False)}
|
||||
}
|
||||
\value{
|
||||
Returns Dataframe of Resources
|
||||
|
@ -19,17 +27,8 @@ Returns Dataframe of Resources
|
|||
Create a ResourceGroup.
|
||||
}
|
||||
\seealso{
|
||||
Other Resources: \code{\link{AzureAuthenticate}},
|
||||
\code{\link{AzureCheckToken}},
|
||||
\code{\link{AzureDeleteResourceGroup}},
|
||||
\code{\link{AzureListAllRecources}},
|
||||
\code{\link{AzureListRG}},
|
||||
\code{\link{AzureListSubscriptions}}
|
||||
|
||||
Other Resources: \code{\link{AzureAuthenticate}},
|
||||
\code{\link{AzureCheckToken}},
|
||||
\code{\link{AzureDeleteResourceGroup}},
|
||||
\code{\link{AzureListAllRecources}},
|
||||
Other Resource group functions: \code{\link{AzureDeleteResourceGroup}},
|
||||
\code{\link{AzureListAllResources}},
|
||||
\code{\link{AzureListRG}},
|
||||
\code{\link{AzureListSubscriptions}}
|
||||
}
|
||||
|
|
|
@ -28,15 +28,10 @@ AzureCreateSAContainer(AzureActiveContext, Container, StorageAccount,
|
|||
Create Storage Containers in a specified Storage Account.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobFind}}, \code{\link{AzureBlobLS}},
|
||||
\code{\link{AzureCreateStorageAccount}},
|
||||
Other Storage account: \code{\link{AzureCreateStorageAccount}},
|
||||
\code{\link{AzureDeleteSAContainer}},
|
||||
\code{\link{AzureDeleteStorageAccount}},
|
||||
\code{\link{AzureGetBlob}},
|
||||
\code{\link{AzureListSABlobs}},
|
||||
\code{\link{AzureListSAContainers}},
|
||||
\code{\link{AzureListSA}}, \code{\link{AzurePutBlob}},
|
||||
\code{\link{AzureSAGetKey}}
|
||||
\code{\link{AzureListSA}}, \code{\link{AzureSAGetKey}}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,15 +24,10 @@ AzureCreateStorageAccount(AzureActiveContext, StorageAccount, AzToken,
|
|||
Create an Azure Storage Account.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobFind}}, \code{\link{AzureBlobLS}},
|
||||
\code{\link{AzureCreateSAContainer}},
|
||||
Other Storage account: \code{\link{AzureCreateSAContainer}},
|
||||
\code{\link{AzureDeleteSAContainer}},
|
||||
\code{\link{AzureDeleteStorageAccount}},
|
||||
\code{\link{AzureGetBlob}},
|
||||
\code{\link{AzureListSABlobs}},
|
||||
\code{\link{AzureListSAContainers}},
|
||||
\code{\link{AzureListSA}}, \code{\link{AzurePutBlob}},
|
||||
\code{\link{AzureSAGetKey}}
|
||||
\code{\link{AzureListSA}}, \code{\link{AzureSAGetKey}}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ AzureDeleteDeploy(AzureActiveContext, DeplName, ResourceGroup, SubscriptionID,
|
|||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
||||
\item{DeplName}{DeplName}
|
||||
|
||||
\item{ResourceGroup}{ResourceGroup Object}
|
||||
|
||||
\item{SubscriptionID}{SubscriptionID Object}
|
||||
|
|
|
@ -27,7 +27,7 @@ Returns Dataframe of HDInsight Clusters information
|
|||
Delete Specifed HDInsight Cluster.
|
||||
}
|
||||
\seealso{
|
||||
Other HDInsight: \code{\link{AzureCreateHDI}},
|
||||
Other HDInsight functions: \code{\link{AzureCreateHDI}},
|
||||
\code{\link{AzureHDIConf}}, \code{\link{AzureListHDI}},
|
||||
\code{\link{AzureResizeHDI}},
|
||||
\code{\link{AzureRunScriptAction}},
|
||||
|
|
|
@ -4,14 +4,20 @@
|
|||
\alias{AzureDeleteResourceGroup}
|
||||
\title{Delete a ResourceGroup with all Resources.}
|
||||
\usage{
|
||||
AzureDeleteResourceGroup(AzureActiveContext, ResourceGroup, SUBID, AT, Type,
|
||||
verbose = FALSE)
|
||||
AzureDeleteResourceGroup(AzureActiveContext, ResourceGroup, SubscriptionID,
|
||||
AzToken, Type, verbose = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
||||
\item{ResourceGroup}{ResourceGroup Object}
|
||||
|
||||
\item{SubscriptionID}{SubscriptionID Object}
|
||||
|
||||
\item{AzToken}{Token Object}
|
||||
|
||||
\item{Type}{Type}
|
||||
|
||||
\item{verbose}{Print Tracing information (Default False)}
|
||||
}
|
||||
\value{
|
||||
|
@ -21,17 +27,8 @@ Returns Dataframe of Resources
|
|||
Delete a ResourceGroup with all Resources.
|
||||
}
|
||||
\seealso{
|
||||
Other Resources: \code{\link{AzureAuthenticate}},
|
||||
\code{\link{AzureCheckToken}},
|
||||
\code{\link{AzureCreateResourceGroup}},
|
||||
\code{\link{AzureListAllRecources}},
|
||||
\code{\link{AzureListRG}},
|
||||
\code{\link{AzureListSubscriptions}}
|
||||
|
||||
Other Resources: \code{\link{AzureAuthenticate}},
|
||||
\code{\link{AzureCheckToken}},
|
||||
\code{\link{AzureCreateResourceGroup}},
|
||||
\code{\link{AzureListAllRecources}},
|
||||
Other Resource group functions: \code{\link{AzureCreateResourceGroup}},
|
||||
\code{\link{AzureListAllResources}},
|
||||
\code{\link{AzureListRG}},
|
||||
\code{\link{AzureListSubscriptions}}
|
||||
}
|
||||
|
|
|
@ -28,15 +28,10 @@ AzureDeleteSAContainer(AzureActiveContext, Container, StorageAccount,
|
|||
Delete Storage Container in a specified Storage Account.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobFind}}, \code{\link{AzureBlobLS}},
|
||||
\code{\link{AzureCreateSAContainer}},
|
||||
Other Storage account: \code{\link{AzureCreateSAContainer}},
|
||||
\code{\link{AzureCreateStorageAccount}},
|
||||
\code{\link{AzureDeleteStorageAccount}},
|
||||
\code{\link{AzureGetBlob}},
|
||||
\code{\link{AzureListSABlobs}},
|
||||
\code{\link{AzureListSAContainers}},
|
||||
\code{\link{AzureListSA}}, \code{\link{AzurePutBlob}},
|
||||
\code{\link{AzureSAGetKey}}
|
||||
\code{\link{AzureListSA}}, \code{\link{AzureSAGetKey}}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,15 +24,10 @@ AzureDeleteStorageAccount(AzureActiveContext, StorageAccount, AzToken,
|
|||
Delete an Azure Storage Account.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobFind}}, \code{\link{AzureBlobLS}},
|
||||
\code{\link{AzureCreateSAContainer}},
|
||||
Other Storage account: \code{\link{AzureCreateSAContainer}},
|
||||
\code{\link{AzureCreateStorageAccount}},
|
||||
\code{\link{AzureDeleteSAContainer}},
|
||||
\code{\link{AzureGetBlob}},
|
||||
\code{\link{AzureListSABlobs}},
|
||||
\code{\link{AzureListSAContainers}},
|
||||
\code{\link{AzureListSA}}, \code{\link{AzurePutBlob}},
|
||||
\code{\link{AzureSAGetKey}}
|
||||
\code{\link{AzureListSA}}, \code{\link{AzureSAGetKey}}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,13 +2,26 @@
|
|||
% Please edit documentation in R/AzureTemplate.R
|
||||
\name{AzureDeployStatus}
|
||||
\alias{AzureDeployStatus}
|
||||
\title{Check Template DeployStatus.}
|
||||
\title{Check Template Deployment Status.}
|
||||
\usage{
|
||||
AzureDeployStatus(AzureActiveContext, DeplName, ResourceGroup, SubscriptionID,
|
||||
AzToken, verbose = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
||||
\item{DeplName}{DeplName}
|
||||
|
||||
\item{ResourceGroup}{ResourceGroup Object}
|
||||
|
||||
\item{SubscriptionID}{SubscriptionID Object}
|
||||
|
||||
\item{AzToken}{Token Object}
|
||||
|
||||
\item{verbose}{Print Tracing information (Default False)}
|
||||
}
|
||||
\description{
|
||||
Check Template DeployStatus.
|
||||
Check Template Deployment Status.
|
||||
}
|
||||
\seealso{
|
||||
Other Template functions: \code{\link{AzureCancelDeploy}},
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
% Please edit documentation in R/AzureTemplate.R
|
||||
\name{AzureDeployTemplate}
|
||||
\alias{AzureDeployTemplate}
|
||||
\title{Submit a Azure Resource ManagerTemplate.}
|
||||
\title{Deploy an Azure Resource Manager Template.}
|
||||
\usage{
|
||||
AzureDeployTemplate(AzureActiveContext, DeplName, TemplateURL, ParamURL,
|
||||
TemplateJSON, ParamJSON, Mode = "Sync", ResourceGroup, SubscriptionID,
|
||||
|
@ -11,6 +11,18 @@ AzureDeployTemplate(AzureActiveContext, DeplName, TemplateURL, ParamURL,
|
|||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
||||
\item{DeplName}{DeplName}
|
||||
|
||||
\item{TemplateURL}{TemplateURL}
|
||||
|
||||
\item{ParamURL}{ParamURL}
|
||||
|
||||
\item{TemplateJSON}{TemplateJSON}
|
||||
|
||||
\item{ParamJSON}{ParamJSON}
|
||||
|
||||
\item{Mode}{"Sync" or "Async"}
|
||||
|
||||
\item{ResourceGroup}{ResourceGroup Object}
|
||||
|
||||
\item{SubscriptionID}{SubscriptionID Object}
|
||||
|
@ -20,7 +32,7 @@ AzureDeployTemplate(AzureActiveContext, DeplName, TemplateURL, ParamURL,
|
|||
\item{verbose}{Print Tracing information (Default False)}
|
||||
}
|
||||
\description{
|
||||
Submit a Azure Resource ManagerTemplate.
|
||||
Deploy an Azure Resource Manager Template.
|
||||
}
|
||||
\seealso{
|
||||
Other Template functions: \code{\link{AzureCancelDeploy}},
|
||||
|
|
|
@ -13,6 +13,10 @@ AzureGetBlob(AzureActiveContext, Blob, Directory, Type = "text",
|
|||
|
||||
\item{Blob}{Blob Object}
|
||||
|
||||
\item{Directory}{Set Directory to list}
|
||||
|
||||
\item{Type}{"Text" or "Raw"}
|
||||
|
||||
\item{StorageAccount}{StorageAccount Object}
|
||||
|
||||
\item{StorageKey}{StorageKey Object}
|
||||
|
@ -31,15 +35,9 @@ AzureGetBlob(AzureActiveContext, Blob, Directory, Type = "text",
|
|||
Get contents from a specifed Storage Blob.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobCD}},
|
||||
Other Blob store functions: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobFind}}, \code{\link{AzureBlobLS}},
|
||||
\code{\link{AzureCreateSAContainer}},
|
||||
\code{\link{AzureCreateStorageAccount}},
|
||||
\code{\link{AzureDeleteSAContainer}},
|
||||
\code{\link{AzureDeleteStorageAccount}},
|
||||
\code{\link{AzureListSABlobs}},
|
||||
\code{\link{AzureListSAContainers}},
|
||||
\code{\link{AzureListSA}}, \code{\link{AzurePutBlob}},
|
||||
\code{\link{AzureSAGetKey}}
|
||||
\code{\link{AzurePutBlob}}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
\alias{AzureHDIConf}
|
||||
\title{Get Configuration Information for a specified ClusterName.}
|
||||
\usage{
|
||||
AzureHDIConf(AzureActiveContext, ClusterName, ResourceGroup, SUBID, ATI, Name,
|
||||
Type, Location, verbose = FALSE)
|
||||
AzureHDIConf(AzureActiveContext, ClusterName, ResourceGroup, SubscriptionID,
|
||||
AzToken, Name, Type, Location, verbose = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
@ -14,6 +14,16 @@ AzureHDIConf(AzureActiveContext, ClusterName, ResourceGroup, SUBID, ATI, Name,
|
|||
|
||||
\item{ResourceGroup}{ResourceGroup Object}
|
||||
|
||||
\item{SubscriptionID}{SubscriptionID Object}
|
||||
|
||||
\item{AzToken}{Token Object}
|
||||
|
||||
\item{Name}{Name}
|
||||
|
||||
\item{Type}{Type}
|
||||
|
||||
\item{Location}{Location string}
|
||||
|
||||
\item{verbose}{Print Tracing information (Default False)}
|
||||
}
|
||||
\value{
|
||||
|
@ -23,7 +33,7 @@ Returns Dataframe of HDInsight Clusters information
|
|||
Get Configuration Information for a specified ClusterName.
|
||||
}
|
||||
\seealso{
|
||||
Other HDInsight: \code{\link{AzureCreateHDI}},
|
||||
Other HDInsight functions: \code{\link{AzureCreateHDI}},
|
||||
\code{\link{AzureDeleteHDI}}, \code{\link{AzureListHDI}},
|
||||
\code{\link{AzureResizeHDI}},
|
||||
\code{\link{AzureRunScriptAction}},
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/AzureResources.R
|
||||
\name{AzureListAllRecources}
|
||||
\alias{AzureListAllRecources}
|
||||
\name{AzureListAllResources}
|
||||
\alias{AzureListAllResources}
|
||||
\title{Get all Resource in default Subscription.}
|
||||
\usage{
|
||||
AzureListAllRecources(AzureActiveContext, ResourceGroup, SubscriptionID,
|
||||
AzureListAllResources(AzureActiveContext, ResourceGroup, SubscriptionID,
|
||||
AzToken, Name, Type, Location, verbose = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
|
@ -16,6 +16,12 @@ AzureListAllRecources(AzureActiveContext, ResourceGroup, SubscriptionID,
|
|||
|
||||
\item{AzToken}{Token Object}
|
||||
|
||||
\item{Name}{Name}
|
||||
|
||||
\item{Type}{Type}
|
||||
|
||||
\item{Location}{Location string}
|
||||
|
||||
\item{verbose}{Print Tracing information (Default False)}
|
||||
}
|
||||
\value{
|
||||
|
@ -25,9 +31,7 @@ Returns Dataframe of Resources
|
|||
Get all Resource in default Subscription.
|
||||
}
|
||||
\seealso{
|
||||
Other Resources: \code{\link{AzureAuthenticate}},
|
||||
\code{\link{AzureCheckToken}},
|
||||
\code{\link{AzureCreateResourceGroup}},
|
||||
Other Resource group functions: \code{\link{AzureCreateResourceGroup}},
|
||||
\code{\link{AzureDeleteResourceGroup}},
|
||||
\code{\link{AzureListRG}},
|
||||
\code{\link{AzureListSubscriptions}}
|
|
@ -5,17 +5,25 @@
|
|||
\title{Get all HDInsight Clusters in default Subscription or details for a specified ClusterName.}
|
||||
\usage{
|
||||
AzureListHDI(AzureActiveContext, ResourceGroup, ClusterName = "*",
|
||||
SubscriptionID, ATI, Name, Type, Location, verbose = FALSE)
|
||||
SubscriptionID, AzToken, Name, Type, Location, verbose = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
||||
\item{ResourceGroup}{ResourceGroup Object}
|
||||
|
||||
\item{ClusterName}{ResourceGroup Object (or use AzureActiveContext)}
|
||||
\item{ClusterName}{Cluster name}
|
||||
|
||||
\item{SubscriptionID}{SubscriptionID Object}
|
||||
|
||||
\item{AzToken}{Token Object}
|
||||
|
||||
\item{Name}{Name}
|
||||
|
||||
\item{Type}{Type}
|
||||
|
||||
\item{Location}{Location string}
|
||||
|
||||
\item{verbose}{Print Tracing information (Default False)}
|
||||
}
|
||||
\value{
|
||||
|
@ -25,7 +33,7 @@ Returns Dataframe of HDInsight Clusters
|
|||
Get all HDInsight Clusters in default Subscription or details for a specified ClusterName.
|
||||
}
|
||||
\seealso{
|
||||
Other HDInsight: \code{\link{AzureCreateHDI}},
|
||||
Other HDInsight functions: \code{\link{AzureCreateHDI}},
|
||||
\code{\link{AzureDeleteHDI}}, \code{\link{AzureHDIConf}},
|
||||
\code{\link{AzureResizeHDI}},
|
||||
\code{\link{AzureRunScriptAction}},
|
||||
|
|
|
@ -4,11 +4,15 @@
|
|||
\alias{AzureListRG}
|
||||
\title{Get all Resource Groups in default Subscription.}
|
||||
\usage{
|
||||
AzureListRG(AzureActiveContext, subscriptionID, AT, verbose = FALSE)
|
||||
AzureListRG(AzureActiveContext, SubscriptionID, AzToken, verbose = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
||||
\item{SubscriptionID}{SubscriptionID Object}
|
||||
|
||||
\item{AzToken}{Token Object}
|
||||
|
||||
\item{verbose}{Print Tracing information (Default False)}
|
||||
}
|
||||
\value{
|
||||
|
@ -18,18 +22,9 @@ Returns Dataframe of ResourceGroups
|
|||
Get all Resource Groups in default Subscription.
|
||||
}
|
||||
\seealso{
|
||||
Other Resources: \code{\link{AzureAuthenticate}},
|
||||
\code{\link{AzureCheckToken}},
|
||||
\code{\link{AzureCreateResourceGroup}},
|
||||
Other Resource group functions: \code{\link{AzureCreateResourceGroup}},
|
||||
\code{\link{AzureDeleteResourceGroup}},
|
||||
\code{\link{AzureListAllRecources}},
|
||||
\code{\link{AzureListSubscriptions}}
|
||||
|
||||
Other Resources: \code{\link{AzureAuthenticate}},
|
||||
\code{\link{AzureCheckToken}},
|
||||
\code{\link{AzureCreateResourceGroup}},
|
||||
\code{\link{AzureDeleteResourceGroup}},
|
||||
\code{\link{AzureListAllRecources}},
|
||||
\code{\link{AzureListAllResources}},
|
||||
\code{\link{AzureListSubscriptions}}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,15 +22,11 @@ AzureListSA(AzureActiveContext, ResourceGroup, SubscriptionID, AzToken,
|
|||
List Storage accounts.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobFind}}, \code{\link{AzureBlobLS}},
|
||||
\code{\link{AzureCreateSAContainer}},
|
||||
Other Storage account: \code{\link{AzureCreateSAContainer}},
|
||||
\code{\link{AzureCreateStorageAccount}},
|
||||
\code{\link{AzureDeleteSAContainer}},
|
||||
\code{\link{AzureDeleteStorageAccount}},
|
||||
\code{\link{AzureGetBlob}},
|
||||
\code{\link{AzureListSABlobs}},
|
||||
\code{\link{AzureListSAContainers}},
|
||||
\code{\link{AzurePutBlob}}, \code{\link{AzureSAGetKey}}
|
||||
\code{\link{AzureSAGetKey}}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,15 +28,8 @@ AzureListSABlobs(AzureActiveContext, StorageAccount, StorageKey, Container,
|
|||
List Storage Containers for Specified Storage Account.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobCD}},
|
||||
Other Blob store functions: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobFind}}, \code{\link{AzureBlobLS}},
|
||||
\code{\link{AzureCreateSAContainer}},
|
||||
\code{\link{AzureCreateStorageAccount}},
|
||||
\code{\link{AzureDeleteSAContainer}},
|
||||
\code{\link{AzureDeleteStorageAccount}},
|
||||
\code{\link{AzureGetBlob}},
|
||||
\code{\link{AzureListSAContainers}},
|
||||
\code{\link{AzureListSA}}, \code{\link{AzurePutBlob}},
|
||||
\code{\link{AzureSAGetKey}}
|
||||
\code{\link{AzureGetBlob}}, \code{\link{AzurePutBlob}}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,15 +26,10 @@ AzureListSAContainers(AzureActiveContext, StorageAccount, StorageKey,
|
|||
List Storage Containers for Specified Storage Account.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobFind}}, \code{\link{AzureBlobLS}},
|
||||
\code{\link{AzureCreateSAContainer}},
|
||||
Other Storage account: \code{\link{AzureCreateSAContainer}},
|
||||
\code{\link{AzureCreateStorageAccount}},
|
||||
\code{\link{AzureDeleteSAContainer}},
|
||||
\code{\link{AzureDeleteStorageAccount}},
|
||||
\code{\link{AzureGetBlob}},
|
||||
\code{\link{AzureListSABlobs}},
|
||||
\code{\link{AzureListSA}}, \code{\link{AzurePutBlob}},
|
||||
\code{\link{AzureSAGetKey}}
|
||||
\code{\link{AzureListSA}}, \code{\link{AzureSAGetKey}}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
\alias{AzureListSubscriptions}
|
||||
\title{Get available Subscriptions.}
|
||||
\usage{
|
||||
AzureListSubscriptions(AzureActiveContext, ATI, verbose = FALSE)
|
||||
AzureListSubscriptions(AzureActiveContext, AzToken, verbose = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
||||
\item{AzToken}{Token Object}
|
||||
|
||||
\item{verbose}{Print Tracing information (Default False)}
|
||||
}
|
||||
\value{
|
||||
|
@ -18,11 +20,9 @@ Returns Dataframe of SubscriptionID sets AzureContext SubscriptionID
|
|||
Get available Subscriptions.
|
||||
}
|
||||
\seealso{
|
||||
Other Resources: \code{\link{AzureAuthenticate}},
|
||||
\code{\link{AzureCheckToken}},
|
||||
\code{\link{AzureCreateResourceGroup}},
|
||||
Other Resource group functions: \code{\link{AzureCreateResourceGroup}},
|
||||
\code{\link{AzureDeleteResourceGroup}},
|
||||
\code{\link{AzureListAllRecources}},
|
||||
\code{\link{AzureListAllResources}},
|
||||
\code{\link{AzureListRG}}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,12 @@ AzurePutBlob(AzureActiveContext, Blob, Contents = "", File = "", Directory,
|
|||
|
||||
\item{Blob}{Blob Object}
|
||||
|
||||
\item{Contents}{- Object to Store or Value}
|
||||
|
||||
\item{File}{- Local FileName to Store in Azure Blob}
|
||||
|
||||
\item{Directory}{Set Directory to list}
|
||||
|
||||
\item{StorageAccount}{StorageAccount Object}
|
||||
|
||||
\item{StorageKey}{StorageKey Object}
|
||||
|
@ -31,15 +37,9 @@ AzurePutBlob(AzureActiveContext, Blob, Contents = "", File = "", Directory,
|
|||
Write contents to a specifed Storage Blob.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobCD}},
|
||||
Other Blob store functions: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobFind}}, \code{\link{AzureBlobLS}},
|
||||
\code{\link{AzureCreateSAContainer}},
|
||||
\code{\link{AzureCreateStorageAccount}},
|
||||
\code{\link{AzureDeleteSAContainer}},
|
||||
\code{\link{AzureDeleteStorageAccount}},
|
||||
\code{\link{AzureGetBlob}},
|
||||
\code{\link{AzureListSABlobs}},
|
||||
\code{\link{AzureListSAContainers}},
|
||||
\code{\link{AzureListSA}}, \code{\link{AzureSAGetKey}}
|
||||
\code{\link{AzureListSABlobs}}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
% Please edit documentation in R/AzureHDI.R
|
||||
\name{AzureResizeHDI}
|
||||
\alias{AzureResizeHDI}
|
||||
\title{Resize a HDInsight CLuster Role.}
|
||||
\title{Resize a HDInsight Cluster Role.}
|
||||
\usage{
|
||||
AzureResizeHDI(AzureActiveContext, ClusterName, Role = "worker", Size = 2,
|
||||
Mode = "Sync", AzToken, SubscriptionID, ResourceGroup, verbose = FALSE)
|
||||
|
@ -27,10 +27,10 @@ AzureResizeHDI(AzureActiveContext, ClusterName, Role = "worker", Size = 2,
|
|||
\item{verbose}{Print Tracing information (Default False)}
|
||||
}
|
||||
\description{
|
||||
Resize a HDInsight CLuster Role.
|
||||
Resize a HDInsight Cluster Role.
|
||||
}
|
||||
\seealso{
|
||||
Other HDInsight: \code{\link{AzureCreateHDI}},
|
||||
Other HDInsight functions: \code{\link{AzureCreateHDI}},
|
||||
\code{\link{AzureDeleteHDI}}, \code{\link{AzureHDIConf}},
|
||||
\code{\link{AzureListHDI}},
|
||||
\code{\link{AzureRunScriptAction}},
|
||||
|
|
|
@ -40,7 +40,7 @@ Returns Success Message
|
|||
Run Script Action on HDI Cluster.
|
||||
}
|
||||
\seealso{
|
||||
Other HDInsight: \code{\link{AzureCreateHDI}},
|
||||
Other HDInsight functions: \code{\link{AzureCreateHDI}},
|
||||
\code{\link{AzureDeleteHDI}}, \code{\link{AzureHDIConf}},
|
||||
\code{\link{AzureListHDI}}, \code{\link{AzureResizeHDI}},
|
||||
\code{\link{AzureScriptActionHistory}}
|
||||
|
|
|
@ -24,15 +24,11 @@ AzureSAGetKey(AzureActiveContext, StorageAccount, AzToken, ResourceGroup,
|
|||
Get the Storage Keys for Specified Storage Account.
|
||||
}
|
||||
\seealso{
|
||||
Other Storage account: \code{\link{AzureBlobCD}},
|
||||
\code{\link{AzureBlobFind}}, \code{\link{AzureBlobLS}},
|
||||
\code{\link{AzureCreateSAContainer}},
|
||||
Other Storage account: \code{\link{AzureCreateSAContainer}},
|
||||
\code{\link{AzureCreateStorageAccount}},
|
||||
\code{\link{AzureDeleteSAContainer}},
|
||||
\code{\link{AzureDeleteStorageAccount}},
|
||||
\code{\link{AzureGetBlob}},
|
||||
\code{\link{AzureListSABlobs}},
|
||||
\code{\link{AzureListSAContainers}},
|
||||
\code{\link{AzureListSA}}, \code{\link{AzurePutBlob}}
|
||||
\code{\link{AzureListSA}}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
\title{Get all HDInsight Script Action History for a specified ClusterName.}
|
||||
\usage{
|
||||
AzureScriptActionHistory(AzureActiveContext, ResourceGroup, ClusterName = "*",
|
||||
SubscriptionID, ATI, Name, Type, verbose = FALSE)
|
||||
SubscriptionID, AzToken, Name, Type, verbose = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{AzureActiveContext}{Context Object}
|
||||
|
@ -16,7 +16,7 @@ AzureScriptActionHistory(AzureActiveContext, ResourceGroup, ClusterName = "*",
|
|||
|
||||
\item{SubscriptionID}{SubscriptionID Object}
|
||||
|
||||
\item{ATI}{ATI}
|
||||
\item{AzToken}{Token Object}
|
||||
|
||||
\item{Name}{Name}
|
||||
|
||||
|
@ -31,7 +31,7 @@ Returns Dataframe of HDInsight Clusters
|
|||
Get all HDInsight Script Action History for a specified ClusterName.
|
||||
}
|
||||
\seealso{
|
||||
Other HDInsight: \code{\link{AzureCreateHDI}},
|
||||
Other HDInsight functions: \code{\link{AzureCreateHDI}},
|
||||
\code{\link{AzureDeleteHDI}}, \code{\link{AzureHDIConf}},
|
||||
\code{\link{AzureListHDI}}, \code{\link{AzureResizeHDI}},
|
||||
\code{\link{AzureRunScriptAction}}
|
||||
|
|
Загрузка…
Ссылка в новой задаче