How do I limit use of Simple XML Sitemap to certain roles?
I found the answer based on this drupal.org comment.
You have to use hook_node_insert().
/**
 * Implements hook_node_insert() for MYMODULE.
 */
function MYMODULE_node_insert(EntityInterface $node) {
  switch ($node-&gt;getType()) {
    case 'page':
      $user = Drupal::currentUser();
      if (!$user-&gt;hasPermission('administer content')) {
        // Turn off Simple XML sitemap.
        $generator = \Drupal::service('simple_sitemap.generator');
        $generator-&gt;setEntityInstanceSettings('node', $node-&gt;id(), ['index' =&gt; FALSE]);
      }
      break;
  }
}