code: def retention_policy_exists(database,
                              name,
                              user=None,
                              password=None,
                              host=None,
                              port=None):
      '''
      Check if a retention policy exists.
  
      database
          The database to operate on.
  
      name
          Name of the policy to modify.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' influxdb08.retention_policy_exists metrics default
      '''
      policy = retention_policy_get(database, name, user, password, host, port)
      return policy is not Nonf retention_policy_exists(database,
                              name,
                              user=None,
                              password=None,
                              host=None,
                              port=None):
      '''
      Check if a retention policy exists.
  
      database
          The database to operate on.
  
      name
          Name of the policy to modify.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' influxdb08.retention_policy_exists metrics default
      '''
      policy = retention_policy_get(database, name, user, password, host, port)
      return policy is not None
docs: Check if a retention policy exists.
  
      database
          The database to operate on.
  
      name
          Name of the policy to modify.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' influxdb08.retention_policy_exists metrics default