This page was generated
March  13,  2012
4:48  AM
XQuery & XSLT Built-In & Modules Function Reference

Module: Admin Library - Cluster Functions

The Admin module is an XQuery library module that allows you to script administrative tasks that you otherwise would need the Admin Interface to perform. Most functions in this library perform adminstrative tasks and therefore require the user who runs the XQuery program to have the Admin role.

Many of these functions provide new configuration information. In most cases, you must save the configuration (with admin:save-configuration, for example) in the same statement that you use the functions in order for them to take effect.

To use the Admin module as part of your own XQuery module, include the following line in your XQuery prolog:

import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy" ;

The library namespace prefix admin is not predefined in the server.

Function Summary
admin:cluster-get-foreign-cluster-id This function returns the id of the specified foreign cluster.
admin:cluster-get-foreign-cluster-ids This function returns the ids of the foreign clusters.
admin:cluster-get-foreign-master-database This function is executed on a replica cluster to return the replication configuration for the specified local database from the specified foreign master cluster.
admin:cluster-get-foreign-replica-databases This function is executed on the master cluster to return the replication configuration for the specified local database to the specified foreign replica cluster.
admin:cluster-get-id This function returns the id of this cluster.
admin:cluster-get-name This function returns the name of this cluster.
admin:cluster-get-xdqp-bootstrap-hosts This function returns the ids of the bootstrap hosts configured for this cluster.
admin:cluster-get-xdqp-ssl-certificate This function returns the SSL certificate used to establish secure communication with this cluster.
admin:cluster-get-xdqp-ssl-private-key This function returns the private key for the cluster.
admin:cluster-set-name This function sets the name for this cluster.
admin:cluster-set-xdqp-bootstrap-hosts This function sets the bootstrap hosts for the domestic cluster.
admin:cluster-set-xdqp-ssl-certificate This function sets the SSL certificate used to establish secure communication with this cluster.
admin:foreign-cluster-create This function creates a complete configuration for a foreign cluster.
admin:foreign-cluster-delete This function deletes the configuration for the specified foreign cluster.
admin:foreign-cluster-get-bootstrap-hosts This function returns one or more configuration elements that identify the bootstrap hosts on the specified foreign cluster.
admin:foreign-cluster-get-host-timeout This function returns the timeout period (in seconds) for communication between domestic hosts and hosts in the specified foreign cluster.
admin:foreign-cluster-get-name This function returns the name of the foreign cluster.
admin:foreign-cluster-get-ssl-certificate This function returns the SSL certificate used to communicate with hosts in the foreign cluster.
admin:foreign-cluster-get-xdqp-ssl-allow-sslv3 This function returns true if the SSL v3 protocol is enabled for the foreign cluster.
admin:foreign-cluster-get-xdqp-ssl-allow-tls This function returns true if the TLS protocol is enabled for the foreign cluster.
admin:foreign-cluster-get-xdqp-ssl-ciphers This function returns the SSL ciphers set for the specified foreign cluster.
admin:foreign-cluster-get-xdqp-ssl-enabled This function returns true if SSL is enabled for the foreign cluster.
admin:foreign-cluster-get-xdqp-timeout This function returns the timeout setting (in seconds) for XDQP communication between data nodes and evaluator nodes in the domestic cluster and their counterparts in the foreign cluster.
admin:foreign-cluster-replace This function replaces a configuration for a foreign cluster with a new configuration.
admin:foreign-cluster-set-bootstrap-hosts This function identifies the foreign host to be used to bootstrap communication with the foreign cluster.
admin:foreign-cluster-set-host-timeout This function sets the timeout period (in seconds) for communication between domestic hosts and hosts in the specified foreign cluster.
admin:foreign-cluster-set-name This function sets the name of a foreign cluster.
admin:foreign-cluster-set-ssl-certificate This function sets the specified SSL certificate for secure communication with hosts in a foreign cluster.
admin:foreign-cluster-set-xdqp-ssl-allow-sslv3 This function enables or disables the SSL v3 protocol for the specified foreign cluster.
admin:foreign-cluster-set-xdqp-ssl-allow-tls This function enables or disables the TLS protocol for the specified foreign cluster.
admin:foreign-cluster-set-xdqp-ssl-ciphers This function sets SSL ciphers for the specified foreign cluster.
admin:foreign-cluster-set-xdqp-ssl-enabled This function enables or disables SSL for the foreign cluster.
admin:foreign-cluster-set-xdqp-timeout This function sets the timeout (in seconds) for XDQP communication between data nodes and evaluator nodes in the domestic cluster and their counterparts in the foreign cluster.
admin:foreign-host This function configures a foreign host to be set by the admin:foreign-cluster-set-bootstrap-hosts function as the bootstrap host for the foreign cluster.
admin:foreign-host-get-connect-port This function returns the number of the port configured for the foreign bootstrap host.
admin:foreign-host-get-id This function returns the id of the foreign bootstrap host.
admin:foreign-host-get-name This function returns the name of the foreign bootstrap host.
admin:host-get-foreign-port This function returns the port used by the specified host to listen for communications from foreign hosts.
admin:host-set-foreign-port This function configures the specified domestic host to listen for communications from foreign hosts over the specified port.
Function Detail
admin:cluster-get-foreign-cluster-id(
$config as element(configuration),
$name as xs:string
)  as   xs:unsignedLong
Summary:

