Lock a given resource

def lock(self, resource_id, region, account_id=None):
        """Lock a given resource
        """
        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())