code: def lock(self, resource_id, region, account_id=None):
          
          account_id = self.get_account_id(account_id)
          return self.http.post(
              "%s/%s/locks/%s/lock" % (self.endpoint, account_id, resource_id),
              json={'region': region},
              auth=self.get_api_auth())
docs: Lock a given resource