az_vm_template {AzureVM}R Documentation

Virtual machine template class

Description

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

Format

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

Details

A single virtual machine 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_vm_template class allows managing them all as a single entity.

Fields

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

Methods

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_vm_resource class, and propagated to the template as active bindings.

See Also

AzureRMR::az_template, create_vm, get_vm, delete_vm

VM API reference

Examples

## Not run: 

sub <- AzureRMR::get_azure_login()$
    get_subscription("subscription_id")

vm <- sub$get_vm("myvm")

vm$identity

vm$start()
vm$get_private_ip_address()
vm$get_public_ip_address()

vm$run_script("echo hello world! > /tmp/hello.txt")

vm$stop()
vm$get_private_ip_address()
vm$get_public_ip_address()  # NA, assuming VM has a dynamic IP address

vm$resize("Standard_DS13_v2")
vm$sync_vm_status()


## End(Not run)

[Package AzureVM version 2.2.2 Index]