virtual_machine_templates
Creates, updates, deletes, gets or lists a virtual_machine_templates resource.
Overview
| Name | virtual_machine_templates |
| Type | Resource |
| Id | azure.scvmm.virtual_machine_templates |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list_by_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
computerName | string | Gets computer name. |
cpuCount | integer | Gets the desired number of vCPUs for the vm. |
disks | array | Gets the disks of the template. |
dynamicMemoryEnabled | string | Gets a value indicating whether to enable dynamic memory or not. Known values are: "true" and "false". |
dynamicMemoryMaxMB | integer | Gets the max dynamic memory for the vm. |
dynamicMemoryMinMB | integer | Gets the min dynamic memory for the vm. |
extendedLocation | object | The extended location. Required. |
generation | integer | Gets the generation for the vm. |
inventoryItemId | string | Gets or sets the inventory Item ID for the resource. |
isCustomizable | string | Gets a value indicating whether the vm template is customizable or not. Known values are: "true" and "false". |
isHighlyAvailable | string | Gets highly available property. Known values are: "true" and "false". |
limitCpuForMigration | string | Gets a value indicating whether to enable processor compatibility mode for live migration of VMs. Known values are: "true" and "false". |
location | string | The geo-location where the resource lives. Required. |
memoryMB | integer | MemoryMB is the desired size of a virtual machine's memory, in MB. |
networkInterfaces | array | Gets the network interfaces of the template. |
osName | string | Gets os name. |
osType | string | Gets the type of the os. Known values are: "Windows", "Linux", and "Other". |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", and "Created". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uuid | string | Unique ID of the virtual machine template. |
vmmServerId | string | ARM Id of the vmmServer resource in which this resource resides. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
computerName | string | Gets computer name. |
cpuCount | integer | Gets the desired number of vCPUs for the vm. |
disks | array | Gets the disks of the template. |
dynamicMemoryEnabled | string | Gets a value indicating whether to enable dynamic memory or not. Known values are: "true" and "false". |
dynamicMemoryMaxMB | integer | Gets the max dynamic memory for the vm. |
dynamicMemoryMinMB | integer | Gets the min dynamic memory for the vm. |
extendedLocation | object | The extended location. Required. |
generation | integer | Gets the generation for the vm. |
inventoryItemId | string | Gets or sets the inventory Item ID for the resource. |
isCustomizable | string | Gets a value indicating whether the vm template is customizable or not. Known values are: "true" and "false". |
isHighlyAvailable | string | Gets highly available property. Known values are: "true" and "false". |
limitCpuForMigration | string | Gets a value indicating whether to enable processor compatibility mode for live migration of VMs. Known values are: "true" and "false". |
location | string | The geo-location where the resource lives. Required. |
memoryMB | integer | MemoryMB is the desired size of a virtual machine's memory, in MB. |
networkInterfaces | array | Gets the network interfaces of the template. |
osName | string | Gets os name. |
osType | string | Gets the type of the os. Known values are: "Windows", "Linux", and "Other". |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", and "Created". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uuid | string | Unique ID of the virtual machine template. |
vmmServerId | string | ARM Id of the vmmServer resource in which this resource resides. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
computerName | string | Gets computer name. |
cpuCount | integer | Gets the desired number of vCPUs for the vm. |
disks | array | Gets the disks of the template. |
dynamicMemoryEnabled | string | Gets a value indicating whether to enable dynamic memory or not. Known values are: "true" and "false". |
dynamicMemoryMaxMB | integer | Gets the max dynamic memory for the vm. |
dynamicMemoryMinMB | integer | Gets the min dynamic memory for the vm. |
extendedLocation | object | The extended location. Required. |
generation | integer | Gets the generation for the vm. |
inventoryItemId | string | Gets or sets the inventory Item ID for the resource. |
isCustomizable | string | Gets a value indicating whether the vm template is customizable or not. Known values are: "true" and "false". |
isHighlyAvailable | string | Gets highly available property. Known values are: "true" and "false". |
limitCpuForMigration | string | Gets a value indicating whether to enable processor compatibility mode for live migration of VMs. Known values are: "true" and "false". |
location | string | The geo-location where the resource lives. Required. |
memoryMB | integer | MemoryMB is the desired size of a virtual machine's memory, in MB. |
networkInterfaces | array | Gets the network interfaces of the template. |
osName | string | Gets os name. |
osType | string | Gets the type of the os. Known values are: "Windows", "Linux", and "Other". |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", and "Created". |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uuid | string | Unique ID of the virtual machine template. |
vmmServerId | string | ARM Id of the vmmServer resource in which this resource resides. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, virtual_machine_template_name, subscription_id | Gets a VirtualMachineTemplate. Implements VirtualMachineTemplate GET method. | |
list_by_resource_group | select | resource_group_name, subscription_id | Implements GET VirtualMachineTemplates in a resource group. List of VirtualMachineTemplates in a resource group. | |
list_by_subscription | select | subscription_id | Implements GET VirtualMachineTemplates in a subscription. List of VirtualMachineTemplates in a subscription. | |
create_or_update | insert | resource_group_name, virtual_machine_template_name, subscription_id, location, extendedLocation | Implements VirtualMachineTemplates PUT method. Onboards the ScVmm VM Template as an Azure VM Template resource. | |
update | update | resource_group_name, virtual_machine_template_name, subscription_id | Implements the VirtualMachineTemplate PATCH method. Updates the VirtualMachineTemplate resource. | |
create_or_update | replace | resource_group_name, virtual_machine_template_name, subscription_id, location, extendedLocation | Implements VirtualMachineTemplates PUT method. Onboards the ScVmm VM Template as an Azure VM Template resource. | |
delete | delete | resource_group_name, virtual_machine_template_name, subscription_id | force | Implements 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.
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
virtual_machine_template_name | string | Name of the VirtualMachineTemplate. Required. |
force | string | Forces the resource to be deleted. Known values are: "true" and "false". Default value is None. |
SELECT examples
- get
- list_by_resource_group
- list_by_subscription
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
;
Implements GET VirtualMachineTemplates in a resource group. List of VirtualMachineTemplates in a resource group.
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 subscription_id = '{{ subscription_id }}' -- required
;
Implements GET VirtualMachineTemplates in a subscription. List of VirtualMachineTemplates in a subscription.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: virtual_machine_templates
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the virtual_machine_templates resource.
- name: virtual_machine_template_name
value: "{{ virtual_machine_template_name }}"
description: Required parameter for the virtual_machine_templates resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the virtual_machine_templates resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
The resource-specific properties for this resource.
value:
inventoryItemId: "{{ inventoryItemId }}"
uuid: "{{ uuid }}"
vmmServerId: "{{ vmmServerId }}"
osType: "{{ osType }}"
osName: "{{ osName }}"
computerName: "{{ computerName }}"
memoryMB: {{ memoryMB }}
cpuCount: {{ cpuCount }}
limitCpuForMigration: "{{ limitCpuForMigration }}"
dynamicMemoryEnabled: "{{ dynamicMemoryEnabled }}"
isCustomizable: "{{ isCustomizable }}"
dynamicMemoryMaxMB: {{ dynamicMemoryMaxMB }}
dynamicMemoryMinMB: {{ dynamicMemoryMinMB }}
isHighlyAvailable: "{{ isHighlyAvailable }}"
generation: {{ generation }}
networkInterfaces:
- name: "{{ name }}"
displayName: "{{ displayName }}"
ipv4Addresses: "{{ ipv4Addresses }}"
ipv6Addresses: "{{ ipv6Addresses }}"
macAddress: "{{ macAddress }}"
virtualNetworkId: "{{ virtualNetworkId }}"
networkName: "{{ networkName }}"
ipv4AddressType: "{{ ipv4AddressType }}"
ipv6AddressType: "{{ ipv6AddressType }}"
macAddressType: "{{ macAddressType }}"
nicId: "{{ nicId }}"
disks:
- name: "{{ name }}"
displayName: "{{ displayName }}"
diskId: "{{ diskId }}"
diskSizeGB: {{ diskSizeGB }}
maxDiskSizeGB: {{ maxDiskSizeGB }}
bus: {{ bus }}
lun: {{ lun }}
busType: "{{ busType }}"
vhdType: "{{ vhdType }}"
volumeType: "{{ volumeType }}"
vhdFormatType: "{{ vhdFormatType }}"
templateDiskId: "{{ templateDiskId }}"
storageQoSPolicy:
name: "{{ name }}"
id: "{{ id }}"
createDiffDisk: "{{ createDiffDisk }}"
provisioningState: "{{ provisioningState }}"
- name: extendedLocation
description: |
The extended location. Required.
value:
type: "{{ type }}"
name: "{{ name }}"
UPDATE examples
- update
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
- create_or_update
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
- delete
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 }}'
;