object discoveryrule.copy(object parameters)
This method allows to copy LLD rules with all of the prototypes to the given hosts. 此方法允许复制包含所有属性的LLD规则到给定的主机。
(object) Parameters defining the LLD rules to copy and the target hosts.
|discoveryids||array||IDs of the LLD rules to be copied.|
|hostids||array||IDs of the hosts to copy the LLD rules to.|
true if the copying was successful.
Copy an LLD rule to two hosts.
CDiscoveryrule::copy() in frontends/php/include/classes/api/services/CDiscoveryRule.php.