def delete(module, link): auth = GcpSession(module, 'pubsub') return return_if_object(module, auth.delete(link))
def fetch_resource(module, link, allow_not_found=True): auth = GcpSession(module, 'pubsub') return return_if_object(module, auth.get(link), allow_not_found)
def create(module, link): auth = GcpSession(module, 'pubsub') return return_if_object(module, auth.put(link, resource_to_request(module)))