New-AzNetworkCloudVirtualMachinePlacementHintObject

Create an in-memory object for VirtualMachinePlacementHint.

Syntax

New-AzNetworkCloudVirtualMachinePlacementHintObject
   -HintType <VirtualMachinePlacementHintType>
   -ResourceId <String>
   -SchedulingExecution <VirtualMachineSchedulingExecution>
   -Scope <VirtualMachinePlacementHintPodAffinityScope>
   [<CommonParameters>]

Description

Create an in-memory object for VirtualMachinePlacementHint.

Examples

Example 1: Create an in-memory object for VirtualMachinePlacementHint.

New-AzNetworkCloudVirtualMachinePlacementHintObject -HintType "Affinity" -ResourceId "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName" -SchedulingExecution "Hard" -Scope "Machine"

HintType ResourceId                                                                                                     SchedulingExecution Scope
-------- ----------                                                                                                     ------------------- -----
Affinity /subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName Hard                Machine

Creates an in-memory object for VirtualMachinePlacementHint.

Parameters

-HintType

The specification of whether this hint supports affinity or anti-affinity with the referenced resources.

Type:VirtualMachinePlacementHintType
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

The resource ID of the target object that the placement hints will be checked against, e.g., the bare metal node to host the virtual machine.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SchedulingExecution

The indicator of whether the hint is a hard or soft requirement during scheduling.

Type:VirtualMachineSchedulingExecution
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Scope

The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity.

Type:VirtualMachinePlacementHintPodAffinityScope
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Outputs

VirtualMachinePlacementHint