text: import json, subprocess
  from ... pyaz_utils import get_cli_name, get_params
  
  
  def disable(resource_group, name):
      params = get_params(locals())   
      command = "az vm boot-diagnostics disable " + params
      print(command)
      output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
      stdout =  output.stdout.decode("utf-8")
      stderr = output.stderr.decode("utf-8")
      if stdout:
          return json.loads(stdout)
          print(stdout)
      else:
          raise Exception(stderr)
          print(stderr)  
  
  def enable(resource_group, name, storage=None):
      params = get_params(locals())   
      command = "az vm boot-diagnostics enable " + params
      print(command)
      output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
      stdout =  output.stdout.decode("utf-8")
      stderr = output.stderr.decode("utf-8")
      if stdout:
          return json.loads(stdout)
          print(stdout)
      else:
          raise Exception(stderr)
          print(stderr)  
  
  def get_boot_log(resource_group, name):
      params = get_params(locals())   
      command = "az vm boot-diagnostics get-boot-log " + params
      print(command)
      output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
      stdout =  output.stdout.decode("utf-8")
      stderr = output.stderr.decode("utf-8")
      if stdout:
          return json.loads(stdout)
          print(stdout)
      else:
          raise Exception(stderr)
          print(stderr)  
  
  def get_boot_log_uris(resource_group, name, expire=None):
      params = get_params(locals())   
      command = "az vm boot-diagnostics get-boot-log-uris " + params
      print(command)
      output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
      stdout =  output.stdout.decode("utf-8")
      stderr = output.stderr.decode("utf-8")
      if stdout:
          return json.loads(stdout)
          print(stdout)
      else:
          raise Exception(stderr)
          print(stderr)  
  