EnumerateAssociatedInstances
Returns the instances related to the source object through an association. Results are filtered based on the argument you pass in.
Arguments
Accepts the following arguments.
Argument | Description |
---|---|
class_name
|
Name of the class for which you want to get the associated instances. |
selectors
|
Set keys as a reference
to a hash. Used to identify the instance of the class mentioned in the
class_name argument.
|
associationclassname (optional)
|
Name of the association class for the instance. |
role
(optional)
|
Role that the object plays in the association class. The method filters the results according to the role. |
resultclassname (optional)
|
Result class name, which must be present in the association. The method returns only those instances. |
resultrole (optional)
|
Role that the result
class plays in this instance. The method returns the results based on
resultrole .
|
includeresult (optional)
|
Further filters query
results based on properties of the instances. You can pass in properties as a
name-value hash, then pass in a reference to this hash in the
includeresult named argument.
|
namespace
|
Default CIM namespace.
Default is
root/cimv2.
If the namespace is not root/cimv2, you must pass in the namespace of the class in this argument. |
Example
$client->EnumerateAssociatedInstances( class_name => 'CIM_Foo', selectors => \%hash; associationclassname => 'CIM_Bar', #optional role => 'CIM_Baz', #optional resultclassname => 'CIM_Bat', #optional resultrole => 'CIM_Quux', #optional includeresult => \%hash, #optional namespace => 'root/cimv2' #optional