class_docstr: Configuration that captures all checkpointing related settings.
  
  :data:`DEFAULT_MODE`:
  
  The default checkpoint mode: exactly once.
  
  :data:`DEFAULT_TIMEOUT`:
  
  The default timeout of a checkpoint attempt: 10 minutes.
  
  :data:`DEFAULT_MIN_PAUSE_BETWEEN_CHECKPOINTS`:
  
  The default minimum pause to be made between checkpoints: none.
  
  :data:`DEFAULT_MAX_CONCURRENT_CHECKPOINTS`:
  
  The default limit of concurrently happening checkpoints: one.
class_docstr_tok: ["Configuration","that","captures","all","checkpointing","related","settings",".",":","data",":","`","DEFAULT_MODE","`",":","The","default","checkpoint","mode",":","exactly","once",".",":","data",":","`","DEFAULT_TIMEOUT","`",":","The","default","timeout","of","a","checkpoint","attempt",":","10","minutes",".",":","data",":","`","DEFAULT_MIN_PAUSE_BETWEEN_CHECKPOINTS","`",":","The","default","minimum","pause","to","be","made","between","checkpoints",":","none",".",":","data",":","`","DEFAULT_MAX_CONCURRENT_CHECKPOINTS","`",":","The","default","limit","of","concurrently","happening","checkpoints",":","one","."]
docstr: Sets the mode for externalized checkpoint clean-up. Externalized checkpoints will be enabled
  automatically unless the mode is set to
  :data:`ExternalizedCheckpointCleanup.NO_EXTERNALIZED_CHECKPOINTS`.
  
  Externalized checkpoints write their meta data out to persistent storage and are **not**
  automatically cleaned up when the owning job fails or is suspended (terminating with job
  status ``FAILED`` or ``SUSPENDED``). In this case, you have to manually clean up the
  checkpoint state, both the meta data and actual program state.
  
  The :class:`ExternalizedCheckpointCleanup` mode defines how an externalized checkpoint
  should be cleaned up on job cancellation. If you choose to retain externalized checkpoints
  on cancellation you have to handle checkpoint clean-up manually when you cancel the job as
  well (terminating with job status ``CANCELED``).
  
  The target directory for externalized checkpoints is configured via
  ``org.apache.flink.configuration.CheckpointingOptions#CHECKPOINTS_DIRECTORY``.
  
  Example:
  ::
  
      >>> config.enable_externalized_checkpoints(
      ...     ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION)
  
  :param cleanup_mode: Externalized checkpoint clean-up behaviour, the mode could be
                       :data:`ExternalizedCheckpointCleanup.DELETE_ON_CANCELLATION`,
                       :data:`ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION` or
                       :data:`ExternalizedCheckpointCleanup.NO_EXTERNALIZED_CHECKPOINTS`
  
  .. note:: Deprecated in 1.15. Use :func:`set_externalized_checkpoint_cleanup` instead.
code: def enable_externalized_checkpoints(
      self, cleanup_mode: "ExternalizedCheckpointCleanup"
  ) -> "CheckpointConfig":
      """
      Sets the mode for externalized checkpoint clean-up. Externalized checkpoints will be enabled
      automatically unless the mode is set to
      :data:`ExternalizedCheckpointCleanup.NO_EXTERNALIZED_CHECKPOINTS`.
  
      Externalized checkpoints write their meta data out to persistent storage and are **not**
      automatically cleaned up when the owning job fails or is suspended (terminating with job
      status ``FAILED`` or ``SUSPENDED``). In this case, you have to manually clean up the
      checkpoint state, both the meta data and actual program state.
  
      The :class:`ExternalizedCheckpointCleanup` mode defines how an externalized checkpoint
      should be cleaned up on job cancellation. If you choose to retain externalized checkpoints
      on cancellation you have to handle checkpoint clean-up manually when you cancel the job as
      well (terminating with job status ``CANCELED``).
  
      The target directory for externalized checkpoints is configured via
      ``org.apache.flink.configuration.CheckpointingOptions#CHECKPOINTS_DIRECTORY``.
  
      Example:
      ::
  
          >>> config.enable_externalized_checkpoints(
          ...     ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION)
  
      :param cleanup_mode: Externalized checkpoint clean-up behaviour, the mode could be
                           :data:`ExternalizedCheckpointCleanup.DELETE_ON_CANCELLATION`,
                           :data:`ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION` or
                           :data:`ExternalizedCheckpointCleanup.NO_EXTERNALIZED_CHECKPOINTS`
  
      .. note:: Deprecated in 1.15. Use :func:`set_externalized_checkpoint_cleanup` instead.
      """
      self._j_checkpoint_config.enableExternalizedCheckpoints(
          ExternalizedCheckpointCleanup._to_j_externalized_checkpoint_cleanup(
              cleanup_mode
          )
      )
      return self
  
imports: import warnings
  from enum import Enum
  from typing import Optional
  from pyflink.common import Duration
  from pyflink.datastream.checkpoint_storage import CheckpointStorage, _from_j_checkpoint_storage
  from pyflink.datastream.checkpointing_mode import CheckpointingMode
  from pyflink.java_gateway import get_gateway
label_desc: Use image node_id 17 for calling the CheckpointConfig obj's underlying member method code with example usage: obj.enable_externalized_checkpoints(cleanup_mode) and returns: self