Learn R Programming

AzureVM (version 2.2.2)

delete_vm: Delete virtual machine

Description

Method for the AzureRMR::az_subscription and AzureRMR::az_resource_group classes.

Usage

## R6 method for class 'az_resource_group'
delete_vm(name, confirm = TRUE, free_resources = TRUE)

## R6 method for class 'az_subscription' delete_vm(name, confirm = TRUE, free_resources = TRUE, resource_group = name)

## R6 method for class 'az_resource_group' delete_vm_scaleset(name, confirm = TRUE, free_resources = TRUE)

## R6 method for class 'az_subscription' delete_vm_scaleset(name, confirm = TRUE, free_resources = TRUE, resource_group = name)

Arguments

  • name: The name of the VM or scaleset.

  • confirm: Whether to confirm the delete.

  • free_resources: If this was a deployed template, whether to free all resources created during the deployment process.

  • resource_group: For the AzureRMR::az_subscription method, the resource group containing the VM or scaleset.

Details

For the subscription methods, deleting the VM or scaleset will also delete its resource group.

See Also

create_vm, az_vm_template, az_vm_resource, AzureRMR::az_subscription, AzureRMR::az_resource_group

Examples

Run this code
# NOT RUN {
sub <- AzureRMR::get_azure_login()$
    get_subscription("subscription_id")

sub$delete_vm("myvm")
sub$delete_vm_scaleset("myscaleset")

# }

Run the code above in your browser using DataLab