text: import json, subprocess
  from .... pyaz_utils import get_cli_name, get_params
  
  
  def create(resource_group, account_name, database_name, container_name, name, body, type=None, operation=None):
      params = get_params(locals())   
      command = "az cosmosdb sql trigger create " + 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 update(resource_group, account_name, database_name, container_name, name, body=None, type=None, operation=None):
      params = get_params(locals())   
      command = "az cosmosdb sql trigger update " + 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 list(resource_group, account_name, database_name, container_name):
      params = get_params(locals())   
      command = "az cosmosdb sql trigger list " + 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 show(resource_group, account_name, database_name, container_name, name):
      params = get_params(locals())   
      command = "az cosmosdb sql trigger show " + 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 delete(resource_group, account_name, database_name, container_name, name, yes=None):
      params = get_params(locals())   
      command = "az cosmosdb sql trigger delete " + 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)  
  