def delete(self):
    """Deletes the bucket.

    Raises:
      Exception if there was an error deleting the bucket.
    """
    if self.exists():
      try:
        self._api.buckets_delete(self._name)
      except Exception as e:
        raise e