Repository navigation
Support Resource Manager API #851
Description
Activity
stephenplusplus commented
on Sep 10, 2015 ContributorAuthorMore actionsGiven that Resource Manager is a lengthy term... and the concept is really just "projects"... and a project is so close to the core concept of using a gcp client library... I'm wondering if this is the first thing we should put directly onto the
gcloudinstance:var gcloud = require('gcloud')(/*...*/); gcloud.createProject('new-project-123', function(err, project) {}); gcloud.getProjects(function(err, projects) {}); var project = gcloud.project('grape-spaceship-123'); project.delete(function(err) {}); project.restore(function(err) {}); project.getMetadata(function(err, metadata) {}); project.setMetadata({/*...*/}, function(err) {});
Edit: This idea doesn't really work. We need to be able to support lazy auth info, so we have to have a nested "Projects" class of some sort.
Revised:
var gcloud = require('gcloud'); var projects = gcloud.projects(/* auth */); projects.createProject('new-project-123', function(err, project) {}); projects.getProjects(function(err, projects) {}); var project = projects.project('grape-spaceship-123'); project.delete(function(err) {}); project.restore(function(err) {}); project.getMetadata(function(err, metadata) {}); project.setMetadata({/*...*/}, function(err) {});
Is it likely that the resource manager api will ever do more than just projects?
stephenplusplus commented
on Sep 10, 2015 ContributorAuthorMore actionsIt looks like there are Organizations as well (https://developers.google.com/apis-explorer/?hl=en_US#p/cloudresourcemanager/v1beta1/)
Maybe it's best to just keep resources:
var gcloud = require('gcloud'); var resources = gcloud.resources({...}); resources.getProjects(); var project = resources.project('grape-spaceship-123');
I like that,
projects.getProjects(...)read kinda funny to me.stephenplusplus commented
on Sep 10, 2015 ContributorAuthorMore actionsVote!
// a var resources = gcloud.resources(); resources.getProjects(); resources.project('grape-spaceship-123'); // b var resourceManager = gcloud.resourcemanager(); resourceManager.getProjects(); resourceManager.project('grape-spaceship-123'); // c var resource = gcloud.resource(); resource.getProjects(); resource.project('grape-spaceship-123'); // d ??
I like
c.asounds kinda funny to me with back to back plural nouns
bis maybe a little too lengthy for my tastesstephenplusplus commented
on Sep 10, 2015 ContributorAuthorMore actionsC it is!
Yea, creating right now can only be done by a "person". In Python, this works by first running
gcloud auth loginon the command-line.Does gcloud-node pick up the Cloud SDK's credentials in the same way? If so, these will work nicely.
Eventually, service accounts will be able to create projects, but that isn't the case yet.
stephenplusplus commented
on Sep 16, 2015 ContributorAuthorMore actionsReplied over at #864
- added a commit that references this issue
on Jul 23, 2025 - added a commit that references this issue
on Feb 5, 2026 - added a commit that references this issue
on Feb 17, 2026 - added 2 commits that reference this issue
on Feb 24, 2026 - added a commit that references this issue
on Mar 5, 2026 - added 2 commits that reference this issue
on Mar 27, 2026
Let's add support for the Resource Manager API to gcloud. I'm pretty excited about this one!
What is Resource Manager?
Resource Manager API