This function returns the id of the specified foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$name : The name of the cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()

  return admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
 
  (: Returns the id of the foreign cluster named 'ClusterA'. :)
    

admin:cluster-get-foreign-cluster-ids(
$config as element(configuration)
)  as   xs:unsignedLong*
Summary:

This function returns the ids of the foreign clusters.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()

  return admin:cluster-get-foreign-cluster-ids($cfg)
 
  (: Returns the ids of the foreign clusters. :)
    

admin:cluster-get-foreign-master-database(
$config as element(configuration),
$foreign-cluster-id as xs:unsignedLong,
$database-ids as xs:unsignedLong*
)  as   element(db:foreign-master)*
Summary:

This function is executed on a replica cluster to return the replication configuration for the specified local database from the specified foreign master cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$foreign-cluster-id : The id of the foreign master cluster.
$database-ids : The id of the replica database on the local cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  let $dbid := admin:database-get-id($cfg, "Documents")
  let $cid := admin:cluster-get-foreign-cluster-ids($cfg)
  
  return admin:cluster-get-foreign-master-database($cfg, $cid, $dbid)

  (: Returns the database replication configuration for the Documents
     database on the master cluster. :)
     

admin:cluster-get-foreign-replica-databases(
$config as element(configuration),
$foreign-cluster-id as xs:unsignedLong,
$database-ids as xs:unsignedLong*
)  as   element(db:foreign-replicas)*
Summary:

This function is executed on the master cluster to return the replication configuration for the specified local database to the specified foreign replica cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$foreign-cluster-id : The id of the foreign replica cluster.
$database-ids : The id of the master database on the local cluster.

Example:
  (: This function must be executed on the master cluster. :)

  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  let $dbid := admin:database-get-id($cfg, "Documents")

  for $cid in admin:cluster-get-foreign-cluster-ids($cfg)
      return admin:cluster-get-foreign-replica-databases($cfg, $cid, $dbid)

  (: Returns the database replication configuration for the Documents 
     database to all of the replica clusters. :)
     

admin:cluster-get-id(
$config as element(configuration)
)  as   xs:unsignedLong
Summary:

This function returns the id of this cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()

  return admin:cluster-get-id($cfg)

  (: Returns the id of this cluster. :) 
    

admin:cluster-get-name(
$config as element(configuration)
)  as   xs:string
Summary:

This function returns the name of this cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  
  return admin:cluster-get-name($cfg)

  (: Returns the name of this cluster. :)
    

admin:cluster-get-xdqp-bootstrap-hosts(
$config as element(configuration)
)  as   xs:unsignedLong*
Summary:

This function returns the ids of the bootstrap hosts configured for this cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  
  return admin:cluster-get-xdqp-bootstrap-hosts($cfg)
 
  (: Returns the ids for this cluster's bootstrap hosts. :)
    

admin:cluster-get-xdqp-ssl-certificate(
$config as element(configuration)
)  as   xs:string
Summary:

This function returns the SSL certificate used to establish secure communication with this cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $config := admin:get-configuration()

  return admin:cluster-get-xdqp-ssl-certificate($config)

  (: Returns the SSL certificate for the cluster. :)
    

admin:cluster-get-xdqp-ssl-private-key(
$config as element(configuration)
)  as   xs:string
Summary:

This function returns the private key for the cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $config := admin:get-configuration()

  return admin:cluster-get-xdqp-ssl-private-key($config)

  (: Returns the private key used by this cluster.  :)
    

admin:cluster-set-name(
$config as element(configuration),
$name as xs:string
)  as   element(configuration)
Summary:

This function sets the name for this cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$name : The name to be assigned to this cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  
  return admin:cluster-set-name($cfg, "replica")

  (: Assigns 'replica' as the name of this cluster. Use admin:save-configuration 
     to save the changes to the configuration or pass the configuration to other 
     Admin API functions to make other changes. :):)
    

admin:cluster-set-xdqp-bootstrap-hosts(
$config as element(configuration),
$host-ids as xs:unsignedLong*
)  as   element(configuration)
Summary:

