What is the parameter $instance_id in the function Block::setVisibilityConfig? I need to programatically set the visibility of a block. I've loaded the block, and I know I need to use the Block::setVisibilityConfig method, but I don't know what the $instance_id variable is.

Does anyone know what to pass here to the function?
I got it. Example:

use Drupal\block\Entity\Block;

function mytheme_preprocess_html(&amp;$variables)
{
    $block = Block::load('sitebranding');
    $block-&gt;setRegion('content');

    $visibility = $block-&gt;getVisibility();

    if (isset($visibility['request_path']['pages']))
    {
       unset($visibility['request_path']['pages']);
       $visibility['request_path']['negate'] = 0; 
       // $visibility['request_path']['pages'] = '/node/2';
       $visibility['request_path']['pages'] = \Drupal::config('mymodule.settings')-&gt;get('services_block_path_visibility');
       $block-&gt;setVisibilityConfig('request_path', $visibility['request_path']);
       $block-&gt;save();
    }
}