Loading TOC...

MarkLogic 10 Product Documentation
admin.appserverSetSslCertificateTemplate

admin.appserverSetSslCertificateTemplate(
   config as element(configuration),
   appserver-id as (Number|String),
   value as (Number|String)
) as element(configuration)

Summary

This function sets an SSL certificate template for the specified App Server.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
appserver-id The ID of the App Server. Typically, this is the result of an admin.appserverGetId call.
value The ID of the certificate template. This would typically be the result of a pki.insertTemplate(pki.createTemplate()) call.

Required Privileges

This operation requires at least one of the following privileges:

http://marklogic.com/xdmp/privileges/admin/app-server-security

http://marklogic.com/xdmp/privileges/admin/app-server-security/{id}

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

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

Example


  let pki = require("/MarkLogic/pki.xqy")
  let admin = require("/MarkLogic/admin.xqy")

  let config = admin.getConfiguration()
  let appServer = admin.appserverGetId(config,
          admin.groupGetId(config, "Default"),
          "myAppServer")
  let tid = pki.templateGetId(fn.head(pki.getTemplateByName("temporary")))
  admin.appserverSetSslCertificateTemplate(
                          config,
                          appServer,
                          tid)

   

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.