machine_extensions
Creates, updates, deletes, gets or lists a machine_extensions resource.
Overview
| Name | machine_extensions |
| Type | Resource |
| Id | azure.hybrid_compute.machine_extensions |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
autoUpgradeMinorVersion | boolean | Indicates 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. |
enableAutomaticUpgrade | boolean | Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. |
forceUpdateTag | string | How the extension handler should be forced to update even if the extension configuration has not changed. |
instanceView | object | The machine extension instance view. |
location | string | The geo-location where the resource lives. Required. |
protectedSettings | object | The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. |
provisioningState | string | The provisioning state, which only appears in the response. |
publisher | string | The name of the extension handler publisher. |
settings | object | Json formatted public settings for the extension. |
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". |
typeHandlerVersion | string | Specifies the version of the script handler. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
autoUpgradeMinorVersion | boolean | Indicates 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. |
enableAutomaticUpgrade | boolean | Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. |
forceUpdateTag | string | How the extension handler should be forced to update even if the extension configuration has not changed. |
instanceView | object | The machine extension instance view. |
location | string | The geo-location where the resource lives. Required. |
protectedSettings | object | The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. |
provisioningState | string | The provisioning state, which only appears in the response. |
publisher | string | The name of the extension handler publisher. |
settings | object | Json formatted public settings for the extension. |
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". |
typeHandlerVersion | string | Specifies the version of the script handler. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, machine_name, extension_name, subscription_id | The operation to get the extension. | |
list | select | resource_group_name, machine_name, subscription_id | $expand | The operation to get all extensions of a non-Azure machine. |
create_or_update | insert | resource_group_name, machine_name, extension_name, subscription_id, location | The operation to create or update the extension. | |
update | update | resource_group_name, machine_name, extension_name, subscription_id | The operation to create or update the extension. | |
create_or_update | replace | resource_group_name, machine_name, extension_name, subscription_id, location | The operation to create or update the extension. | |
delete | delete | resource_group_name, machine_name, extension_name, subscription_id | The 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.
| Name | Datatype | Description |
|---|---|---|
extension_name | string | The name of the machine extension. Required. |
machine_name | string | The name of the hybrid machine. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
$expand | string | The expand expression to apply on the operation. Default value is None. |
SELECT examples
- get
- list
The operation to get the extension.
SELECT
id,
name,
autoUpgradeMinorVersion,
enableAutomaticUpgrade,
forceUpdateTag,
instanceView,
location,
protectedSettings,
provisioningState,
publisher,
settings,
systemData,
tags,
type,
typeHandlerVersion
FROM azure.hybrid_compute.machine_extensions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND machine_name = '{{ machine_name }}' -- required
AND extension_name = '{{ extension_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
The operation to get all extensions of a non-Azure machine.
SELECT
id,
name,
autoUpgradeMinorVersion,
enableAutomaticUpgrade,
forceUpdateTag,
instanceView,
location,
protectedSettings,
provisioningState,
publisher,
settings,
systemData,
tags,
type,
typeHandlerVersion
FROM azure.hybrid_compute.machine_extensions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND machine_name = '{{ machine_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;
INSERT examples
- create_or_update
- Manifest
The operation to create or update the extension.
INSERT INTO azure.hybrid_compute.machine_extensions (
tags,
location,
properties,
resource_group_name,
machine_name,
extension_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ machine_name }}',
'{{ extension_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: machine_extensions
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the machine_extensions resource.
- name: machine_name
value: "{{ machine_name }}"
description: Required parameter for the machine_extensions resource.
- name: extension_name
value: "{{ extension_name }}"
description: Required parameter for the machine_extensions resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the machine_extensions resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
Describes the properties of a Machine Extension.
value:
forceUpdateTag: "{{ forceUpdateTag }}"
publisher: "{{ publisher }}"
type: "{{ type }}"
typeHandlerVersion: "{{ typeHandlerVersion }}"
enableAutomaticUpgrade: {{ enableAutomaticUpgrade }}
autoUpgradeMinorVersion: {{ autoUpgradeMinorVersion }}
settings: "{{ settings }}"
protectedSettings: "{{ protectedSettings }}"
provisioningState: "{{ provisioningState }}"
instanceView:
name: "{{ name }}"
type: "{{ type }}"
typeHandlerVersion: "{{ typeHandlerVersion }}"
status:
code: "{{ code }}"
level: "{{ level }}"
displayStatus: "{{ displayStatus }}"
message: "{{ message }}"
time: "{{ time }}"
UPDATE examples
- update
The operation to create or update the extension.
UPDATE azure.hybrid_compute.machine_extensions
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND machine_name = '{{ machine_name }}' --required
AND extension_name = '{{ extension_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;
REPLACE examples
- create_or_update
The operation to create or update the extension.
REPLACE azure.hybrid_compute.machine_extensions
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND machine_name = '{{ machine_name }}' --required
AND extension_name = '{{ extension_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
The operation to delete the extension.
DELETE FROM azure.hybrid_compute.machine_extensions
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND machine_name = '{{ machine_name }}' --required
AND extension_name = '{{ extension_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;