VirtualMachineResource Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A Class representing a VirtualMachine along with the instance operations that can be performed on it. If you have a ResourceIdentifier you can construct a VirtualMachineResource from an instance of ArmClient using the GetVirtualMachineResource method. Otherwise you can get one from its parent resource ResourceGroupResource using the GetVirtualMachine method.
public class VirtualMachineResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Compute.VirtualMachineData>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Compute.VirtualMachineData>
type VirtualMachineResource = class
inherit ArmResource
interface IJsonModel<VirtualMachineData>
interface IPersistableModel<VirtualMachineData>
Public Class VirtualMachineResource
Inherits ArmResource
Implements IJsonModel(Of VirtualMachineData), IPersistableModel(Of VirtualMachineData)
- Inheritance
- Implements
Virtual |
Initializes a new instance of the VirtualMachineResource class for mocking. |
Resource |
Gets the resource type for the operations. |
Client |
Gets the ArmClient this resource client was created from. (Inherited from ArmResource) |
Data |
Gets the data representing this Feature. |
Diagnostics |
Gets the diagnostic options for this resource client. (Inherited from ArmResource) |
Endpoint |
Gets the base uri for this resource client. (Inherited from ArmResource) |
Has |
Gets whether or not the current instance has data. |
Id |
Gets the resource identifier. (Inherited from ArmResource) |
Pipeline |
Gets the pipeline for this resource client. (Inherited from ArmResource) |
Add |
Add a tag to the current resource.
|
Add |
Add a tag to the current resource.
|
Assess |
Assess patches on the VM.
|
Assess |
Assess patches on the VM.
|
Attach |
Attach and detach data disks to/from the virtual machine.
|
Attach |
Attach and detach data disks to/from the virtual machine.
|
Can |
Checks to see if the TagResource API is deployed in the current environment. (Inherited from ArmResource) |
Can |
Checks to see if the TagResource API is deployed in the current environment. (Inherited from ArmResource) |
Capture(Wait |
Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
|
Capture |
Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
|
Convert |
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.
|
Convert |
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.
|
Create |
Generate the resource identifier of a VirtualMachineResource instance. |
Deallocate(Wait |
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.
|
Deallocate |
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.
|
Delete(Wait |
The operation to delete a virtual machine.
|
Delete |
The operation to delete a virtual machine.
|
Generalize(Cancellation |
Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to Create a managed image of a generalized VM in Azure. For Linux, please refer to How to create an image of a virtual machine or VHD.
|
Generalize |
Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to Create a managed image of a generalized VM in Azure. For Linux, please refer to How to create an image of a virtual machine or VHD.
|
Get(Nullable<Instance |
Retrieves information about the model view or the instance view of a virtual machine.
|
Get |
Retrieves information about the model view or the instance view of a virtual machine.
|
Get |
Lists all available geo-locations. (Inherited from ArmResource) |
Get |
Lists all available geo-locations. (Inherited from ArmResource) |
Get |
Lists all available virtual machine sizes to which the specified virtual machine can be resized.
|
Get |
Lists all available virtual machine sizes to which the specified virtual machine can be resized.
|
Get |
Get a management lock by scope.
|
Get |
Get a management lock by scope.
|
Get |
Gets a collection of ManagementLockResources in the ArmResource. (Inherited from ArmResource) |
Get |
This operation retrieves a single policy assignment, given its name and the scope it was created at.
|
Get |
This operation retrieves a single policy assignment, given its name and the scope it was created at.
|
Get |
Gets a collection of PolicyAssignmentResources in the ArmResource. (Inherited from ArmResource) |
Get |
Gets an object representing a TagResource along with the instance operations that can be performed on it in the ArmResource. (Inherited from ArmResource) |
Get |
The operation to get the extension.
|
Get |
The operation to get the extension.
|
Get |
Gets a collection of VirtualMachineExtensionResources in the VirtualMachine. |
Get |
The operation to get the run command.
|
Get |
The operation to get the run command.
|
Get |
Gets a collection of VirtualMachineRunCommandResources in the VirtualMachine. |
Install |
Installs patches on the VM.
|
Install |
Installs patches on the VM.
|
Instance |
Retrieves information about the run-time state of a virtual machine.
|
Instance |
Retrieves information about the run-time state of a virtual machine.
|
Perform |
The operation to perform maintenance on a virtual machine.
|
Perform |
The operation to perform maintenance on a virtual machine.
|
Power |
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
|
Power |
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
|
Power |
The operation to start a virtual machine.
|
Power |
The operation to start a virtual machine.
|
Reapply(Wait |
The operation to reapply a virtual machine's state.
|
Reapply |
The operation to reapply a virtual machine's state.
|
Redeploy(Wait |
Shuts down the virtual machine, moves it to a new node, and powers it back on.
|
Redeploy |
Shuts down the virtual machine, moves it to a new node, and powers it back on.
|
Reimage(Wait |
Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.
|
Reimage |
Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.
|
Remove |
Removes a tag by key from the resource.
|
Remove |
Removes a tag by key from the resource.
|
Restart(Wait |
The operation to restart a virtual machine.
|
Restart |
The operation to restart a virtual machine.
|
Retrieve |
The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
|
Retrieve |
The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
|
Run |
Run command on the VM.
|
Run |
Run command on the VM.
|
Set |
Replace the tags on the resource with the given set.
|
Set |
Replace the tags on the resource with the given set.
|
Simulate |
The operation to simulate the eviction of spot virtual machine.
|
Simulate |
The operation to simulate the eviction of spot virtual machine.
|
Try |
Gets the api version override if it has been set for the current client options. (Inherited from ArmResource) |
Update(Wait |
The operation to update a virtual machine.
|
Update |
The operation to update a virtual machine.
|
IJson |
Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model. |
IJson |
Writes the model to the provided Utf8JsonWriter. |
IPersistable |
Converts the provided BinaryData into a model. |
IPersistable |
Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service. |
IPersistable |
Writes the model into a BinaryData. |
Get |
Get role definition by name (GUID).
|
Get |
Get role definition by name (GUID).
|
Get |
Gets a collection of AuthorizationRoleDefinitionResources in the ArmResource. MockingTo mock this method, please mock GetAuthorizationRoleDefinitions() instead. |
Get |
Get the specified deny assignment.
|
Get |
Get the specified deny assignment.
|
Get |
Gets a collection of DenyAssignmentResources in the ArmResource. MockingTo mock this method, please mock GetDenyAssignments() instead. |
Get |
Get a role assignment by scope and name.
|
Get |
Get a role assignment by scope and name.
|
Get |
Gets a collection of RoleAssignmentResources in the ArmResource. MockingTo mock this method, please mock GetRoleAssignments() instead. |
Get |
Get the specified role assignment schedule for a resource scope
|
Get |
Get the specified role assignment schedule for a resource scope
|
Get |
Gets the specified role assignment schedule instance.
|
Get |
Gets the specified role assignment schedule instance.
|
Get |
Gets a collection of RoleAssignmentScheduleInstanceResources in the ArmResource. MockingTo mock this method, please mock GetRoleAssignmentScheduleInstances() instead. |
Get |
Get the specified role assignment schedule request.
|
Get |
Get the specified role assignment schedule request.
|
Get |
Gets a collection of RoleAssignmentScheduleRequestResources in the ArmResource. MockingTo mock this method, please mock GetRoleAssignmentScheduleRequests() instead. |
Get |
Gets a collection of RoleAssignmentScheduleResources in the ArmResource. MockingTo mock this method, please mock GetRoleAssignmentSchedules() instead. |
Get |
Get the specified role eligibility schedule for a resource scope
|
Get |
Get the specified role eligibility schedule for a resource scope
|
Get |
Gets the specified role eligibility schedule instance.
|
Get |
Gets the specified role eligibility schedule instance.
|
Get |
Gets a collection of RoleEligibilityScheduleInstanceResources in the ArmResource. MockingTo mock this method, please mock GetRoleEligibilityScheduleInstances() instead. |
Get |
Get the specified role eligibility schedule request.
|
Get |
Get the specified role eligibility schedule request.
|
Get |
Gets a collection of RoleEligibilityScheduleRequestResources in the ArmResource. MockingTo mock this method, please mock GetRoleEligibilityScheduleRequests() instead. |
Get |
Gets a collection of RoleEligibilityScheduleResources in the ArmResource. MockingTo mock this method, please mock GetRoleEligibilitySchedules() instead. |
Get |
Gets a collection of RoleManagementPolicyResources in the ArmResource. MockingTo mock this method, please mock GetRoleManagementPolicies() instead. |
Get |
Get the specified role management policy for a resource scope
|
Get |
Get the specified role management policy assignment for a resource scope
|
Get |
Get the specified role management policy assignment for a resource scope
|
Get |
Gets a collection of RoleManagementPolicyAssignmentResources in the ArmResource. MockingTo mock this method, please mock GetRoleManagementPolicyAssignments() instead. |
Get |
Get the specified role management policy for a resource scope
|
Get |
Gets an object representing a SystemAssignedIdentityResource along with the instance operations that can be performed on it in the ArmResource. MockingTo mock this method, please mock GetSystemAssignedIdentity() instead. |
Get |
Returns Linker resource for a given name.
|
Get |
Returns Linker resource for a given name.
|
Get |
Gets a collection of LinkerResources in the ArmResource. MockingTo mock this method, please mock GetLinkerResources() instead. |
Azure SDK for .NET feedback
Azure SDK for .NET is an open source project. Select a link to provide feedback: