Skip to main content

virtual_machine_templates

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

Overview

Namevirtual_machine_templates
TypeResource
Idazure.system_center_vm_manager.virtual_machine_templates

Fields

NameDatatypeDescription
computer_nametextfield from the properties object
cpu_counttextfield from the properties object
diskstextfield from the properties object
dynamic_memory_enabledtextfield from the properties object
dynamic_memory_max_mbtextfield from the properties object
dynamic_memory_min_mbtextfield from the properties object
extended_locationtextfield from the properties object
generationtextfield from the properties object
inventory_item_idtextfield from the properties object
is_customizabletextfield from the properties object
is_highly_availabletextfield from the properties object
limit_cpu_for_migrationtextfield from the properties object
locationtextThe geo-location where the resource lives
memory_mbtextfield from the properties object
network_interfacestextfield from the properties object
os_nametextfield from the properties object
os_typetextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
uuidtextfield from the properties object
virtualMachineTemplateNametextfield from the properties object
vmm_server_idtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, virtualMachineTemplateNameImplements VirtualMachineTemplate GET method.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList of VirtualMachineTemplates in a resource group.
list_by_subscriptionSELECTsubscriptionIdList of VirtualMachineTemplates in a subscription.
create_or_updateINSERTresourceGroupName, subscriptionId, virtualMachineTemplateName, data__extendedLocationOnboards the ScVmm VM Template as an Azure VM Template resource.
deleteDELETEresourceGroupName, subscriptionId, virtualMachineTemplateNameDeregisters the ScVmm VM Template from Azure.
updateUPDATEresourceGroupName, subscriptionId, virtualMachineTemplateNameUpdates the VirtualMachineTemplate resource.

SELECT examples

List of VirtualMachineTemplates in a subscription.

SELECT
computer_name,
cpu_count,
disks,
dynamic_memory_enabled,
dynamic_memory_max_mb,
dynamic_memory_min_mb,
extended_location,
generation,
inventory_item_id,
is_customizable,
is_highly_available,
limit_cpu_for_migration,
location,
memory_mb,
network_interfaces,
os_name,
os_type,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
uuid,
virtualMachineTemplateName,
vmm_server_id
FROM azure.system_center_vm_manager.vw_virtual_machine_templates
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.system_center_vm_manager.virtual_machine_templates (
resourceGroupName,
subscriptionId,
virtualMachineTemplateName,
data__extendedLocation,
properties,
extendedLocation,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ virtualMachineTemplateName }}',
'{{ data__extendedLocation }}',
'{{ properties }}',
'{{ extendedLocation }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a virtual_machine_templates resource.

/*+ update */
UPDATE azure.system_center_vm_manager.virtual_machine_templates
SET
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualMachineTemplateName = '{{ virtualMachineTemplateName }}';

DELETE example

Deletes the specified virtual_machine_templates resource.

/*+ delete */
DELETE FROM azure.system_center_vm_manager.virtual_machine_templates
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualMachineTemplateName = '{{ virtualMachineTemplateName }}';