admin.foreignClusterSetBootstrapHosts( config as element(configuration), cluster-id as (Number|String), bootstrap-hosts as element(cl.foreignHost)[] ) as element(configuration)
This function identifies the foreign host to be used to bootstrap communication with the foreign cluster. When a bootstrap host on a foreign cluster initially starts, it will bootstrap communications by establishing a connection to one or more of the hosts on this cluster. Once a connection has been established between cluster hosts, the bootstrap host retrieves configuration information to identify which foreign hosts are responsible for specific foreign forests.
http://marklogic.com/xdmp/privileges/admin/cluster
const admin = require('/MarkLogic/admin.xqy'); const cfg = admin.getConfiguration() const fcl = admin.clusterGetForeignClusterId(cfg, "ClusterA") const host = admin.foreignHost(13134636216063499728, "master.marklogic.com", 7998) admin.foreignClusterSetBootstrapHosts(cfg, fcl, host) //Sets 'master.marklogic.com' as the bootstrap host for the foreign cluster.//Use //admin.saveConfiguration to save the changes to the configuration or pass the //configuration to other Admin API functions to make other changes.