virtual_machine_instances
Creates, updates, deletes, gets or lists a virtual_machine_instances resource.
Overview
| Name | virtual_machine_instances |
| Type | Resource |
| Id | azure_isv.connectedvmware.virtual_machine_instances |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". |
name | string | The name of the resource. |
extendedLocation | object | Gets or sets the extended location. |
hardwareProfile | object | Hardware properties. |
infrastructureProfile | object | Gets the infrastructure profile. |
networkProfile | object | Network properties. |
osProfile | object | OS properties. |
placementProfile | object | Placement properties. |
powerState | string | Gets the power state of the virtual machine. |
provisioningState | string | Gets the provisioning state. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", and "Created". |
resourceUid | string | Gets or sets a unique identifier for the vm resource. |
securityProfile | object | Gets the security profile. |
statuses | array | The resource status information. |
storageProfile | object | Storage properties. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_uri | Gets a virtual machine. Retrieves information about a virtual machine instance. | |
create_or_update | insert | resource_uri | Implements virtual machine PUT method. The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. | |
update | update | resource_uri | Updates a virtual machine. The operation to update a virtual machine instance. | |
create_or_update | replace | resource_uri | Implements virtual machine PUT method. The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. | |
delete | delete | resource_uri | deleteFromHost, force | Deletes an virtual machine. The operation to delete a virtual machine instance. |
stop | exec | resource_uri | Implements the operation to stop a virtual machine. The operation to power off (stop) a virtual machine instance. | |
start | exec | resource_uri | Implements the operation to start a virtual machine. The operation to start a virtual machine instance. | |
restart | exec | resource_uri | Implements the operation to restart a virtual machine. The operation to restart a virtual machine instance. | |
list_raw | exec | resource_uri | Implements List virtual machine instances. Lists 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.
| Name | Datatype | Description |
|---|---|---|
resource_uri | string | The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended. Required. |
deleteFromHost | boolean | Whether to delete the VM from the vCenter. Default value is None. |
force | boolean | Whether force delete was specified. Default value is None. |
SELECT examples
- get
Gets a virtual machine. Retrieves information about a virtual machine instance.
SELECT
id,
name,
extendedLocation,
hardwareProfile,
infrastructureProfile,
networkProfile,
osProfile,
placementProfile,
powerState,
provisioningState,
resourceUid,
securityProfile,
statuses,
storageProfile,
systemData,
type
FROM azure_isv.connectedvmware.virtual_machine_instances
WHERE resource_uri = '{{ resource_uri }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Implements virtual machine PUT method. 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_isv.connectedvmware.virtual_machine_instances (
extendedLocation,
properties,
resource_uri
)
SELECT
'{{ extendedLocation }}',
'{{ properties }}',
'{{ resource_uri }}'
RETURNING
id,
name,
extendedLocation,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: virtual_machine_instances
props:
- name: resource_uri
value: "{{ resource_uri }}"
description: Required parameter for the virtual_machine_instances resource.
- name: extendedLocation
description: |
Gets or sets the extended location.
value:
type: "{{ type }}"
name: "{{ name }}"
- name: properties
value:
placementProfile:
resourcePoolId: "{{ resourcePoolId }}"
clusterId: "{{ clusterId }}"
hostId: "{{ hostId }}"
datastoreId: "{{ datastoreId }}"
osProfile:
computerName: "{{ computerName }}"
adminUsername: "{{ adminUsername }}"
adminPassword: "{{ adminPassword }}"
guestId: "{{ guestId }}"
osType: "{{ osType }}"
osSku: "{{ osSku }}"
toolsRunningStatus: "{{ toolsRunningStatus }}"
toolsVersionStatus: "{{ toolsVersionStatus }}"
toolsVersion: "{{ toolsVersion }}"
hardwareProfile:
memorySizeMB: {{ memorySizeMB }}
numCPUs: {{ numCPUs }}
numCoresPerSocket: {{ numCoresPerSocket }}
cpuHotAddEnabled: {{ cpuHotAddEnabled }}
cpuHotRemoveEnabled: {{ cpuHotRemoveEnabled }}
memoryHotAddEnabled: {{ memoryHotAddEnabled }}
networkProfile:
networkInterfaces:
- name: "{{ name }}"
label: "{{ label }}"
ipAddresses: "{{ ipAddresses }}"
macAddress: "{{ macAddress }}"
networkId: "{{ networkId }}"
nicType: "{{ nicType }}"
powerOnBoot: "{{ powerOnBoot }}"
networkMoRefId: "{{ networkMoRefId }}"
networkMoName: "{{ networkMoName }}"
deviceKey: {{ deviceKey }}
ipSettings:
allocationMethod: "{{ allocationMethod }}"
dnsServers:
- "{{ dnsServers }}"
gateway:
- "{{ gateway }}"
ipAddress: "{{ ipAddress }}"
subnetMask: "{{ subnetMask }}"
primaryWinsServer: "{{ primaryWinsServer }}"
secondaryWinsServer: "{{ secondaryWinsServer }}"
ipAddressInfo:
- allocationMethod: "{{ allocationMethod }}"
ipAddress: "{{ ipAddress }}"
subnetMask: "{{ subnetMask }}"
storageProfile:
disks:
- name: "{{ name }}"
label: "{{ label }}"
diskObjectId: "{{ diskObjectId }}"
diskSizeGB: {{ diskSizeGB }}
deviceKey: {{ deviceKey }}
diskMode: "{{ diskMode }}"
controllerKey: {{ controllerKey }}
unitNumber: {{ unitNumber }}
deviceName: "{{ deviceName }}"
diskType: "{{ diskType }}"
scsiControllers:
- type: "{{ type }}"
controllerKey: {{ controllerKey }}
busNumber: {{ busNumber }}
scsiCtlrUnitNumber: {{ scsiCtlrUnitNumber }}
sharing: "{{ sharing }}"
securityProfile:
uefiSettings:
secureBootEnabled: {{ secureBootEnabled }}
infrastructureProfile:
templateId: "{{ templateId }}"
vCenterId: "{{ vCenterId }}"
moRefId: "{{ moRefId }}"
inventoryItemId: "{{ inventoryItemId }}"
moName: "{{ moName }}"
folderPath: "{{ folderPath }}"
instanceUuid: "{{ instanceUuid }}"
smbiosUuid: "{{ smbiosUuid }}"
firmwareType: "{{ firmwareType }}"
customResourceName: "{{ customResourceName }}"
UPDATE examples
- update
Updates a virtual machine. The operation to update a virtual machine instance.
UPDATE azure_isv.connectedvmware.virtual_machine_instances
SET
properties = '{{ properties }}'
WHERE
resource_uri = '{{ resource_uri }}' --required
RETURNING
id,
name,
extendedLocation,
properties,
systemData,
type;
REPLACE examples
- create_or_update
Implements virtual machine PUT method. 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_isv.connectedvmware.virtual_machine_instances
SET
extendedLocation = '{{ extendedLocation }}',
properties = '{{ properties }}'
WHERE
resource_uri = '{{ resource_uri }}' --required
RETURNING
id,
name,
extendedLocation,
properties,
systemData,
type;
DELETE examples
- delete
Deletes an virtual machine. The operation to delete a virtual machine instance.
DELETE FROM azure_isv.connectedvmware.virtual_machine_instances
WHERE resource_uri = '{{ resource_uri }}' --required
AND deleteFromHost = '{{ deleteFromHost }}'
AND force = '{{ force }}'
;
Lifecycle Methods
- stop
- start
- restart
- list_raw
Implements the operation to stop a virtual machine. The operation to power off (stop) a virtual machine instance.
EXEC azure_isv.connectedvmware.virtual_machine_instances.stop
@resource_uri='{{ resource_uri }}' --required
@@json=
'{
"skipShutdown": {{ skipShutdown }}
}'
;
Implements the operation to start a virtual machine. The operation to start a virtual machine instance.
EXEC azure_isv.connectedvmware.virtual_machine_instances.start
@resource_uri='{{ resource_uri }}' --required
;
Implements the operation to restart a virtual machine. The operation to restart a virtual machine instance.
EXEC azure_isv.connectedvmware.virtual_machine_instances.restart
@resource_uri='{{ resource_uri }}' --required
;
Implements List virtual machine instances. Lists all of the virtual machine instances within the specified parent resource.
EXEC azure_isv.connectedvmware.virtual_machine_instances.list_raw
@resource_uri='{{ resource_uri }}' --required
;