Dedicated Hosts - Update

Update a dedicated host .

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}?api-version=2024-03-01

URI Parameters

Name In Required Type Description
hostGroupName
path True

string

The name of the dedicated host group.

hostName
path True

string

The name of the dedicated host .

resourceGroupName
path True

string

The name of the resource group.

subscriptionId
path True

string

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client Api Version.

Request Body

Name Type Description
properties.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.

properties.licenseType

DedicatedHostLicenseTypes

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.

properties.platformFaultDomain

integer

Fault domain of the dedicated host within a dedicated host group.

sku

Sku

[List all available dedicated host sizes for resizing] (https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes). Resizing can be only used to scale up DedicatedHost. Only name is required to be set.

tags

object

Resource tags

Responses

Name Type Description
200 OK

DedicatedHost

OK

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

DedicatedHost_Update_MaximumSet_Gen
DedicatedHost_Update_MinimumSet_Gen
DedicatedHost_Update_Resize

DedicatedHost_Update_MaximumSet_Gen

Sample Request

PATCH https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/hostGroups/aaaaaaaaa/hosts/aaaaaaaaaaaaaaaaaaaaa?api-version=2024-03-01

{
  "properties": {
    "platformFaultDomain": 1,
    "autoReplaceOnFailure": true,
    "licenseType": "Windows_Server_Hybrid",
    "instanceView": {
      "availableCapacity": {
        "allocatableVMs": [
          {
            "vmSize": "aaaaaaaaaaaaaaaaaaaa",
            "count": 26
          }
        ]
      },
      "statuses": [
        {
          "code": "aaaaaaaaaaaaaaaaaaaaaaa",
          "level": "Info",
          "displayStatus": "aaaaaa",
          "message": "a",
          "time": "2021-11-30T12:58:26.522Z"
        }
      ]
    }
  },
  "tags": {
    "key8813": "aaaaaaaaaaaaaaaaaaaaaaaaaaa"
  }
}

Sample Response

{
  "location": "westus",
  "tags": {},
  "properties": {
    "platformFaultDomain": 1,
    "autoReplaceOnFailure": true,
    "hostId": "{GUID}",
    "virtualMachines": [
      {
        "id": "aaaa"
      }
    ],
    "licenseType": "Windows_Server_Hybrid",
    "provisioningTime": "2021-11-30T12:58:26.526Z",
    "provisioningState": "aaaaaaaaaaaaaaaaaaaaaaaaa",
    "instanceView": {
      "assetId": "aaaaaaaaaaaaaaaa",
      "availableCapacity": {
        "allocatableVMs": [
          {
            "vmSize": "aaaaaaaaaaaaaaaaaaaa",
            "count": 26
          }
        ]
      },
      "statuses": [
        {
          "code": "aaaaaaaaaaaaaaaaaaaaaaa",
          "level": "Info",
          "displayStatus": "aaaaaa",
          "message": "a",
          "time": "2021-11-30T12:58:26.522Z"
        }
      ]
    }
  },
  "sku": {
    "name": "DSv3-Type1",
    "tier": "aaa",
    "capacity": 7
  },
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myDedicatedHost",
  "name": "myDedicatedHost",
  "type": "aaaaaaaaaaaaaaaaaaa"
}

DedicatedHost_Update_MinimumSet_Gen

Sample Request

PATCH https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/hostGroups/aa/hosts/aaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2024-03-01

{}

Sample Response

{
  "location": "westus",
  "sku": {}
}

DedicatedHost_Update_Resize

Sample Request

PATCH https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/hostGroups/aaaaaaaaa/hosts/aaaaaaaaaaaaaaaaaaaaa?api-version=2024-03-01

{
  "sku": {
    "name": "DSv3-Type1"
  }
}

Sample Response

{
  "location": "westus",
  "tags": {},
  "properties": {
    "platformFaultDomain": 1,
    "autoReplaceOnFailure": true,
    "hostId": "{GUID}",
    "virtualMachines": [
      {
        "id": "aaaa"
      }
    ],
    "licenseType": "Windows_Server_Hybrid",
    "provisioningTime": "2021-11-30T12:58:26.526Z",
    "provisioningState": "aaaaaaaaaaaaaaaaaaaaaaaaa"
  },
  "sku": {
    "name": "DSv3-Type1",
    "tier": "aaa",
    "capacity": 7
  },
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myDedicatedHost",
  "name": "myDedicatedHost",
  "type": "aaaaaaaaaaaaaaaaaaa"
}

