code: def update_endpoint(self, endpoint_name, endpoint_config_name):
          
          if not _deployment_entity_exists(lambda: self.sagemaker_client.describe_endpoint(EndpointName=endpoint_name)):
              raise ValueError('Endpoint with name "{}" does not exist; please use an existing endpoint name'
                               .format(endpoint_name))
  
          self.sagemaker_client.update_endpoint(EndpointName=endpoint_name,
                                                EndpointConfigName=endpoint_config_name)
          return endpoint_name
docs: Update an Amazon SageMaker ``Endpoint`` according to the endpoint configuration specified in the request
  
          Raise an error if endpoint with endpoint_name does not exist.
  
          Args:
              endpoint_name (str): Name of the Amazon SageMaker ``Endpoint`` to update.
              endpoint_config_name (str): Name of the Amazon SageMaker endpoint configuration to deploy.
  
          Returns:
              str: Name of the Amazon SageMaker ``Endpoint`` being updated.