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
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
autoReplaceOnFailurebooleanSpecifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided.
hostIdstringA unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host.
instanceViewobjectThe dedicated host instance view.
licenseTypestringSpecifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: None, Windows_Server_Hybrid, Windows_Server_Perpetual. The default value is: None.. Known values are: "None", "Windows_Server_Hybrid", and "Windows_Server_Perpetual". (None, Windows_Server_Hybrid, Windows_Server_Perpetual)
locationstringThe geo-location where the resource lives. Required.
platformFaultDomainintegerFault domain of the dedicated host within a dedicated host group.
provisioningStatestringThe provisioning state, which only appears in the response.
provisioningTimestring (date-time)The date when the host was first provisioned.
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. Required.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
timeCreatedstring (date-time)Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
virtualMachinesarrayA list of references to all virtual machines in the Dedicated Host.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, host_group_name, host_name, subscription_id$expandRetrieves information about a dedicated host.
list_by_host_groupselectresource_group_name, host_group_name, subscription_idLists 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_updateinsertresource_group_name, host_group_name, host_name, subscription_id, location, skuCreate or update a dedicated host .
updateupdateresource_group_name, host_group_name, host_name, subscription_idUpdate a dedicated host .
create_or_updatereplaceresource_group_name, host_group_name, host_name, subscription_id, location, skuCreate or update a dedicated host .
deletedeleteresource_group_name, host_group_name, host_name, subscription_idDelete a dedicated host.
list_available_sizesexecresource_group_name, host_group_name, host_name, subscription_idLists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host.
redeployexecresource_group_name, host_group_name, host_name, subscription_idRedeploy 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.
restartexecresource_group_name, host_group_name, host_name, subscription_idRestart 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.

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
host_group_namestringThe name of the dedicated host group. Required.
host_namestringThe name of the dedicated host. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$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. Known values are: "instanceView", "userData", and "resiliencyView". Default value is None.

SELECT examples

Retrieves information about a dedicated host.

SELECT
id,
name,
autoReplaceOnFailure,
hostId,
instanceView,
licenseType,
location,
platformFaultDomain,
provisioningState,
provisioningTime,
sku,
systemData,
tags,
timeCreated,
type,
virtualMachines
FROM azure.compute.dedicated_hosts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND host_group_name = '{{ host_group_name }}' -- required
AND host_name = '{{ host_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Create or update a dedicated host .

INSERT INTO azure.compute.dedicated_hosts (
tags,
location,
properties,
sku,
resource_group_name,
host_group_name,
host_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ sku }}' /* required */,
'{{ resource_group_name }}',
'{{ host_group_name }}',
'{{ host_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

Update a dedicated host .

UPDATE azure.compute.dedicated_hosts
SET
tags = '{{ tags }}',
properties = '{{ properties }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND host_group_name = '{{ host_group_name }}' --required
AND host_name = '{{ host_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
sku,
systemData,
tags,
type;

REPLACE examples

Create or update a dedicated host .

REPLACE azure.compute.dedicated_hosts
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND host_group_name = '{{ host_group_name }}' --required
AND host_name = '{{ host_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND sku = '{{ sku }}' --required
RETURNING
id,
name,
location,
properties,
sku,
systemData,
tags,
type;

DELETE examples

Delete a dedicated host.

DELETE FROM azure.compute.dedicated_hosts
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND host_group_name = '{{ host_group_name }}' --required
AND host_name = '{{ host_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host.

EXEC azure.compute.dedicated_hosts.list_available_sizes 
@resource_group_name='{{ resource_group_name }}' --required,
@host_group_name='{{ host_group_name }}' --required,
@host_name='{{ host_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;