az_template {AzureRMR}R Documentation

Azure template class

Description

Class representing an Azure deployment template.

Format

An R6 object of class az_template.

Methods

Initialization

Initializing a new object of this class can either retrieve an existing template, or deploy a new template on the host. Generally, the easiest way to create a template object is via the get_template, deploy_template or list_templates methods of the az_resource_group class, which handle the details automatically.

To initialize an object that refers to an existing deployment, supply the following arguments to new():

If you also supply the following arguments to new(), a new template will be deployed:

You can use the build_template_definition and build_template_parameters helper functions to construct the inputs for deploying a template. These can take as inputs R lists, JSON text strings, or file connections, and can also be extended by other packages.

See Also

az_resource_group, az_resource, build_template_definition, build_template_parameters Template overview, Template API reference

Examples

## Not run: 

# recommended way to deploy a template: via a resource group object

tpl <- resgroup$deploy_template("mydeployment",
    template="template.json",
    parameters="parameters.json")

# retrieve list of created resource objects
tpl$list_resources()

# delete template (will not touch resources)
tpl$delete()

# delete template and free resources
tpl$delete(free_resources=TRUE)


## End(Not run)

[Package AzureRMR version 2.4.4 Index]