зеркало из https://github.com/Azure/AzureDSVM.git
Helper function to check existance of a resource group at location.
This commit is contained in:
Родитель
e8d0ab0452
Коммит
17075f543e
|
@ -0,0 +1,20 @@
|
|||
#' @title Check if a resource group exists.
|
||||
#'
|
||||
#' @param context Authentication context of AzureSMR encapsulating the
|
||||
#' TID, CID, and key obtained from Azure Actrive Directory.
|
||||
#' @param resource.group The Azure resource group where the DSVM is
|
||||
#' created.
|
||||
#' @param location Location of the data centre to host the DSVM.
|
||||
#' @export
|
||||
existsRG <- function(context, resource.group, location, verbose=TRUE)
|
||||
{
|
||||
context %>%
|
||||
azureListRG() %>%
|
||||
filter(name == RG) %>%
|
||||
select(name, location) %T>%
|
||||
{if (verbose) print(.)} %>%
|
||||
nrow() %>%
|
||||
equals(0) %>%
|
||||
not() %T>%
|
||||
{if (verbose) print(.)}
|
||||
}
|
Загрузка…
Ссылка в новой задаче