dedicated_hosts
Creates, updates, deletes, gets or lists a dedicated_hosts resource.
Overview
| Name | dedicated_hosts |
| Type | Resource |
| Id | azure.compute.dedicated_hosts |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_host_group
| 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. |
autoReplaceOnFailure | boolean | Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. |
hostId | string | A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host. |
instanceView | object | The dedicated host instance view. |
licenseType | string | Specifies 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) |
location | string | The geo-location where the resource lives. Required. |
platformFaultDomain | integer | Fault domain of the dedicated host within a dedicated host group. |
provisioningState | string | The provisioning state, which only appears in the response. |
provisioningTime | string (date-time) | The date when the host was first provisioned. |
sku | object | SKU 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. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeCreated | string (date-time) | Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
virtualMachines | array | A list of references to all virtual machines in the Dedicated Host. |
| 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. |
autoReplaceOnFailure | boolean | Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. |
hostId | string | A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host. |
instanceView | object | The dedicated host instance view. |
licenseType | string | Specifies 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) |
location | string | The geo-location where the resource lives. Required. |
platformFaultDomain | integer | Fault domain of the dedicated host within a dedicated host group. |
provisioningState | string | The provisioning state, which only appears in the response. |
provisioningTime | string (date-time) | The date when the host was first provisioned. |
sku | object | SKU 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. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeCreated | string (date-time) | Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
virtualMachines | array | A list of references to all virtual machines in the Dedicated Host. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, host_group_name, host_name, subscription_id | $expand | Retrieves information about a dedicated host. |
list_by_host_group | select | resource_group_name, host_group_name, subscription_id | Lists 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_update | insert | resource_group_name, host_group_name, host_name, subscription_id, location, sku | Create or update a dedicated host . | |
update | update | resource_group_name, host_group_name, host_name, subscription_id | Update a dedicated host . | |
create_or_update | replace | resource_group_name, host_group_name, host_name, subscription_id, location, sku | Create or update a dedicated host . | |
delete | delete | resource_group_name, host_group_name, host_name, subscription_id | Delete a dedicated host. | |
list_available_sizes | exec | resource_group_name, host_group_name, host_name, subscription_id | 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. | |
redeploy | exec | resource_group_name, host_group_name, host_name, subscription_id | Redeploy 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. | |
restart | exec | resource_group_name, host_group_name, host_name, subscription_id | 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. |
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 |
|---|---|---|
host_group_name | string | The name of the dedicated host group. Required. |
host_name | string | The name of the dedicated host. 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. '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
- get
- list_by_host_group
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 }}'
;
Lists 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.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: dedicated_hosts
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the dedicated_hosts resource.
- name: host_group_name
value: "{{ host_group_name }}"
description: Required parameter for the dedicated_hosts resource.
- name: host_name
value: "{{ host_name }}"
description: Required parameter for the dedicated_hosts resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the dedicated_hosts resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
Properties of the dedicated host.
value:
platformFaultDomain: {{ platformFaultDomain }}
autoReplaceOnFailure: {{ autoReplaceOnFailure }}
hostId: "{{ hostId }}"
virtualMachines:
- id: "{{ id }}"
licenseType: "{{ licenseType }}"
provisioningTime: "{{ provisioningTime }}"
provisioningState: "{{ provisioningState }}"
instanceView:
assetId: "{{ assetId }}"
availableCapacity:
allocatableVMs:
- vmSize: "{{ vmSize }}"
count: {{ count }}
statuses:
- code: "{{ code }}"
level: "{{ level }}"
displayStatus: "{{ displayStatus }}"
message: "{{ message }}"
time: "{{ time }}"
timeCreated: "{{ timeCreated }}"
- name: sku
description: |
SKU 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.
value:
name: "{{ name }}"
tier: "{{ tier }}"
capacity: {{ capacity }}
UPDATE examples
- update
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
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
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
- list_available_sizes
- redeploy
- restart
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
;
Redeploy 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.
EXEC azure.compute.dedicated_hosts.redeploy
@resource_group_name='{{ resource_group_name }}' --required,
@host_group_name='{{ host_group_name }}' --required,
@host_name='{{ host_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
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
@resource_group_name='{{ resource_group_name }}' --required,
@host_group_name='{{ host_group_name }}' --required,
@host_name='{{ host_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;