This commit is contained in:
Hong Ooi 2020-10-14 00:56:22 +11:00
Родитель 59956e6fa8
Коммит 68c2115041
4 изменённых файлов: 10 добавлений и 11 удалений

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

@ -1,6 +1,6 @@
Package: AzureRMR
Title: Interface to 'Azure Resource Manager'
Version: 2.3.5.9000
Version: 2.3.6
Authors@R: c(
person("Hong", "Ooi", , "hongooi73@gmail.com", role = c("aut", "cre")),
person("Microsoft", role="cph")

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

@ -1,4 +1,4 @@
# AzureRMR 2.3.5.9000
# AzureRMR 2.3.6
- Add ability to specify user-defined functions in `build_template_definition`. Also allow changing the schema, content version and api profile.
- Change maintainer email address.

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

@ -6,7 +6,7 @@
#' @param functions User-defined functions used by the template.
#' @param resources List of resources that the template should deploy.
#' @param outputs The template outputs.
#' @param schema,content_version,api_profile Less common arguments that can be used to customise the template. See the guide to template syntax on Microsoft Docs, linked below.
#' @param schema,version,api_profile Less commonly used arguments that can be used to customise the template. See the guide to template syntax on Microsoft Docs, linked below.
#'
#' @details
#' `build_template_definition` is used to generate a template from its components. The main arguments are `parameters`, `variables`, `functions`, `resources` and `outputs`. Each of these can be specified in various ways:
@ -143,8 +143,8 @@ build_template_definition <- function(...)
#' @export
build_template_definition.default <- function(
parameters=named_list(), variables=named_list(), functions=list(), resources=list(), outputs=named_list(),
schema="https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
content_version="1.0.0.0",
schema="2019-04-01",
version="1.0.0.0",
api_profile=NULL,
...)
{
@ -154,8 +154,8 @@ build_template_definition.default <- function(
parts <- lapply(
list(
`$schema`=schema,
contentVersion=content_version,
`$schema`=paste0("https://schema.management.azure.com/schemas/", schema, "/deploymentTemplate.json#"),
contentVersion=version,
apiProfile=api_profile,
parameters=parameters,
variables=variables,

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

@ -12,9 +12,8 @@ build_template_definition(...)
\method{build_template_definition}{default}(parameters = named_list(),
variables = named_list(), functions = list(), resources = list(),
outputs = named_list(),
schema = "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
content_version = "1.0.0.0", api_profile = NULL, ...)
outputs = named_list(), schema = "2019-04-01", version = "1.0.0.0",
api_profile = NULL, ...)
build_template_parameters(...)
@ -33,7 +32,7 @@ build_template_parameters(...)
\item{outputs}{The template outputs.}
\item{schema, content_version, api_profile}{Less common arguments that can be used to customise the template. See the guide to template syntax on Microsoft Docs, linked below.}
\item{schema, version, api_profile}{Less commonly used arguments that can be used to customise the template. See the guide to template syntax on Microsoft Docs, linked below.}
}
\value{
The JSON text for the template definition and its parameters.