# Data Object - PlacementAffinityRule(vim.storageDrs.PlacementAffinityRule)

Property of
  PlacementRankSpec
Extends
  DynamicData
See also
  VirtualMachine
Since
  vSphere API 6.0

## Data Object Description

The PlacementAffinityRule data object specifies affinity rules for placement

Properties

Name | Type | Description
--- | --- | ---
keys* | xsd:string[] | List of PlacementSpec keys that are part of this rule representing virtual machines yet to be placed.
ruleScope | xsd:string | Scope of the affinity rule. The set of possible values are described in PlacementAffinityRuleRuleScope
ruleType | xsd:string | Type of affinity rule. The set of possible values are described in PlacementAffinityRuleRuleType
vms* | ManagedObjectReference[] to a VirtualMachine[] | List of virtual machines that are part of this rule.
Properties inherited from DynamicData
None

*Need not be set
Show WSDL type definition
<complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="PlacementAffinityRule"> <complexContent> <extension base="pbm:DynamicData"> <sequence> <element name="ruleType" type="xsd:string"/> <element name="ruleScope" type="xsd:string"/> <element name="vms" type="pbm:ManagedObjectReference" minOccurs="0" maxOccurs="unbounded"/> <element name="keys" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType>