Method Aliases
A method alias is a label given to a group of things to enable you to specify a single identifier (the method alias) to execute a command on one of a group of things.
A method alias consist of multiple things that are grouped together and the method runs on a thing depending on its availability. It is an extension to the method.exec command where the method runs on a single defined thing and it is rejected if that thing is not available. When defining a method alias, select the following options that allows selecting a thing depending on its availability:
-
Policy - The policy followed by the server while selecting a thing within the group defined in the method aliases
-
No target policy - The policy to select a thing if none of the things within the group (alias) are available. This option will be considered when the above set Policy fails when no targeted things were online.
Enter the method alias key when calling the method.exec command.
In the example below, the alias contains a group composed of Thing 1, Thing 2, and Thing 3. The method is executed on Thing 3 because it is available.
n the example below, the method alias contains five servers. The command to run the maintenance tasks for the Robot 3 is executed on Server 3 because it is available and the rest of the servers were offline.