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: Creates a monitoring schedule.
  
  Args:
      endpoint_input (str or sagemaker.model_monitor.EndpointInput): The endpoint to monitor.
          This can either be the endpoint name or an EndpointInput. (default: None)
      analysis_config (str or ExplainabilityAnalysisConfig): URI to the analysis_config for
          the explainability 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.
      monitor_schedule_name (str): Schedule name. If not specified, the processor generates
          a default job name, based on the image name and current timestamp.
      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.
      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 create_monitoring_schedule(
      self,
      endpoint_input=None,
      analysis_config=None,
      output_s3_uri=None,
      constraints=None,
      monitor_schedule_name=None,
      schedule_cron_expression=None,
      enable_cloudwatch_metrics=True,
      batch_transform_input=None,
      data_analysis_start_time=None,
      data_analysis_end_time=None,
  ):
      """Creates a monitoring schedule.
  
      Args:
          endpoint_input (str or sagemaker.model_monitor.EndpointInput): The endpoint to monitor.
              This can either be the endpoint name or an EndpointInput. (default: None)
          analysis_config (str or ExplainabilityAnalysisConfig): URI to the analysis_config for
              the explainability 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.
          monitor_schedule_name (str): Schedule name. If not specified, the processor generates
              a default job name, based on the image name and current timestamp.
          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.
          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)
      """
      if (
          self.job_definition_name is not None
          or self.monitoring_schedule_name is not None
      ):
          message = (
              "It seems that this object was already used to create an Amazon Model "
              "Monitoring Schedule. To create another, first delete the existing one "
              "using my_monitor.delete_monitoring_schedule()."
          )
          logger.error(message)
          raise ValueError(message)
  
      if (batch_transform_input is not None) ^ (endpoint_input is 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)
  
      self._check_monitoring_schedule_cron_validity(
          schedule_cron_expression=schedule_cron_expression,
          data_analysis_start_time=data_analysis_start_time,
          data_analysis_end_time=data_analysis_end_time,
      )
  
      # create job definition
      monitor_schedule_name = self._generate_monitoring_schedule_name(
          schedule_name=monitor_schedule_name
      )
      new_job_definition_name = name_from_base(
          self.JOB_DEFINITION_BASE_NAME
      )
      request_dict = self._build_create_job_definition_request(
          monitoring_schedule_name=monitor_schedule_name,
          job_definition_name=new_job_definition_name,
          image_uri=self.image_uri,
          latest_baselining_job_name=self.latest_baselining_job_name,
          latest_baselining_job_config=self.latest_baselining_job_config,
          endpoint_input=endpoint_input,
          analysis_config=analysis_config,
          output_s3_uri=self._normalize_monitoring_output(
              monitor_schedule_name, output_s3_uri
          ).destination,
          constraints=constraints,
          enable_cloudwatch_metrics=enable_cloudwatch_metrics,
          role=self.role,
          instance_count=self.instance_count,
          instance_type=self.instance_type,
          volume_size_in_gb=self.volume_size_in_gb,
          volume_kms_key=self.volume_kms_key,
          output_kms_key=self.output_kms_key,
          max_runtime_in_seconds=self.max_runtime_in_seconds,
          env=self.env,
          tags=self.tags,
          network_config=self.network_config,
          batch_transform_input=batch_transform_input,
      )
      self.sagemaker_session.sagemaker_client.create_model_explainability_job_definition(
          **request_dict
      )
  
      # create schedule
      try:
          self._create_monitoring_schedule_from_job_definition(
              monitor_schedule_name=monitor_schedule_name,
              job_definition_name=new_job_definition_name,
              schedule_cron_expression=schedule_cron_expression,
          )
          self.job_definition_name = new_job_definition_name
          self.monitoring_schedule_name = monitor_schedule_name
      except Exception:
          logger.exception("Failed to create 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 3 for calling the ModelExplainabilityMonitor obj's underlying member method code with example usage: obj.create_monitoring_schedule(endpoint_input, analysis_config, output_s3_uri, constraints, monitor_schedule_name, schedule_cron_expression, enable_cloudwatch_metrics, batch_transform_input, data_analysis_start_time, data_analysis_end_time) without return types