You define the ESX agency scope of a solution by passing the managed object references (MoRefs) of the vSphere compute resources to the solution.
You set the initial ESX agency scope in the scope property of the AgencyConfigInfo object. You can change the scope when a solution runs by calling the Agency.update() method. For example, in the EAM Sample Solution, users select the ESXi hosts on which to run the solution from a list on the Solution tab. The EAM Sample Solution updates the scope of the sample ESX agency according to the hosts that the user selects.
The EAM Sample Solution defines a function to update the scope of the ESX agency in the AgentHandler.java class.