| get_vm {AzureVM} | R Documentation |
Get existing virtual machine(s)
Description
Method for the AzureRMR::az_subscription and AzureRMR::az_resource_group classes.
Usage
## R6 method for class 'az_subscription' get_vm(name, resource_group = name) ## R6 method for class 'az_resource_group' get_vm(name) ## R6 method for class 'az_subscription' get_vm_scaleset(name, resource_group = name) ## R6 method for class 'az_resource_group' get_vm_scaleset(name) ## R6 method for class 'az_resource_group') get_vm_resource(name) get_vm_scaleset_resource(name)
Arguments
-
name: The name of the VM or scaleset. -
resource_group: For theaz_subscriptionmethods, the resource group in whichget_vm()andget_vm_scaleset()will look for the VM or scaleset. Defaults to the VM name.
Value
For get_vm(), an object representing the VM deployment. This will include other resources besides the VM itself, such as the network interface, virtual network, etc.
For get_vm_scaleset(), an object representing the scaleset deployment. Similarly to get_vm(), this includes other resources besides the scaleset.
For get_vm_resource() and get_vm_scaleset_resource(), the VM or scaleset resource itself.
See Also
az_vm_template, az_vm_resource, az_vmss_template, az_vmss_resource for the methods available for working with VMs and VM scalesets.
AzureRMR::az_subscription, AzureRMR::az_resource_group
Examples
## Not run:
sub <- AzureRMR::get_azure_login()$
get_subscription("subscription_id")
sub$get_vm("myvirtualmachine")
sub$get_vm_scaleset("myscaleset")
rg <- sub$get_resource_group("rgname")
rg$get_vm("myothervirtualmachine")
rg$get_vm_scaleset("myotherscaleset")
## End(Not run)