Class VmHostPlacementPolicyProperties
java.lang.Object
com.azure.resourcemanager.avs.models.PlacementPolicyProperties
com.azure.resourcemanager.avs.models.VmHostPlacementPolicyProperties
VM-Host placement policy properties.
-
Constructor Summary
ConstructorDescriptionCreates an instance of VmHostPlacementPolicyProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the affinityStrength property: vm-host placement policy affinity strength (should/must).Get the affinityType property: placement policy affinity type.Get the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type.Get the hostMembers property: Host members list.void
validate()
Validates the instance.Get the vmMembers property: Virtual machine members list.withAffinityStrength
(AffinityStrength affinityStrength) Set the affinityStrength property: vm-host placement policy affinity strength (should/must).withAffinityType
(AffinityType affinityType) Set the affinityType property: placement policy affinity type.withAzureHybridBenefitType
(AzureHybridBenefitType azureHybridBenefitType) Set the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type.withDisplayName
(String displayName) Set the displayName property: Display name of the placement policy.withHostMembers
(List<String> hostMembers) Set the hostMembers property: Host members list.withState
(PlacementPolicyState state) Set the state property: Whether the placement policy is enabled or disabled.withVmMembers
(List<String> vmMembers) Set the vmMembers property: Virtual machine members list.Methods inherited from class com.azure.resourcemanager.avs.models.PlacementPolicyProperties
displayName, provisioningState, state
-
Constructor Details
-
VmHostPlacementPolicyProperties
public VmHostPlacementPolicyProperties()Creates an instance of VmHostPlacementPolicyProperties class.
-
-
Method Details
-
vmMembers
Get the vmMembers property: Virtual machine members list.- Returns:
- the vmMembers value.
-
withVmMembers
Set the vmMembers property: Virtual machine members list.- Parameters:
vmMembers
- the vmMembers value to set.- Returns:
- the VmHostPlacementPolicyProperties object itself.
-
hostMembers
Get the hostMembers property: Host members list.- Returns:
- the hostMembers value.
-
withHostMembers
Set the hostMembers property: Host members list.- Parameters:
hostMembers
- the hostMembers value to set.- Returns:
- the VmHostPlacementPolicyProperties object itself.
-
affinityType
Get the affinityType property: placement policy affinity type.- Returns:
- the affinityType value.
-
withAffinityType
Set the affinityType property: placement policy affinity type.- Parameters:
affinityType
- the affinityType value to set.- Returns:
- the VmHostPlacementPolicyProperties object itself.
-
affinityStrength
Get the affinityStrength property: vm-host placement policy affinity strength (should/must).- Returns:
- the affinityStrength value.
-
withAffinityStrength
Set the affinityStrength property: vm-host placement policy affinity strength (should/must).- Parameters:
affinityStrength
- the affinityStrength value to set.- Returns:
- the VmHostPlacementPolicyProperties object itself.
-
azureHybridBenefitType
Get the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type.- Returns:
- the azureHybridBenefitType value.
-
withAzureHybridBenefitType
public VmHostPlacementPolicyProperties withAzureHybridBenefitType(AzureHybridBenefitType azureHybridBenefitType) Set the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type.- Parameters:
azureHybridBenefitType
- the azureHybridBenefitType value to set.- Returns:
- the VmHostPlacementPolicyProperties object itself.
-
withState
Set the state property: Whether the placement policy is enabled or disabled.- Overrides:
withState
in classPlacementPolicyProperties
- Parameters:
state
- the state value to set.- Returns:
- the PlacementPolicyProperties object itself.
-
withDisplayName
Set the displayName property: Display name of the placement policy.- Overrides:
withDisplayName
in classPlacementPolicyProperties
- Parameters:
displayName
- the displayName value to set.- Returns:
- the PlacementPolicyProperties object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validate
in classPlacementPolicyProperties
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-