Skip to main content

dedicated_hosts

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

Overview

Namededicated_hosts
TypeResource
Idazure.compute.dedicated_hosts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource Id
namestringResource name
locationstringResource location
propertiesobjectProperties of the dedicated host.
skuobjectSKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values.
tagsobjectResource tags
typestringResource type

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, hostGroupName, hostName, subscriptionId$expandRetrieves information about a dedicated host.
list_by_host_groupselectresourceGroupName, hostGroupName, subscriptionIdLists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts.
create_or_updateinsertresourceGroupName, hostGroupName, hostName, subscriptionId, data__skuCreate or update a dedicated host .
updateupdateresourceGroupName, hostGroupName, hostName, subscriptionIdUpdate a dedicated host .
deletedeleteresourceGroupName, hostGroupName, hostName, subscriptionIdDelete a dedicated host.
restartexecresourceGroupName, hostGroupName, hostName, subscriptionIdRestart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.
redeployexecresourceGroupName, hostGroupName, hostName, subscriptionIdRedeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated to a new node and is running. To determine the health of VMs deployed on the dedicated host after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.

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
hostGroupNamestringThe name of the dedicated host group.
hostNamestringThe name of the dedicated host.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstringSubscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
$expandstringThe expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated host. 'UserData' is not supported for dedicated host.

SELECT examples

Retrieves information about a dedicated host.

SELECT
id,
name,
location,
properties,
sku,
tags,
type
FROM azure.compute.dedicated_hosts
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND hostGroupName = '{{ hostGroupName }}' -- required
AND hostName = '{{ hostName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Create or update a dedicated host .

INSERT INTO azure.compute.dedicated_hosts (
data__properties,
data__sku,
data__location,
data__tags,
resourceGroupName,
hostGroupName,
hostName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ sku }}' /* required */,
'{{ location }}',
'{{ tags }}',
'{{ resourceGroupName }}',
'{{ hostGroupName }}',
'{{ hostName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
location,
properties,
sku,
tags,
type
;

UPDATE examples

Update a dedicated host .

UPDATE azure.compute.dedicated_hosts
SET
data__properties = '{{ properties }}',
data__sku = '{{ sku }}',
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND hostGroupName = '{{ hostGroupName }}' --required
AND hostName = '{{ hostName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
id,
name,
location,
properties,
sku,
tags,
type;

DELETE examples

Delete a dedicated host.

DELETE FROM azure.compute.dedicated_hosts
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND hostGroupName = '{{ hostGroupName }}' --required
AND hostName = '{{ hostName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.

EXEC azure.compute.dedicated_hosts.restart 
@resourceGroupName='{{ resourceGroupName }}' --required,
@hostGroupName='{{ hostGroupName }}' --required,
@hostName='{{ hostName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;