az_vmss_template {AzureVM}R Documentation

Virtual machine scaleset (cluster) template class


Class representing a virtual machine scaleset deployment template. This class keeps track of all resources that are created as part of deploying a scaleset, and exposes methods for managing them.


An R6 object of class az_vmss_template, inheriting from AzureRMR::az_template.


A virtual machine scaleset in Azure is actually a collection of resources, including any and all of the following.

By wrapping the deployment template used to create these resources, the az_vmss_template class allows managing them all as a single entity.


The following fields are exposed, in addition to those provided by the AzureRMR::az_template class.


The following methods are available, in addition to those provided by the AzureRMR::az_template class.

Many of these methods are actually provided by the az_vmss_resource class, and propagated to the template as active bindings.

Instance operations

AzureVM has the ability to parallelise scaleset instance operations using a background process pool provided by AzureRMR. This can lead to significant speedups when working with scalesets with high instance counts. The pool is created automatically the first time that it is required, and remains persistent for the session. You can control the size of the process pool with the azure_vm_minpoolsize and azure_vm_maxpoolsize options, which have default values 2 and 10 respectively.

The id argument lets you specify a subset of instances on which to carry out an operation. This can be a character vector of instance IDs; a list of instance objects such as returned by list_instances; or a single instance object. The default (NULL) is to carry out the operation on all instances.

See Also

AzureRMR::az_template, create_vm_scaleset, get_vm_scaleset, delete_vm_scaleset, AzureRMR::init_pool

VM scaleset API reference


## Not run: 

sub <- AzureRMR::get_azure_login()$

vmss <- sub$get_vm_scaleset("myscaleset")


vmss$get_public_ip_address()  # NA if the scaleset doesn't have a load balancer

vmss$get_vm_public_ip_addresses()  # NA if scaleset nodes are not publicly visible

instances <- vmss$list_instances()
first <- instances[1]
vmss$run_script("echo hello world! > /tmp/hello.txt", id=first)


## End(Not run)

[Package AzureVM version 2.2.2 Index]