This function sets the bootstrap hosts for the domestic cluster. Bootstrap hosts are accessed by hosts on foreign clusters to establish communication with the domestic cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$host-ids : One or more ids for hosts to be used as bootstrap hosts for this cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()

  return admin:cluster-set-xdqp-bootstrap-hosts($cfg, 11043766148104991860)

  (: Sets the specified host as the bootstrap host for this cluster.  Use 
     admin:save-configuration to save the changes to the configuration or 
     pass the configuration to other Admin API functions to make other changes. :)
    

admin:cluster-set-xdqp-ssl-certificate(
$config as element(configuration),
$value as xs:string
)  as   element(configuration)
Summary:

This function sets the SSL certificate used to establish secure communication with this cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$value : The SSL certificate for this cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $cert := "----BEGIN CERTIFICATE-----
               MIICzjCCAbagAwIBAgIJAMieG0IJQAWQMA0GCSqGSIb3DQEBBQUAMB8xHTAbBgNV
               BAMTFDE3MDY0ODkwODY2NTc0NzgxNTcxMB4XDTExMDYwMjIwMjA1M1oXDTIxMDUz
               MDIwMjA1M1owHzEdMBsGA1UEAxMUMTcwNjQ4OTA4NjY1NzQ3ODE1NzEwggEiMA0G
               CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPM9XLSbmVN1Fykz523I7H9Cq4zgO9
               cUSHI/FArYnWNXUbJIesvDifu2DggfsE7HD6Glwa1ZvkVTBDyZhYv1MZMpBy18Au
               9McoBbl9NYHOIhtM6bHTJAWNDoHi+TL/rFJzxo5h+bC/JnOjbE40MZKkzSzV944t
               LbpYT3JfGtMJgcCEWqVLp7vkSRUsKCPuJdPpFfMixDaLA75+W9PVdm01jDvihrgr
               CZkVjlMzZersHYQDsuNNWwt/9fM1skKabVWUVB0vHV307j2JHwVUJS3+hVxSiT61
               GaIO3GSL6dVI5ZlYZCCyyFNc0cqPutu0Q3MfZq6MpFlt5Iffm0cWwSkvAgMBAAGj
               DTALMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQEFBQADggEBAIKRSFrk3a7JBl9bBsBb
               sWxob3eVM4wh8f6EPjdiIZL0V7HH4dH2hdcvtXB0NdMntiTeJfjm/tdzzMMS0al/
               LZV3BxxMa7vYk6JtRFUaMdMwwsSa319n2WXKHlqZksWk4H5gC8AH5Vpdex44SKP4
               GYVh0MO5kIS07yHfuv66PWsTRQiIHQSHYe33Dot/Mfs9BT/sVm1qRJ1ZO5GAf136
               3iQhwf8fa0PdYGfmN9I1yQMneet3W3k9T4J86mp4RuYl44Z0sv1p3oDCcuiVRgbF
               ro0dL8n7gE6fW8Hj5tnZQxYzFCwUqy8nhab+MwpOsoACOM8WvULnaMgPdflEklQT
               VL0=
               -----END CERTIFICATE-----"

  return admin:cluster-set-xdqp-ssl-certificate($cfg, $cert)
 
  (: Sets the SSL certificate for the cluster.  Use admin:save-configuration to save the 
     changes to the configuration or pass the configuration to other Admin API functions 
     to make other changes. :) 
    

admin:foreign-cluster-create(
$config as element(configuration),
$cluster-id as xs:unsignedLong,
$cluster-name as xs:string,
$xdqp-timeout as xs:unsignedInt?,
$host-timeout as xs:unsignedInt?,
$ssl-certificate as xs:string?,
$xdqp-ssl-enabled as xs:boolean?,
$xdqp-ssl-allow-sslv3 as xs:boolean?,
$xdqp-ssl-allow-tls as xs:boolean?,
$xdqp-ssl-ciphers as xs:string?,
$foreign-bootstrap-hosts as element(cl:foreign-host)*
)  as   element(configuration)
Summary:

