virtual_machines
Creates, updates, deletes, gets or lists a virtual_machines
resource.
Overview
Name | virtual_machines |
Type | Resource |
Id | azure.nexus.virtual_machines |
Fields
- vw_virtual_machines
- virtual_machines
Name | Datatype | Description |
---|---|---|
admin_username | text | field from the properties object |
availability_zone | text | field from the properties object |
bare_metal_machine_id | text | field from the properties object |
boot_method | text | field from the properties object |
cloud_services_network_attachment | text | field from the properties object |
cluster_id | text | field from the properties object |
cpu_cores | text | field from the properties object |
detailed_status | text | field from the properties object |
detailed_status_message | text | field from the properties object |
extended_location | text | field from the properties object |
isolate_emulator_thread | text | field from the properties object |
location | text | The geo-location where the resource lives |
memory_size_gb | text | field from the properties object |
network_attachments | text | field from the properties object |
network_data | text | field from the properties object |
placement_hints | text | field from the properties object |
power_state | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
ssh_public_keys | text | field from the properties object |
storage_profile | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
user_data | text | field from the properties object |
virtio_interface | text | field from the properties object |
virtualMachineName | text | field from the properties object |
vm_device_model | text | field from the properties object |
vm_image | text | field from the properties object |
vm_image_repository_credentials | text | field from the properties object |
volumes | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
extendedLocation | object | |
location | string | The geo-location where the resource lives |
properties | object | |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, subscriptionId, virtualMachineName | Get properties of the provided virtual machine. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Get a list of virtual machines in the provided resource group. |
list_by_subscription | SELECT | subscriptionId | Get a list of virtual machines in the provided subscription. |
create_or_update | INSERT | resourceGroupName, subscriptionId, virtualMachineName, data__extendedLocation, data__properties | Create a new virtual machine or update the properties of the existing virtual machine. |
delete | DELETE | resourceGroupName, subscriptionId, virtualMachineName | Delete the provided virtual machine. |
update | UPDATE | resourceGroupName, subscriptionId, virtualMachineName | Patch the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. |
power_off | EXEC | resourceGroupName, subscriptionId, virtualMachineName | Power off the provided virtual machine. |
reimage | EXEC | resourceGroupName, subscriptionId, virtualMachineName | Reimage the provided virtual machine. |
restart | EXEC | resourceGroupName, subscriptionId, virtualMachineName | Restart the provided virtual machine. |
start | EXEC | resourceGroupName, subscriptionId, virtualMachineName | Start the provided virtual machine. |
SELECT
examples
Get a list of virtual machines in the provided subscription.
- vw_virtual_machines
- virtual_machines
SELECT
admin_username,
availability_zone,
bare_metal_machine_id,
boot_method,
cloud_services_network_attachment,
cluster_id,
cpu_cores,
detailed_status,
detailed_status_message,
extended_location,
isolate_emulator_thread,
location,
memory_size_gb,
network_attachments,
network_data,
placement_hints,
power_state,
provisioning_state,
resourceGroupName,
ssh_public_keys,
storage_profile,
subscriptionId,
tags,
user_data,
virtio_interface,
virtualMachineName,
vm_device_model,
vm_image,
vm_image_repository_credentials,
volumes
FROM azure.nexus.vw_virtual_machines
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
extendedLocation,
location,
properties,
tags
FROM azure.nexus.virtual_machines
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new virtual_machines
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.nexus.virtual_machines (
resourceGroupName,
subscriptionId,
virtualMachineName,
data__extendedLocation,
data__properties,
extendedLocation,
properties,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ virtualMachineName }}',
'{{ data__extendedLocation }}',
'{{ data__properties }}',
'{{ extendedLocation }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;
- name: your_resource_model_name
props:
- name: extendedLocation
value:
- name: name
value: string
- name: type
value: string
- name: properties
value:
- name: adminUsername
value: string
- name: availabilityZone
value: string
- name: bareMetalMachineId
value: string
- name: bootMethod
value: string
- name: cloudServicesNetworkAttachment
value:
- name: attachedNetworkId
value: string
- name: defaultGateway
value: string
- name: ipAllocationMethod
value: string
- name: ipv4Address
value: string
- name: ipv6Address
value: string
- name: macAddress
value: string
- name: networkAttachmentName
value: string
- name: clusterId
value: string
- name: cpuCores
value: integer
- name: detailedStatus
value: string
- name: detailedStatusMessage
value: string
- name: isolateEmulatorThread
value: string
- name: memorySizeGB
value: integer
- name: networkAttachments
value:
- - name: attachedNetworkId
value: string
- name: defaultGateway
value: string
- name: ipAllocationMethod
value: string
- name: ipv4Address
value: string
- name: ipv6Address
value: string
- name: macAddress
value: string
- name: networkAttachmentName
value: string
- name: networkData
value: string
- name: placementHints
value:
- - name: hintType
value: string
- name: resourceId
value: string
- name: schedulingExecution
value: string
- name: scope
value: string
- name: powerState
value: string
- name: provisioningState
value: string
- name: sshPublicKeys
value:
- - name: keyData
value: string
- name: storageProfile
value:
- name: osDisk
value:
- name: createOption
value: string
- name: deleteOption
value: string
- name: diskSizeGB
value: integer
- name: volumeAttachments
value:
- string
- name: userData
value: string
- name: virtioInterface
value: string
- name: vmDeviceModel
value: string
- name: vmImage
value: string
- name: vmImageRepositoryCredentials
value:
- name: password
value: string
- name: registryUrl
value: string
- name: username
value: string
- name: volumes
value:
- string
- name: tags
value: object
- name: location
value: string
UPDATE
example
Updates a virtual_machines
resource.
/*+ update */
UPDATE azure.nexus.virtual_machines
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualMachineName = '{{ virtualMachineName }}';
DELETE
example
Deletes the specified virtual_machines
resource.
/*+ delete */
DELETE FROM azure.nexus.virtual_machines
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualMachineName = '{{ virtualMachineName }}';