Skip to main content

virtual_machines

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

Overview

Namevirtual_machines
TypeResource
Idazure_isv.vmware_cloud_simple.virtual_machines

Fields

NameDatatypeDescription
idtext/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/virtualMachines/{virtualMachineName}
nametext{virtualMachineName}
amount_of_ramtextfield from the properties object
controllerstextfield from the properties object
customizationtextfield from the properties object
diskstextfield from the properties object
dnsnametextfield from the properties object
expose_to_guest_vmtextfield from the properties object
foldertextfield from the properties object
guest_ostextfield from the properties object
guest_os_typetextfield from the properties object
locationtextAzure region
nicstextfield from the properties object
number_of_corestextfield from the properties object
passwordtextfield from the properties object
private_cloud_idtextfield from the properties object
provisioning_statetextfield from the properties object
public_iptextfield from the properties object
resourceGroupNametextfield from the properties object
resource_pooltextfield from the properties object
statustextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextTags model
template_idtextfield from the properties object
typetext{resourceProviderNamespace}/{resourceType}
usernametextfield from the properties object
v_sphere_networkstextfield from the properties object
virtualMachineNametextfield from the properties object
vm_idtextfield from the properties object
vmwaretoolstextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, virtualMachineNameGet virtual machine
list_by_resource_groupSELECTresourceGroupName, subscriptionIdReturns list of virtual machine within resource group
list_by_subscriptionSELECTsubscriptionIdReturns list virtual machine within subscription
create_or_updateINSERTReferer, resourceGroupName, subscriptionId, virtualMachineName, data__locationCreate Or Update Virtual Machine
deleteDELETEReferer, resourceGroupName, subscriptionId, virtualMachineNameDelete virtual machine
updateUPDATEresourceGroupName, subscriptionId, virtualMachineNamePatch virtual machine properties
startEXECReferer, resourceGroupName, subscriptionId, virtualMachineNamePower on virtual machine
stopEXECReferer, resourceGroupName, subscriptionId, virtualMachineNamePower off virtual machine, options: shutdown, poweroff, and suspend

SELECT examples

Returns list virtual machine within subscription

SELECT
id,
name,
amount_of_ram,
controllers,
customization,
disks,
dnsname,
expose_to_guest_vm,
folder,
guest_os,
guest_os_type,
location,
nics,
number_of_cores,
password,
private_cloud_id,
provisioning_state,
public_ip,
resourceGroupName,
resource_pool,
status,
subscriptionId,
tags,
template_id,
type,
username,
v_sphere_networks,
virtualMachineName,
vm_id,
vmwaretools
FROM azure_isv.vmware_cloud_simple.vw_virtual_machines
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new virtual_machines resource.

/*+ create */
INSERT INTO azure_isv.vmware_cloud_simple.virtual_machines (
Referer,
resourceGroupName,
subscriptionId,
virtualMachineName,
data__location,
location,
properties,
tags
)
SELECT
'{{ Referer }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ virtualMachineName }}',
'{{ data__location }}',
'{{ location }}',
'{{ properties }}',
'{{ tags }}'
;

UPDATE example

Updates a virtual_machines resource.

/*+ update */
UPDATE azure_isv.vmware_cloud_simple.virtual_machines
SET
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualMachineName = '{{ virtualMachineName }}';

DELETE example

Deletes the specified virtual_machines resource.

/*+ delete */
DELETE FROM azure_isv.vmware_cloud_simple.virtual_machines
WHERE Referer = '{{ Referer }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualMachineName = '{{ virtualMachineName }}';