This function creates a complete configuration for a foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster, obtained by running the admin:cluster-get-id function on the foreign cluster.
$cluster-name : The name of the foreign cluster.
$xdqp-timeout : The XDQP timeout setting (in seconds) for the foreign cluster.
$host-timeout : the host timeout setting (in seconds) for the foreign cluster.
$ssl-certificate : The SSL certificate returned by the admin:cluster-get-xdqp-ssl-certificate function on the foreign cluster.
$xdqp-ssl-enabled : Specify fn:true() to enable SSL for the foreign cluster or fn:false() to disable SSL.
$xdqp-ssl-allow-sslv3 : Specify fn:true() to enable the SSL v3 protocol for the foreign cluster or fn:false() to disable the SSL v3 protocol.
$xdqp-ssl-allow-tls : Specify fn:true() to enable the TLS protocol for the foreign cluster or fn:false() to disable the TLS protocol.
$xdqp-ssl-ciphers : The SSL ciphers to set. This can be any standard cipher specification string for OpenSSL.
$foreign-bootstrap-hosts : The boot strap host configuration returned from the admin:foreign-host function. You can specify multiple bootstrap hosts on a cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()

  (: Obtain foreign cluster id by running admin:cluster-get-id on the foreign cluster. :)
  let $fcl := 15499567556358534770

  let $cert := "----BEGIN CERTIFICATE-----
               MIICzjCCAbagAwIBAgIJAMieG0IJQAWQMA0GCSqGSIb3DQEBBQUAMB8xHTAbBgNV
               BAMTFDE3MDY0ODkwODY2NTc0NzgxNTcxMB4XDTExMDYwMjIwMjA1M1oXDTIxMDUz
               MDIwMjA1M1owHzEdMBsGA1UEAxMUMTcwNjQ4OTA4NjY1NzQ3ODE1NzEwggEiMA0G
               CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPM9XLSbmVN1Fykz523I7H9Cq4zgO9
               cUSHI/FArYnWNXUbJIesvDifu2DggfsE7HD6Glwa1ZvkVTBDyZhYv1MZMpBy18Au
               9McoBbl9NYHOIhtM6bHTJAWNDoHi+TL/rFJzxo5h+bC/JnOjbE40MZKkzSzV944t
               LbpYT3JfGtMJgcCEWqVLp7vkSRUsKCPuJdPpFfMixDaLA75+W9PVdm01jDvihrgr
               CZkVjlMzZersHYQDsuNNWwt/9fM1skKabVWUVB0vHV307j2JHwVUJS3+hVxSiT61
               GaIO3GSL6dVI5ZlYZCCyyFNc0cqPutu0Q3MfZq6MpFlt5Iffm0cWwSkvAgMBAAGj
               DTALMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQEFBQADggEBAIKRSFrk3a7JBl9bBsBb
               sWxob3eVM4wh8f6EPjdiIZL0V7HH4dH2hdcvtXB0NdMntiTeJfjm/tdzzMMS0al/
               LZV3BxxMa7vYk6JtRFUaMdMwwsSa319n2WXKHlqZksWk4H5gC8AH5Vpdex44SKP4
               GYVh0MO5kIS07yHfuv66PWsTRQiIHQSHYe33Dot/Mfs9BT/sVm1qRJ1ZO5GAf136
               3iQhwf8fa0PdYGfmN9I1yQMneet3W3k9T4J86mp4RuYl44Z0sv1p3oDCcuiVRgbF
               ro0dL8n7gE6fW8Hj5tnZQxYzFCwUqy8nhab+MwpOsoACOM8WvULnaMgPdflEklQT
               VL0=
               -----END CERTIFICATE-----"

 let $host := admin:foreign-host(13134636216063499728, "master.marklogic.com", 7998)
 
 return admin:foreign-cluster-create($cfg, $fcl, "master", 15, 35, $cert, fn:true(),
                                     fn:false(), fn:false(), "All", $host) 

  (: Creates a complete configuration for the foreign cluster. Use 
     admin:save-configuration to save the changes to the configuration or 
     pass the configuration to other Admin API functions to make other changes. :) 
    

admin:foreign-cluster-delete(
$config as element(configuration),
$cluster-id as xs:unsignedLong
)  as   element(configuration)
Summary:

This function deletes the configuration for the specified foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return  admin:foreign-cluster-delete($cfg, $fcl)

  (: Deletes the configuration for the specified foreign cluster.  Use 
     admin:save-configuration to save the changes to the configuration 
     or pass the configuration to other Admin API functions to make 
     other changes. :) 
    

admin:foreign-cluster-get-bootstrap-hosts(
$config as element(configuration),
$cluster-id as xs:unsignedLong
)  as   element(cl:foreign-host)*
Summary:

This function returns one or more configuration elements that identify the bootstrap hosts on the specified foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return admin:foreign-cluster-get-bootstrap-hosts($cfg, $fcl)

  (: Returns configuration information on the bootstrap hosts on the 
     foreign cluster. :)
    

