def exists ( self ) : client = self . _instance . _client try : client . instance_admin_client . get_cluster ( name = self . name ) return True # NOTE: There could be other exceptions that are returned to the user. except NotFound : return False
python table already exists
Check whether the cluster already exists .
def exists(self):
        """Check whether the cluster already exists.

        For example:

        .. literalinclude:: snippets.py
            :start-after: [START bigtable_check_cluster_exists]
            :end-before: [END bigtable_check_cluster_exists]

        :rtype: bool
        :returns: True if the table exists, else False.
        """
        client = self._instance._client
        try:
            client.instance_admin_client.get_cluster(name=self.name)
            return True
        # NOTE: There could be other exceptions that are returned to the user.
        except NotFound:
            return False