GeezerVison is showing github.com — Refactor old BigQuery samples and add new ones. (#187) · googleapis/google-cloud-node@d6d5fba
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/google-cloud-resourcemanager/samples
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboard +52Lines changed: 52 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/> |
| 2 | + |
| 3 | +# Google Cloud Resource Manager Node.js Samples |
| 4 | + |
| 5 | +Google Cloud Platform provides container resources such as Organizations and |
| 6 | +Projects, that allow you to group and hierarchically organize other Cloud |
| 7 | +Platform resources. This hierarchical organization lets you easily manage common |
| 8 | +aspects of your resources such as access control and configuration settings. The |
| 9 | +[Google Cloud Resource Manager API][resource_docs] enables you to |
| 10 | +programmatically manage these container resources. |
| 11 | + |
| 12 | +[resource_docs]: https://cloud.google.com/resource-manager/docs/ |
| 13 | + |
| 14 | +## Table of Contents |
| 15 | + |
| 16 | +* [Setup](#setup) |
| 17 | +* [Samples](#samples) |
| 18 | + * [Projects](#projects) |
| 19 | + |
| 20 | +## Setup |
| 21 | + |
| 22 | +1. Read [Prerequisites][prereq] and [How to run a sample][run] first. |
| 23 | +1. Install dependencies: |
| 24 | + |
| 25 | + npm install |
| 26 | + |
| 27 | +[prereq]: ../README.md#prerequisities |
| 28 | +[run]: ../README.md#how-to-run-a-sample |
| 29 | + |
| 30 | +## Samples |
| 31 | + |
| 32 | +### Projects |
| 33 | + |
| 34 | +View the [documentation][projects_docs] or the [source code][projects_code]. |
| 35 | + |
| 36 | +__Usage:__ `node projects --help` |
| 37 | + |
| 38 | +``` |
| 39 | +Commands: |
| 40 | + list List all projects the authenticated user has access to. |
| 41 | +
|
| 42 | +Options: |
| 43 | + --help Show help [boolean] |
| 44 | +
|
| 45 | +Examples: |
| 46 | + node projects list List projects. |
| 47 | +
|
| 48 | +For more information, see https://cloud.google.com/resource-manager/docs/ |
| 49 | +``` |
| 50 | + |
| 51 | +[projects_docs]: https://cloud.google.com/resource-manager/docs/ |
| 52 | +[projects_code]: projects.js |
Collapse file
Copy file name to clipboard +19Lines changed: 19 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +{ |
| 2 | + "name": "nodejs-docs-samples-resource-manager", |
| 3 | + "version": "0.0.1", |
| 4 | + "private": true, |
| 5 | + "license": "Apache Version 2.0", |
| 6 | + "author": "Google Inc.", |
| 7 | + "scripts": { |
| 8 | + "test": "mocha -R spec -t 120000 --require intelli-espower-loader ../test/_setup.js test/*.test.js", |
| 9 | + "system-test": "mocha -R spec -t 120000 --require intelli-espower-loader ../system-test/_setup.js system-test/*.test.js" |
| 10 | + }, |
| 11 | + "dependencies": { |
| 12 | + "@google-cloud/resource": "^0.1.1", |
| 13 | + "request": "^2.74.0", |
| 14 | + "yargs": "^5.0.0" |
| 15 | + }, |
| 16 | + "devDependencies": { |
| 17 | + "mocha": "^3.0.2" |
| 18 | + } |
| 19 | +} |