Skip to main content

virtual_machine_instances

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

Overview

Namevirtual_machine_instances
TypeResource
Idazure_isv.connectedvmware.virtual_machine_instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}".
namestringThe name of the resource.
extendedLocationobjectGets or sets the extended location.
hardwareProfileobjectHardware properties.
infrastructureProfileobjectGets the infrastructure profile.
networkProfileobjectNetwork properties.
osProfileobjectOS properties.
placementProfileobjectPlacement properties.
powerStatestringGets the power state of the virtual machine.
provisioningStatestringGets the provisioning state. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", and "Created".
resourceUidstringGets or sets a unique identifier for the vm resource.
securityProfileobjectGets the security profile.
statusesarrayThe resource status information.
storageProfileobjectStorage properties.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_uriGets a virtual machine. Retrieves information about a virtual machine instance.
create_or_updateinsertresource_uriImplements 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.
updateupdateresource_uriUpdates a virtual machine. The operation to update a virtual machine instance.
create_or_updatereplaceresource_uriImplements 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.
deletedeleteresource_urideleteFromHost, forceDeletes an virtual machine. The operation to delete a virtual machine instance.
stopexecresource_uriImplements the operation to stop a virtual machine. The operation to power off (stop) a virtual machine instance.
startexecresource_uriImplements the operation to start a virtual machine. The operation to start a virtual machine instance.
restartexecresource_uriImplements the operation to restart a virtual machine. The operation to restart a virtual machine instance.
list_rawexecresource_uriImplements 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.

NameDatatypeDescription
resource_uristringThe fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended. Required.
deleteFromHostbooleanWhether to delete the VM from the vCenter. Default value is None.
forcebooleanWhether force delete was specified. Default value is None.

SELECT examples

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

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
;

UPDATE examples

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

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

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

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 }}
}'
;