Skip to main content

virtual_machine_templates

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

Overview

Namevirtual_machine_templates
TypeResource
Idazure.scvmm.virtual_machine_templates

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}". # pylint: disable=line-too-long
namestringThe name of the resource.
computerNamestringGets computer name.
cpuCountintegerGets the desired number of vCPUs for the vm.
disksarrayGets the disks of the template.
dynamicMemoryEnabledstringGets a value indicating whether to enable dynamic memory or not. Known values are: "true" and "false".
dynamicMemoryMaxMBintegerGets the max dynamic memory for the vm.
dynamicMemoryMinMBintegerGets the min dynamic memory for the vm.
extendedLocationobjectThe extended location. Required.
generationintegerGets the generation for the vm.
inventoryItemIdstringGets or sets the inventory Item ID for the resource.
isCustomizablestringGets a value indicating whether the vm template is customizable or not. Known values are: "true" and "false".
isHighlyAvailablestringGets highly available property. Known values are: "true" and "false".
limitCpuForMigrationstringGets a value indicating whether to enable processor compatibility mode for live migration of VMs. Known values are: "true" and "false".
locationstringThe geo-location where the resource lives. Required.
memoryMBintegerMemoryMB is the desired size of a virtual machine's memory, in MB.
networkInterfacesarrayGets the network interfaces of the template.
osNamestringGets os name.
osTypestringGets the type of the os. Known values are: "Windows", "Linux", and "Other".
provisioningStatestringProvisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", and "Created".
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
uuidstringUnique ID of the virtual machine template.
vmmServerIdstringARM Id of the vmmServer resource in which this resource resides.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, virtual_machine_template_name, subscription_idGets a VirtualMachineTemplate. Implements VirtualMachineTemplate GET method.
list_by_resource_groupselectresource_group_name, subscription_idImplements GET VirtualMachineTemplates in a resource group. List of VirtualMachineTemplates in a resource group.
list_by_subscriptionselectsubscription_idImplements GET VirtualMachineTemplates in a subscription. List of VirtualMachineTemplates in a subscription.
create_or_updateinsertresource_group_name, virtual_machine_template_name, subscription_id, location, extendedLocationImplements VirtualMachineTemplates PUT method. Onboards the ScVmm VM Template as an Azure VM Template resource.
updateupdateresource_group_name, virtual_machine_template_name, subscription_idImplements the VirtualMachineTemplate PATCH method. Updates the VirtualMachineTemplate resource.
create_or_updatereplaceresource_group_name, virtual_machine_template_name, subscription_id, location, extendedLocationImplements VirtualMachineTemplates PUT method. Onboards the ScVmm VM Template as an Azure VM Template resource.
deletedeleteresource_group_name, virtual_machine_template_name, subscription_idforceImplements VirtualMachineTemplate DELETE method. Deregisters the ScVmm VM Template from Azure.

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_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
virtual_machine_template_namestringName of the VirtualMachineTemplate. Required.
forcestringForces the resource to be deleted. Known values are: "true" and "false". Default value is None.

SELECT examples

Gets a VirtualMachineTemplate. Implements VirtualMachineTemplate GET method.

SELECT
id,
name,
computerName,
cpuCount,
disks,
dynamicMemoryEnabled,
dynamicMemoryMaxMB,
dynamicMemoryMinMB,
extendedLocation,
generation,
inventoryItemId,
isCustomizable,
isHighlyAvailable,
limitCpuForMigration,
location,
memoryMB,
networkInterfaces,
osName,
osType,
provisioningState,
systemData,
tags,
type,
uuid,
vmmServerId
FROM azure.scvmm.virtual_machine_templates
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND virtual_machine_template_name = '{{ virtual_machine_template_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Implements VirtualMachineTemplates PUT method. Onboards the ScVmm VM Template as an Azure VM Template resource.

INSERT INTO azure.scvmm.virtual_machine_templates (
tags,
location,
properties,
extendedLocation,
resource_group_name,
virtual_machine_template_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ extendedLocation }}' /* required */,
'{{ resource_group_name }}',
'{{ virtual_machine_template_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Implements the VirtualMachineTemplate PATCH method. Updates the VirtualMachineTemplate resource.

UPDATE azure.scvmm.virtual_machine_templates
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND virtual_machine_template_name = '{{ virtual_machine_template_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Implements VirtualMachineTemplates PUT method. Onboards the ScVmm VM Template as an Azure VM Template resource.

REPLACE azure.scvmm.virtual_machine_templates
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
extendedLocation = '{{ extendedLocation }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND virtual_machine_template_name = '{{ virtual_machine_template_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND extendedLocation = '{{ extendedLocation }}' --required
RETURNING
id,
name,
extendedLocation,
location,
properties,
systemData,
tags,
type;

DELETE examples

Implements VirtualMachineTemplate DELETE method. Deregisters the ScVmm VM Template from Azure.

DELETE FROM azure.scvmm.virtual_machine_templates
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND virtual_machine_template_name = '{{ virtual_machine_template_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND force = '{{ force }}'
;