Definitions

Name Description
ApiError

Api error.

ApiErrorBase

Api error base.

CloudError

An error response from the Compute service.

DedicatedHost

Specifies information about the Dedicated host.

DedicatedHostAllocatableVM

Represents the dedicated host unutilized capacity in terms of a specific VM size.

DedicatedHostAvailableCapacity

Dedicated host unutilized capacity.

DedicatedHostInstanceView

The instance view of a dedicated host.

DedicatedHostLicenseTypes

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.

DedicatedHostUpdate

Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated.

InnerError

Inner error details.

InstanceViewStatus

Instance view status.

Sku

Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name.

StatusLevelTypes

The level code.

SubResourceReadOnly

ApiError

Api error.

Name Type Description
code

string

The error code.

details

ApiErrorBase[]

The Api error details

innererror

InnerError

The Api inner error

message

string

The error message.

target

string

The target of the particular error.

ApiErrorBase

Api error base.

Name Type Description
code

string

The error code.

message

string

The error message.

target

string

The target of the particular error.

CloudError

An error response from the Compute service.

Name Type Description
error

ApiError

Api error.

DedicatedHost

Specifies information about the Dedicated host.

Name Type Description
id

string

Resource Id

location

string

Resource location

name

string

Resource name

properties.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.

properties.hostId

string

A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host.

properties.instanceView

DedicatedHostInstanceView

The dedicated host instance view.

properties.licenseType

DedicatedHostLicenseTypes

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.

properties.platformFaultDomain

integer

Fault domain of the dedicated host within a dedicated host group.

properties.provisioningState

string

The provisioning state, which only appears in the response.

properties.provisioningTime

string

The date when the host was first provisioned.

properties.timeCreated

string

Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01.

properties.virtualMachines

SubResourceReadOnly[]

A list of references to all virtual machines in the Dedicated Host.

sku

Sku

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.

tags

object

Resource tags

type

string

Resource type

DedicatedHostAllocatableVM

Represents the dedicated host unutilized capacity in terms of a specific VM size.

Name Type Description
count

number

Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity.

vmSize

string

VM size in terms of which the unutilized capacity is represented.

DedicatedHostAvailableCapacity

Dedicated host unutilized capacity.

Name Type Description
allocatableVMs

DedicatedHostAllocatableVM[]

The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host.

DedicatedHostInstanceView

The instance view of a dedicated host.

Name Type Description
assetId

string

Specifies the unique id of the dedicated physical machine on which the dedicated host resides.

availableCapacity

DedicatedHostAvailableCapacity

Unutilized capacity of the dedicated host.

statuses

InstanceViewStatus[]

The resource status information.

DedicatedHostLicenseTypes

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.

Name Type Description
None

string

Windows_Server_Hybrid

string

Windows_Server_Perpetual

string

DedicatedHostUpdate

Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated.

Name Type Description
properties.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.

properties.hostId

string

A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host.

properties.instanceView

DedicatedHostInstanceView

The dedicated host instance view.

properties.licenseType

DedicatedHostLicenseTypes

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.

properties.platformFaultDomain

integer

Fault domain of the dedicated host within a dedicated host group.

properties.provisioningState

string

The provisioning state, which only appears in the response.

properties.provisioningTime

string

The date when the host was first provisioned.

properties.timeCreated

string

Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01.

properties.virtualMachines

SubResourceReadOnly[]

A list of references to all virtual machines in the Dedicated Host.

sku

Sku

[List all available dedicated host sizes for resizing] (https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes). Resizing can be only used to scale up DedicatedHost. Only name is required to be set.

tags

object

Resource tags

InnerError

Inner error details.

Name Type Description
errordetail

string

The internal error message or exception dump.

exceptiontype

string

The exception type.

InstanceViewStatus

Instance view status.

Name Type Description
code

string

The status code.

displayStatus

string

The short localizable label for the status.

level

StatusLevelTypes

The level code.

message

string

The detailed status message, including for alerts and error messages.

time

string

The time of the status.

Sku

Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name.

Name Type Description
capacity

integer

Specifies the number of virtual machines in the scale set.

name

string

The sku name.

tier

string

Specifies the tier of virtual machines in a scale set.

Possible Values:

Standard

Basic

StatusLevelTypes

The level code.

Name Type Description
Error

string

Info

string

Warning

string

SubResourceReadOnly

Name Type Description
id

string

Resource Id