Skip to main content

virtual_machine_instances

Creates, updates, deletes, gets or lists a virtual_machine_instances resource.

Overview

Namevirtual_machine_instances
TypeResource
Idazure_stack.azure_stack_hci_vm.virtual_machine_instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
createFromLocalbooleanBoolean indicating whether this is an existing local virtual machine or if one should be created.
extendedLocationobjectThe extendedLocation of the resource.
guestAgentInstallStatusobjectGuest agent install status.
hardwareProfileobjectHardwareProfile - Specifies the hardware settings for the virtual machine instance.
hostNodeIpAddressstringName of the host node that the VM is on.
hostNodeNamestringName of the host node that the VM is on.
httpProxyConfigobjectHTTP Proxy configuration for the VM.
hyperVVmIdstringUnique identifier for the Hyper-V VM resource.
identityobjectThe managed service identities assigned to this resource.
instanceViewobjectThe virtual machine instance view.
networkProfileobjectNetworkProfile - describes the network configuration the virtual machine instance.
osProfileobjectOsProfile - describes the configuration of the operating system and sets login data.
placementProfileobjectPlacementProfile - Specifies the placement related settings for the virtual machine.
provisioningStatestringProvisioning state of the virtual machine instance. Known values are: "Succeeded", "Failed", "InProgress", "Accepted", "Deleting", and "Canceled". (Succeeded, Failed, InProgress, Accepted, Deleting, Canceled)
resourceUidstringUnique identifier defined by ARC to identify the guest of the VM.
securityProfileobjectSecurityProfile - Specifies the security settings for the virtual machine instance.
statusobjectThe observed state of virtual machine instances.
storageProfileobjectStorageProfile - contains information about the disks and storage information for the virtual machine instance.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
vmIdstringUnique identifier for the vm resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_uriGets a virtual machine instance.
create_or_updateinsertresource_uriThe operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation.
updateupdateresource_uriThe operation to update a virtual machine instance.
create_or_updatereplaceresource_uriThe operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation.
deletedeleteresource_uriThe operation to delete a virtual machine instance.
startexecresource_uriThe operation to start a virtual machine instance.
stopexecresource_uriThe operation to stop a virtual machine instance.
restartexecresource_uriThe operation to restart a virtual machine instance.
pauseexecresource_uriThe operation to pause a virtual machine instance.
saveexecresource_uriThe operation to save a virtual machine instance.
list_rawexecresource_uriLists all of the virtual machine instances within the specified parent resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resource_uristringThe fully qualified Azure Resource manager identifier of the resource. Required.

SELECT examples

Gets a virtual machine instance.

SELECT
id,
name,
createFromLocal,
extendedLocation,
guestAgentInstallStatus,
hardwareProfile,
hostNodeIpAddress,
hostNodeName,
httpProxyConfig,
hyperVVmId,
identity,
instanceView,
networkProfile,
osProfile,
placementProfile,
provisioningState,
resourceUid,
securityProfile,
status,
storageProfile,
systemData,
type,
vmId
FROM azure_stack.azure_stack_hci_vm.virtual_machine_instances
WHERE resource_uri = '{{ resource_uri }}' -- required
;

INSERT examples

The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation.

INSERT INTO azure_stack.azure_stack_hci_vm.virtual_machine_instances (
properties,
extendedLocation,
identity,
resource_uri
)
SELECT
'{{ properties }}',
'{{ extendedLocation }}',
'{{ identity }}',
'{{ resource_uri }}'
RETURNING
id,
name,
extendedLocation,
identity,
properties,
systemData,
type
;

UPDATE examples

The operation to update a virtual machine instance.

UPDATE azure_stack.azure_stack_hci_vm.virtual_machine_instances
SET
properties = '{{ properties }}',
identity = '{{ identity }}'
WHERE
resource_uri = '{{ resource_uri }}' --required
RETURNING
id,
name,
extendedLocation,
identity,
properties,
systemData,
type;

REPLACE examples

The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation.

REPLACE azure_stack.azure_stack_hci_vm.virtual_machine_instances
SET
properties = '{{ properties }}',
extendedLocation = '{{ extendedLocation }}',
identity = '{{ identity }}'
WHERE
resource_uri = '{{ resource_uri }}' --required
RETURNING
id,
name,
extendedLocation,
identity,
properties,
systemData,
type;

DELETE examples

The operation to delete a virtual machine instance.

DELETE FROM azure_stack.azure_stack_hci_vm.virtual_machine_instances
WHERE resource_uri = '{{ resource_uri }}' --required
;

Lifecycle Methods

The operation to start a virtual machine instance.

EXEC azure_stack.azure_stack_hci_vm.virtual_machine_instances.start 
@resource_uri='{{ resource_uri }}' --required
;