-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Resource Manager API #851
Comments
Given 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 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? |
It 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, |
Vote! // 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 it is! |
Yea, creating right now can only be done by a "person". In Python, this works by first running 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. |
Replied over at #864 |
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/959b7829-922a-41dc-a5a7-1178c3a8f0e7/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@363fe30
* docs(samples): include metadata file, add exclusions for samples to handwritten libraries PiperOrigin-RevId: 429395631 Source-Link: googleapis/googleapis@84594b3 Source-Link: googleapis/googleapis-gen@ed74f97 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: update v2.14.1 gapic-generator-typescript Committer: @summer-ji-eng PiperOrigin-RevId: 433031262 Source-Link: googleapis/googleapis@2a55d13 Source-Link: googleapis/googleapis-gen@2fce389 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZjZTM4OTNhZTlkYTQ3NzYzZTA4NzJjNGEzYTg3ZDlmZjc4NzcxZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: update v2.14.2 gapic-generator-typescript Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: googleapis/googleapis@bc2432d Source-Link: googleapis/googleapis-gen@930b673 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: remove unused imports PiperOrigin-RevId: 439629269 Source-Link: googleapis/googleapis@8d458c8 Source-Link: googleapis/googleapis-gen@065f181 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDY1ZjE4MTM4NjMwYWM0YzkyMGFjNGJjNzFiNDQ3MDk4Mzg5ZGJhMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: use full link in comment to fix JSDoc broken link Committer: @summer-ji-eng PiperOrigin-RevId: 440481666 Source-Link: googleapis/googleapis@6a21110 Source-Link: googleapis/googleapis-gen@e6e39af Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTZlMzlhZmYzM2I5MGE2M2ExOGU5MDgxZTQ4MGIwOGE0MWM1NDhhYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: manual test * fix test case for recognize voice Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Jeffrey Rennie <[email protected]> Co-authored-by: Summer Ji <[email protected]>
* docs(samples): include metadata file, add exclusions for samples to handwritten libraries PiperOrigin-RevId: 429395631 Source-Link: googleapis/googleapis@84594b3 Source-Link: googleapis/googleapis-gen@ed74f97 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: update v2.14.1 gapic-generator-typescript Committer: @summer-ji-eng PiperOrigin-RevId: 433031262 Source-Link: googleapis/googleapis@2a55d13 Source-Link: googleapis/googleapis-gen@2fce389 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZjZTM4OTNhZTlkYTQ3NzYzZTA4NzJjNGEzYTg3ZDlmZjc4NzcxZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: update v2.14.2 gapic-generator-typescript Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: googleapis/googleapis@bc2432d Source-Link: googleapis/googleapis-gen@930b673 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: remove unused imports PiperOrigin-RevId: 439629269 Source-Link: googleapis/googleapis@8d458c8 Source-Link: googleapis/googleapis-gen@065f181 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDY1ZjE4MTM4NjMwYWM0YzkyMGFjNGJjNzFiNDQ3MDk4Mzg5ZGJhMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: use full link in comment to fix JSDoc broken link Committer: @summer-ji-eng PiperOrigin-RevId: 440481666 Source-Link: googleapis/googleapis@6a21110 Source-Link: googleapis/googleapis-gen@e6e39af Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTZlMzlhZmYzM2I5MGE2M2ExOGU5MDgxZTQ4MGIwOGE0MWM1NDhhYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: manual test * fix test case for recognize voice Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Jeffrey Rennie <[email protected]> Co-authored-by: Summer Ji <[email protected]>
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
The text was updated successfully, but these errors were encountered: