class_docstr: Amazon SageMaker model monitor to monitor feature attribution of an endpoint.
  
  Please see the __init__ method of its base class for how to instantiate it.
class_docstr_tok: ["Amazon","SageMaker","model","monitor","to","monitor","feature","attribution","of","an","endpoint",".","Please","see","the","__init__","method","of","its","base","class","for","how","to","instantiate","it","."]
docstr: Updates the existing monitoring schedule.
  
  If more options than schedule_cron_expression are to be updated, a new job definition will
  be created to hold them. The old job definition will not be deleted.
  
  Args:
      endpoint_input (str or sagemaker.model_monitor.EndpointInput): The endpoint to monitor.
          This can either be the endpoint name or an EndpointInput.
      analysis_config (str or BiasAnalysisConfig): URI to analysis_config for the bias job.
          If it is None then configuration of the latest baselining job will be reused, but
          if no baselining job then fail the call.
      output_s3_uri (str): S3 destination of the constraint_violations and analysis result.
          Default: "s3://<default_session_bucket>/<job_name>/output"
      constraints (sagemaker.model_monitor.Constraints or str): If provided it will be used
          for monitoring the endpoint. It can be a Constraints object or an S3 uri pointing
          to a constraints JSON file.
      schedule_cron_expression (str): The cron expression that dictates the frequency that
          this job run. See sagemaker.model_monitor.CronExpressionGenerator for valid
          expressions. Default: Daily.
      enable_cloudwatch_metrics (bool): Whether to publish cloudwatch metrics as part of
          the baselining or monitoring jobs.
      role (str): An AWS IAM role. The Amazon SageMaker jobs use this role.
      instance_count (int): The number of instances to run
          the jobs with.
      instance_type (str): Type of EC2 instance to use for
          the job, for example, 'ml.m5.xlarge'.
      volume_size_in_gb (int): Size in GB of the EBS volume
          to use for storing data during processing (default: 30).
      volume_kms_key (str): A KMS key for the job's volume.
      output_kms_key (str): The KMS key id for the job's outputs.
      max_runtime_in_seconds (int): Timeout in seconds. After this amount of
          time, Amazon SageMaker terminates the job regardless of its current status.
          Default: 3600
      env (dict): Environment variables to be passed to the job.
      network_config (sagemaker.network.NetworkConfig): A NetworkConfig
          object that configures network isolation, encryption of
          inter-container traffic, security group IDs, and subnets.
      batch_transform_input (sagemaker.model_monitor.BatchTransformInput): Inputs to
          run the monitoring schedule on the batch transform
      data_analysis_start_time (str): Start time for the data analysis window
          for the one time monitoring schedule (NOW), e.g. "-PT1H" (default: None)
      data_analysis_end_time (str): End time for the data analysis window
          for the one time monitoring schedule (NOW), e.g. "-PT1H" (default: None)
code: def update_monitoring_schedule(
      self,
      endpoint_input=None,
      analysis_config=None,
      output_s3_uri=None,
      constraints=None,
      schedule_cron_expression=None,
      enable_cloudwatch_metrics=None,
      role=None,
      instance_count=None,
      instance_type=None,
      volume_size_in_gb=None,
      volume_kms_key=None,
      output_kms_key=None,
      max_runtime_in_seconds=None,
      env=None,
      network_config=None,
      batch_transform_input=None,
      data_analysis_start_time=None,
      data_analysis_end_time=None,
  ):
      """Updates the existing monitoring schedule.
  
      If more options than schedule_cron_expression are to be updated, a new job definition will
      be created to hold them. The old job definition will not be deleted.
  
      Args:
          endpoint_input (str or sagemaker.model_monitor.EndpointInput): The endpoint to monitor.
              This can either be the endpoint name or an EndpointInput.
          analysis_config (str or BiasAnalysisConfig): URI to analysis_config for the bias job.
              If it is None then configuration of the latest baselining job will be reused, but
              if no baselining job then fail the call.
          output_s3_uri (str): S3 destination of the constraint_violations and analysis result.
              Default: "s3://<default_session_bucket>/<job_name>/output"
          constraints (sagemaker.model_monitor.Constraints or str): If provided it will be used
              for monitoring the endpoint. It can be a Constraints object or an S3 uri pointing
              to a constraints JSON file.
          schedule_cron_expression (str): The cron expression that dictates the frequency that
              this job run. See sagemaker.model_monitor.CronExpressionGenerator for valid
              expressions. Default: Daily.
          enable_cloudwatch_metrics (bool): Whether to publish cloudwatch metrics as part of
              the baselining or monitoring jobs.
          role (str): An AWS IAM role. The Amazon SageMaker jobs use this role.
          instance_count (int): The number of instances to run
              the jobs with.
          instance_type (str): Type of EC2 instance to use for
              the job, for example, 'ml.m5.xlarge'.
          volume_size_in_gb (int): Size in GB of the EBS volume
              to use for storing data during processing (default: 30).
          volume_kms_key (str): A KMS key for the job's volume.
          output_kms_key (str): The KMS key id for the job's outputs.
          max_runtime_in_seconds (int): Timeout in seconds. After this amount of
              time, Amazon SageMaker terminates the job regardless of its current status.
              Default: 3600
          env (dict): Environment variables to be passed to the job.
          network_config (sagemaker.network.NetworkConfig): A NetworkConfig
              object that configures network isolation, encryption of
              inter-container traffic, security group IDs, and subnets.
          batch_transform_input (sagemaker.model_monitor.BatchTransformInput): Inputs to
              run the monitoring schedule on the batch transform
          data_analysis_start_time (str): Start time for the data analysis window
              for the one time monitoring schedule (NOW), e.g. "-PT1H" (default: None)
          data_analysis_end_time (str): End time for the data analysis window
              for the one time monitoring schedule (NOW), e.g. "-PT1H" (default: None)
      """
      valid_args = {
          arg: value
          for arg, value in locals().items()
          if arg != "self" and value is not None
      }
  
      # Nothing to update
      if len(valid_args) <= 0:
          raise ValueError("Nothing to update.")
  
      if (
          batch_transform_input is not None
          and endpoint_input is not None
      ):
          message = (
              "Need to have either batch_transform_input or endpoint_input to create an "
              "Amazon Model Monitoring Schedule. "
              "Please provide only one of the above required inputs"
          )
          logger.error(message)
          raise ValueError(message)
  
      # Only need to update schedule expression
      if len(valid_args) == 1 and schedule_cron_expression is not None:
          self._update_monitoring_schedule(
              self.job_definition_name, schedule_cron_expression
          )
          return
  
      # Need to update schedule with a new job definition
      job_desc = self.sagemaker_session.sagemaker_client.describe_model_explainability_job_definition(
          JobDefinitionName=self.job_definition_name
      )
      new_job_definition_name = name_from_base(
          self.JOB_DEFINITION_BASE_NAME
      )
      request_dict = self._build_create_job_definition_request(
          monitoring_schedule_name=self.monitoring_schedule_name,
          job_definition_name=new_job_definition_name,
          image_uri=self.image_uri,
          existing_job_desc=job_desc,
          endpoint_input=endpoint_input,
          analysis_config=analysis_config,
          output_s3_uri=output_s3_uri,
          constraints=constraints,
          enable_cloudwatch_metrics=enable_cloudwatch_metrics,
          role=role,
          instance_count=instance_count,
          instance_type=instance_type,
          volume_size_in_gb=volume_size_in_gb,
          volume_kms_key=volume_kms_key,
          output_kms_key=output_kms_key,
          max_runtime_in_seconds=max_runtime_in_seconds,
          env=env,
          tags=self.tags,
          network_config=network_config,
          batch_transform_input=batch_transform_input,
      )
      self.sagemaker_session.sagemaker_client.create_model_explainability_job_definition(
          **request_dict
      )
      try:
          self._update_monitoring_schedule(
              new_job_definition_name,
              schedule_cron_expression,
              data_analysis_start_time=data_analysis_start_time,
              data_analysis_end_time=data_analysis_end_time,
          )
          self.job_definition_name = new_job_definition_name
          if role is not None:
              self.role = role
          if instance_count is not None:
              self.instance_count = instance_count
          if instance_type is not None:
              self.instance_type = instance_type
          if volume_size_in_gb is not None:
              self.volume_size_in_gb = volume_size_in_gb
          if volume_kms_key is not None:
              self.volume_kms_key = volume_kms_key
          if output_kms_key is not None:
              self.output_kms_key = output_kms_key
          if max_runtime_in_seconds is not None:
              self.max_runtime_in_seconds = max_runtime_in_seconds
          if env is not None:
              self.env = env
          if network_config is not None:
              self.network_config = network_config
      except Exception:
          logger.exception("Failed to update monitoring schedule.")
          # noinspection PyBroadException
          try:
              self.sagemaker_session.sagemaker_client.delete_model_explainability_job_definition(
                  JobDefinitionName=new_job_definition_name
              )
          except Exception:  # pylint: disable=W0703
              message = "Failed to delete job definition {}.".format(
                  new_job_definition_name
              )
              logger.exception(message)
          raise
  
imports: from __future__ import print_function, absolute_import
  import copy
  import json
  import logging
  import uuid
  from sagemaker.model_monitor import model_monitoring
  from sagemaker import image_uris, s3
  from sagemaker.session import Session
  from sagemaker.utils import name_from_base, format_tags
  from sagemaker.clarify import SageMakerClarifyProcessor, ModelPredictedLabelConfig
  from sagemaker.lineage._utils import get_resource_name_from_arn
label_desc: Use image node_id 4 for calling the ModelExplainabilityMonitor obj's underlying member method code with example usage: obj.update_monitoring_schedule(endpoint_input, analysis_config, output_s3_uri, constraints, schedule_cron_expression, enable_cloudwatch_metrics, role, instance_count, instance_type, volume_size_in_gb, volume_kms_key, output_kms_key, max_runtime_in_seconds, env, network_config, batch_transform_input, data_analysis_start_time, data_analysis_end_time) without return types