Skip to main content

virtual_machine_extensions

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

Overview

Namevirtual_machine_extensions
TypeResource
Idazure.compute.virtual_machine_extensions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
autoUpgradeMinorVersionbooleanIndicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
enableAutomaticUpgradebooleanIndicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
forceUpdateTagstringHow the extension handler should be forced to update even if the extension configuration has not changed.
instanceViewobjectThe virtual machine extension instance view.
locationstringThe geo-location where the resource lives. Required.
protectedSettingsobjectThe extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
protectedSettingsFromKeyVaultobjectThe extensions protected settings that are passed by reference, and consumed from key vault.
provisionAfterExtensionsarrayCollection of extension names after which this extension needs to be provisioned.
provisioningStatestringThe provisioning state, which only appears in the response.
publisherstringThe name of the extension handler publisher.
settingsobjectJson formatted public settings for the extension.
suppressFailuresbooleanIndicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
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".
typeHandlerVersionstringSpecifies the version of the script handler.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, vm_name, vm_extension_name, subscription_id$expandThe operation to get the extension.
listselectresource_group_name, vm_name, subscription_id$expandThe operation to get all extensions of a Virtual Machine.
create_or_updateinsertresource_group_name, vm_name, vm_extension_name, subscription_id, locationThe operation to create or update the extension.
updateupdateresource_group_name, vm_name, vm_extension_name, subscription_idThe operation to update the extension.
create_or_updatereplaceresource_group_name, vm_name, vm_extension_name, subscription_id, locationThe operation to create or update the extension.
deletedeleteresource_group_name, vm_name, vm_extension_name, subscription_idThe operation to delete the extension.

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
vm_extension_namestringThe name of the virtual machine extension. Required.
vm_namestringThe name of the virtual machine. Required.
$expandstringThe expand expression to apply on the operation. Default value is None.

SELECT examples

The operation to get the extension.

SELECT
id,
name,
autoUpgradeMinorVersion,
enableAutomaticUpgrade,
forceUpdateTag,
instanceView,
location,
protectedSettings,
protectedSettingsFromKeyVault,
provisionAfterExtensions,
provisioningState,
publisher,
settings,
suppressFailures,
systemData,
tags,
type,
typeHandlerVersion
FROM azure.compute.virtual_machine_extensions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND vm_name = '{{ vm_name }}' -- required
AND vm_extension_name = '{{ vm_extension_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

The operation to create or update the extension.

INSERT INTO azure.compute.virtual_machine_extensions (
tags,
location,
properties,
resource_group_name,
vm_name,
vm_extension_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ vm_name }}',
'{{ vm_extension_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

The operation to update the extension.

UPDATE azure.compute.virtual_machine_extensions
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND vm_name = '{{ vm_name }}' --required
AND vm_extension_name = '{{ vm_extension_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

REPLACE examples

The operation to create or update the extension.

REPLACE azure.compute.virtual_machine_extensions
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND vm_name = '{{ vm_name }}' --required
AND vm_extension_name = '{{ vm_extension_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

The operation to delete the extension.

DELETE FROM azure.compute.virtual_machine_extensions
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND vm_name = '{{ vm_name }}' --required
AND vm_extension_name = '{{ vm_extension_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;