admin:foreign-cluster-get-host-timeout(
$config as element(configuration),
$cluster-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the timeout period (in seconds) for communication between domestic hosts and hosts in the specified foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return admin:foreign-cluster-get-host-timeout($cfg, $fcl)

  (: Returns the host timeout period set in the foreign cluster. :)
    

admin:foreign-cluster-get-name(
$config as element(configuration),
$cluster-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the name of the foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return  admin:foreign-cluster-get-name($cfg, $fcl)
  
  (: Returns the name of the foreign cluster. :)
    

admin:foreign-cluster-get-ssl-certificate(
$config as element(configuration),
$cluster-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the SSL certificate used to communicate with hosts in the foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return admin:foreign-cluster-get-ssl-certificate($cfg, $fcl)

  (: Returns the SSL certificate used to communicate with the foreign cluster. :)
    

admin:foreign-cluster-get-xdqp-ssl-allow-sslv3(
$config as element(configuration),
$cluster-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns true if the SSL v3 protocol is enabled for the foreign cluster. Otherwise, false is returned.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return admin:foreign-cluster-get-xdqp-ssl-allow-sslv3($cfg, $fcl)

  (: Returns 'true' if the SSL v3 protocol is enabled for the foreign cluster.  
     Otherwise, 'false'. :)
    

admin:foreign-cluster-get-xdqp-ssl-allow-tls(
$config as element(configuration),
$cluster-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns true if the TLS protocol is enabled for the foreign cluster. Otherwise, false is returned.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return admin:foreign-cluster-get-xdqp-ssl-allow-tls($cfg, $fcl)

  (: Returns 'true' if the TLS protocol is enabled for the foreign cluster.  
     Otherwise, 'false'. :)
    

admin:foreign-cluster-get-xdqp-ssl-ciphers(
$config as element(configuration),
$cluster-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the SSL ciphers set for the specified foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return admin:foreign-cluster-get-xdqp-ssl-ciphers($cfg, $fcl)

  (: Returns the ciphers set for the specified foreign cluster.  :) 
    

admin:foreign-cluster-get-xdqp-ssl-enabled(
$config as element(configuration),
$cluster-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns true if SSL is enabled for the foreign cluster. Otherwise, false is returned.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return admin:foreign-cluster-get-xdqp-ssl-enabled($cfg, $fcl)

  (: Returns 'true' if SSL is enabled for the foreign cluster. Otherwise, 'false'. :)
    

admin:foreign-cluster-get-xdqp-timeout(
$config as element(configuration),
$cluster-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the timeout setting (in seconds) for XDQP communication between data nodes and evaluator nodes in the domestic cluster and their counterparts in the foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return  admin:foreign-cluster-get-xdqp-timeout($cfg, $fcl)

  (: Returns the XDQP timeout setting for the foreign cluster. :) 
    

admin:foreign-cluster-replace(
$config as element(configuration),
$cluster-id as xs:unsignedLong,
$cluster-name as xs:string,
$xdqp-timeout as xs:unsignedInt?,
$host-timeout as xs:unsignedInt?,
$ssl-certificate as xs:string?,
$xdqp-ssl-enabled as xs:boolean?,
$xdqp-ssl-allow-sslv3 as xs:boolean?,
$xdqp-ssl-allow-tls as xs:boolean?,
$xdqp-ssl-ciphers as xs:string?,
$foreign-bootstrap-hosts as element(cl:foreign-host)*
)  as   element(configuration)
Summary:

This function replaces a configuration for a foreign cluster with a new configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.
$cluster-name : The name of the foreign cluster.
$xdqp-timeout : The XDQP timeout setting (in seconds) for the foreign cluster.
$host-timeout : the host timeout setting (in seconds) for the foreign cluster.
$ssl-certificate : The SSL certificate returned by the admin:cluster-get-xdqp-ssl-certificate function on the foreign cluster.
$xdqp-ssl-enabled : Specify fn:true() to enable SSL for the foreign cluster or fn:false() to disable SSL.
$xdqp-ssl-allow-sslv3 : Specify fn:true() to enable the SSL v3 protocol for the foreign cluster or fn:false() to disable the SSL v3 protocol.
$xdqp-ssl-allow-tls : Specify fn:true() to enable the TLS protocol for the foreign cluster or fn:false() to disable the TLS protocol.
$xdqp-ssl-ciphers : The SSL ciphers to set. This can be any standard cipher specification string for OpenSSL.
$foreign-bootstrap-hosts : The boot strap host configuration returned from the admin:foreign-host function. You can specify multiple bootstrap hosts on a cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")

  let $cert := "----BEGIN CERTIFICATE-----
               MIICzjCCAbagAwIBAgIJAMieG0IJQAWQMA0GCSqGSIb3DQEBBQUAMB8xHTAbBgNV
               BAMTFDE3MDY0ODkwODY2NTc0NzgxNTcxMB4XDTExMDYwMjIwMjA1M1oXDTIxMDUz
               MDIwMjA1M1owHzEdMBsGA1UEAxMUMTcwNjQ4OTA4NjY1NzQ3ODE1NzEwggEiMA0G
               CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPM9XLSbmVN1Fykz523I7H9Cq4zgO9
               cUSHI/FArYnWNXUbJIesvDifu2DggfsE7HD6Glwa1ZvkVTBDyZhYv1MZMpBy18Au
               9McoBbl9NYHOIhtM6bHTJAWNDoHi+TL/rFJzxo5h+bC/JnOjbE40MZKkzSzV944t
               LbpYT3JfGtMJgcCEWqVLp7vkSRUsKCPuJdPpFfMixDaLA75+W9PVdm01jDvihrgr
               CZkVjlMzZersHYQDsuNNWwt/9fM1skKabVWUVB0vHV307j2JHwVUJS3+hVxSiT61
               GaIO3GSL6dVI5ZlYZCCyyFNc0cqPutu0Q3MfZq6MpFlt5Iffm0cWwSkvAgMBAAGj
               DTALMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQEFBQADggEBAIKRSFrk3a7JBl9bBsBb
               sWxob3eVM4wh8f6EPjdiIZL0V7HH4dH2hdcvtXB0NdMntiTeJfjm/tdzzMMS0al/
               LZV3BxxMa7vYk6JtRFUaMdMwwsSa319n2WXKHlqZksWk4H5gC8AH5Vpdex44SKP4
               GYVh0MO5kIS07yHfuv66PWsTRQiIHQSHYe33Dot/Mfs9BT/sVm1qRJ1ZO5GAf136
               3iQhwf8fa0PdYGfmN9I1yQMneet3W3k9T4J86mp4RuYl44Z0sv1p3oDCcuiVRgbF
               ro0dL8n7gE6fW8Hj5tnZQxYzFCwUqy8nhab+MwpOsoACOM8WvULnaMgPdflEklQT
               VL0=
               -----END CERTIFICATE-----"

 let $host := admin:foreign-host(13134636216063499728, "master.marklogic.com", 7998)
 
 return admin:foreign-cluster-replace($cfg, $fcl, "master", 15, 35, $cert, fn:true(),
                                      fn:false(), fn:false(), "All", $host) 

  (: Replaces an existing configuration for the foreign cluster. Use 
     admin:save-configuration to save the changes to the configuration 
     or pass the configuration to other Admin API functions to make other changes. :)
    

admin:foreign-cluster-set-bootstrap-hosts(
$config as element(configuration),
$cluster-id as xs:unsignedLong,
$bootstrap-hosts as element(cl:foreign-host)*
)  as   element(configuration)
Summary:

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.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.
$bootstrap-hosts : The boot strap host configuration returned from the admin:foreign-host function. You can specify multiple bootstrap hosts on a cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  let $host := admin:foreign-host(13134636216063499728,
                                  "master.marklogic.com",
                                  7998)

  return admin:foreign-cluster-set-bootstrap-hosts($cfg, $fcl, $host)

  (: Sets 'master.marklogic.com' as the bootstrap host for the foreign cluster.  Use 
     admin:save-configuration to save the changes to the configuration or pass the 
     configuration to other Admin API functions to make other changes. :)
    

admin:foreign-cluster-set-host-timeout(
$config as element(configuration),
$cluster-id as xs:unsignedLong,
$host-timeout as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the timeout period (in seconds) for communication between domestic hosts and hosts in the specified foreign cluster. By default, the host timeout setting is 30 seconds.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.
$host-timeout : The timeout setting (in seconds).

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return  admin:foreign-cluster-set-host-timeout($cfg, $fcl, 50)
  
  (: Sets the host timeout period for the foreign cluster to 50 seconds. Use 
     admin:save-configuration to save the changes to the configuration or pass 
     the configuration to other Admin API functions to make other changes. :)
    

admin:foreign-cluster-set-name(
$config as element(configuration),
$cluster-id as xs:unsignedLong,
$cluster-name as xs:string
)  as   element(configuration)
Summary:

This function sets the name of a foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.
$cluster-name : The name to be set for the foreign cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return  admin:foreign-cluster-set-name($cfg, $fcl, "replca")
 
  (: Sets the name of the 'ClusterA' foreign cluster to 'replica'.  Use 
     admin:save-configuration to save the changes to the configuration or 
     pass the configuration to other Admin API functions to make other changes. :) 
    

admin:foreign-cluster-set-ssl-certificate(
$config as element(configuration),
$cluster-id as xs:unsignedLong,
$ssl-certificate as xs:string?
)  as   element(configuration)
Summary:

This function sets the specified SSL certificate for secure communication with hosts in a foreign cluster. This certificate is shared by all hosts in the cluster when communicating with foreign hosts.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.
$ssl-certificate : The SSL certificate returned by the admin:cluster-get-xdqp-ssl-certificate function on the foreign cluster.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  let $cert := "----BEGIN CERTIFICATE-----
               MIICzjCCAbagAwIBAgIJAMieG0IJQAWQMA0GCSqGSIb3DQEBBQUAMB8xHTAbBgNV
               BAMTFDE3MDY0ODkwODY2NTc0NzgxNTcxMB4XDTExMDYwMjIwMjA1M1oXDTIxMDUz
               MDIwMjA1M1owHzEdMBsGA1UEAxMUMTcwNjQ4OTA4NjY1NzQ3ODE1NzEwggEiMA0G
               CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPM9XLSbmVN1Fykz523I7H9Cq4zgO9
               cUSHI/FArYnWNXUbJIesvDifu2DggfsE7HD6Glwa1ZvkVTBDyZhYv1MZMpBy18Au
               9McoBbl9NYHOIhtM6bHTJAWNDoHi+TL/rFJzxo5h+bC/JnOjbE40MZKkzSzV944t
               LbpYT3JfGtMJgcCEWqVLp7vkSRUsKCPuJdPpFfMixDaLA75+W9PVdm01jDvihrgr
               CZkVjlMzZersHYQDsuNNWwt/9fM1skKabVWUVB0vHV307j2JHwVUJS3+hVxSiT61
               GaIO3GSL6dVI5ZlYZCCyyFNc0cqPutu0Q3MfZq6MpFlt5Iffm0cWwSkvAgMBAAGj
               DTALMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQEFBQADggEBAIKRSFrk3a7JBl9bBsBb
               sWxob3eVM4wh8f6EPjdiIZL0V7HH4dH2hdcvtXB0NdMntiTeJfjm/tdzzMMS0al/
               LZV3BxxMa7vYk6JtRFUaMdMwwsSa319n2WXKHlqZksWk4H5gC8AH5Vpdex44SKP4
               GYVh0MO5kIS07yHfuv66PWsTRQiIHQSHYe33Dot/Mfs9BT/sVm1qRJ1ZO5GAf136
               3iQhwf8fa0PdYGfmN9I1yQMneet3W3k9T4J86mp4RuYl44Z0sv1p3oDCcuiVRgbF
               ro0dL8n7gE6fW8Hj5tnZQxYzFCwUqy8nhab+MwpOsoACOM8WvULnaMgPdflEklQT
               VL0=
               -----END CERTIFICATE-----"

  return admin:foreign-cluster-set-ssl-certificate($cfg, $fcl, $cert)

  (: Sets the SSL certificate for communication with the foreign cluster. Use 
     admin:save-configuration to save the changes to the configuration or pass 
     the configuration to other Admin API functions to make other changes. :) 
    

admin:foreign-cluster-set-xdqp-ssl-allow-sslv3(
$config as element(configuration),
$cluster-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function enables or disables the SSL v3 protocol for the specified foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.
$value : Specify fn:true() to enable the SSL v3 protocol for the foreign cluster or fn:false() to disable the SSL v3 protocol.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return admin:foreign-cluster-set-xdqp-ssl-allow-sslv3($cfg, $fcl, fn:false())

  (: Disables the SSL v3 protocol on the foreign cluster.  Use admin:save-configuration 
     to save the changes to the configuration or pass the configuration to other Admin 
     API functions to make other changes. :) 
    

admin:foreign-cluster-set-xdqp-ssl-allow-tls(
$config as element(configuration),
$cluster-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function enables or disables the TLS protocol for the specified foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.
$value : Specify fn:true() to enable the TLS protocol for the foreign cluster or fn:false() to disable the TLS protocol.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return admin:foreign-cluster-set-xdqp-ssl-allow-tls($cfg, $fcl, fn:true())
 
 (: Enables the TLS protocol on the foreign cluster. Use admin:save-configuration to save the 
    changes to the configuration or pass the configuration to other Admin API functions 
    to make other changes. :)
    

admin:foreign-cluster-set-xdqp-ssl-ciphers(
$config as element(configuration),
$cluster-id as xs:unsignedLong,
$value as xs:string
)  as   element(configuration)
Summary:

This function sets SSL ciphers for the specified foreign cluster. The value parameter can be any standard cipher specification string for OpenSSL.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.
$value : The SSL ciphers to set.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return admin:foreign-cluster-set-xdqp-ssl-ciphers($cfg, $fcl, "All")

  (: Sets the ciphers for the foreign cluster to "All". Use admin:save-configuration to 
     save the changes to the configuration or pass the configuration to other Admin API 
     functions to make other changes. :)
    

admin:foreign-cluster-set-xdqp-ssl-enabled(
$config as element(configuration),
$cluster-id as xs:unsignedLong,
$value as xs:boolean
)  as   element(configuration)
Summary:

This function enables or disables SSL for the foreign cluster.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.
$value : Specify fn:true() to enable SSL for the foreign cluster or fn:false() to disable SSL.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return admin:foreign-cluster-set-xdqp-ssl-enabled($cfg, $fcl, fn:false())

  (: Disables SSL on the foreign cluster. Use admin:save-configuration to save the 
     changes to the configuration or pass the configuration to other Admin API functions 
     to make other changes. :)
    

admin:foreign-cluster-set-xdqp-timeout(
$config as element(configuration),
$cluster-id as xs:unsignedLong,
$xdqp-timeout as xs:unsignedInt
)  as   element(configuration)
Summary:

This function sets the timeout (in seconds) for XDQP communication between data nodes and evaluator nodes in the domestic cluster and their counterparts in the foreign cluster. By default, the XDQP timeout setting is 10 seconds.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$cluster-id : The id of the foreign cluster.
$xdqp-timeout : The timeout setting (in seconds).

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  
  return  admin:foreign-cluster-set-xdqp-timeout($cfg, $fcl, 20)
 
  (: Sets the XDQP timeout setting for the foreign cluster to 20 seconds. Use 
     admin:save-configuration to save the changes to the configuration or pass 
     the configuration to other Admin API functions to make other changes. :):)
    

admin:foreign-host(
$host-id as xs:unsignedLong,
$host-name as xs:string,
$connect-port as xs:unsignedInt
)  as   element(cl:foreign-host)
Summary:

This function configures a foreign host to be set by the admin:foreign-cluster-set-bootstrap-hosts function as the bootstrap host for the foreign cluster.

Parameters:
$host-id : The id of the foreign host.
$host-name : The name of the foreign host.
$connect-port : The port on which the foreign bootstrap host will listen for connections. This should be port 7998 in most situations.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")

  return admin:foreign-host(13134636216063499728,
                            "master.marklogic.com",
                            7998)
 
 (: Configures a host to be used as a foreign cluster bootstrap host. :)
    

admin:foreign-host-get-connect-port(
$fh as element(cl:foreign-host)
)  as   xs:unsignedInt
Summary:

This function returns the number of the port configured for the foreign bootstrap host.

Parameters:
$fh : The foreign host configuration element returned by the admin:foreign-host or admin:foreign-cluster-get-bootstrap-hosts function.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  let $fh := admin:foreign-cluster-get-bootstrap-hosts($cfg, $fcl)
  
  return admin:foreign-host-get-connect-port($fh)
 
 (: Returns the number of the port configured for the foreign bootstrap host. :)
    

admin:foreign-host-get-id(
$fh as element(cl:foreign-host)
)  as   xs:unsignedLong
Summary:

This function returns the id of the foreign bootstrap host.

Parameters:
$fh : The foreign host configuration element returned by the admin:foreign-host or admin:foreign-cluster-get-bootstrap-hosts function.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  let $fh := admin:foreign-cluster-get-bootstrap-hosts($cfg, $fcl)
  
  return admin:foreign-host-get-id($fh)
 
  (: Returns the id of the foreign bootstrap host. :)
    

admin:foreign-host-get-name(
$fh as element(cl:foreign-host)
)  as   xs:string
Summary:

This function returns the name of the foreign bootstrap host.

Parameters:
$fh : The foreign host configuration element returned by the admin:foreign-host or admin:foreign-cluster-get-bootstrap-hosts function.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
 
  let $cfg := admin:get-configuration()
  let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
  let $fh := admin:foreign-cluster-get-bootstrap-hosts($cfg, $fcl)
  
  return admin:foreign-host-get-name($fh)

  (: Returns the name of the foreign bootstrap host. :)
    

admin:host-get-foreign-port(
$config as element(configuration),
$host-id as xs:unsignedLong
)  as   xs:unsignedInt
Summary:

This function returns the port used by the specified host to listen for communications from foreign hosts.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$host-id : The id of the domestic host.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $hid := xdmp:host("master.marklogic.com")
  
  return admin:host-get-foreign-port($cfg, $hid)

  (: Returns the port used by the specified host to listen for foreign 
     communications. :)  
    

admin:host-set-foreign-port(
$config as element(configuration),
$host-id as xs:unsignedLong,
$value as xs:unsignedInt
)  as   element(configuration)
Summary:

This function configures the specified domestic host to listen for communications from foreign hosts over the specified port.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$host-id : The id of the domestic host.
$value : The port number on which to listen for communications.

Example:
  xquery version "1.0-ml"; 
 
  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $hid := xdmp:host("master.marklogic.com")
  
  return admin:host-set-foreign-port($cfg, $hid, 7998)

  (: Configures the specified host to listen for foreign communications over
     port 7998.  Use admin:save-configuration to save the changes to the 
     configuration or pass the configuration to other Admin API functions 
     to make other changes. :)