MarkLogic 12 Product Documentation
admin.groupSetAllowDynamicHosts

admin.groupSetAllowDynamicHosts(
   config as element(configuration),
   group-id as (Number|String),
   value as Boolean
) as element(configuration)

Summary

Enables or disables the ability of a group to accept new dynamic hosts from joining this group. Dynamic hosts can only join groups with the allow dynamic hosts option turned on.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
group-id The ID of the group to which the dynamic host will be added.
value When setting the value to true, the group will accept new dynamic hosts to join this group. When setting the value to false, the group will not accept new dynamic hosts to join this group.

Required Privileges

This operation requires the following privilege:

http://marklogic.com/xdmp/privileges/admin/group

http://marklogic.com/xdmp/privileges/admin/group/{id}

Example


  const admin = require('/MarkLogic/admin.xqy');
  const config = admin.getConfiguration();
  const groupid = admin.groupGetId(config, "Default");

  admin.groupSetAllowDynamicHosts(config, groupid, true);
  // Returns the new configuration element -- use admin.saveConfiguration to save
  // the changes to the configuration or pass the configuration to other Admin API
  // functions to make other changes.
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy