-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add IAM samples #359
Add IAM samples #359
Conversation
storage/iam.js
Outdated
// const roleName = "roles/storage.objectViewer"; | ||
|
||
// The list of IAM members to grant the role to | ||
// const members = ['user:jdoe@example.com', 'group:admins@example.com']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's some extra indentation on this line
storage/iam.js
Outdated
function viewBucketIamMembers (bucketName) { | ||
// [START view_bucket_iam_members] | ||
|
||
// Your Google Cloud Storage bucket name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable definitions (everything really) should be below any import statements.
storage/iam.js
Outdated
|
||
function viewBucketIamMembers (bucketName) { | ||
// [START view_bucket_iam_members] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's an extra blank line here
storage/iam.js
Outdated
function addBucketIamMember (bucketName, roleName, members) { | ||
// [START add_bucket_iam_member] | ||
// Your Google Cloud Storage bucket name | ||
// const bucketName = "my-bucket"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable definitions (everything really) should be below any import statements
storage/iam.js
Outdated
function removeBucketIamMember (bucketName, roleName, members) { | ||
// [START remove_bucket_iam_member] | ||
// Your Google Cloud Storage bucket name | ||
// const bucketName = "my-bucket"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable definitions (everything really) should be below any import statements
storage/iam.js
Outdated
.help(); | ||
|
||
if (module === require.main) { | ||
cli.help().strict().argv; // eslint-disable-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you're right, perhaps we should make this the standard (a "main" function).
Change to:
.epilogue(`For more information, see https://cloud.google.com/iam/docs/overview and https://cloud.google.com/storage/docs`)
.help()
.strict();
if (module === require.main) {
cli.parse(process.argv.slice(2));
}
Codecov Report
@@ Coverage Diff @@
## master #359 +/- ##
=======================================
Coverage 83.88% 83.88%
=======================================
Files 4 4
Lines 422 422
=======================================
Hits 354 354
Misses 68 68 Continue to review full report at Codecov.
|
Hi Ace, To answer each of your questions:
Keep BucketIamMembers as it makes more sense with the documentation that's being released. I'll send you additional information through chat.
I did it for Ruby because it's used more often. This falls into a per-language bias. |
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ### [2.1.1](https://www.github.com/googleapis/nodejs-cloud-container/compare/v2.1.0...v2.1.1) (2020-07-09) ### Bug Fixes * typeo in nodejs .gitattribute ([#358](https://www.github.com/googleapis/nodejs-cloud-container/issues/358)) ([8d4b79a](https://www.github.com/googleapis/nodejs-cloud-container/commit/8d4b79aa731f06e7c31e86ec3f8d0190554f40be)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
🤖 I have created a release \*beep\* \*boop\* --- ### [2.1.1](https://www.github.com/googleapis/nodejs-cloud-container/compare/v2.1.0...v2.1.1) (2020-07-09) ### Bug Fixes * typeo in nodejs .gitattribute ([#358](https://www.github.com/googleapis/nodejs-cloud-container/issues/358)) ([8d4b79a](https://www.github.com/googleapis/nodejs-cloud-container/commit/8d4b79aa731f06e7c31e86ec3f8d0190554f40be)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
🤖 I have created a release \*beep\* \*boop\* --- ### [2.1.1](https://www.github.com/googleapis/nodejs-cloud-container/compare/v2.1.0...v2.1.1) (2020-07-09) ### Bug Fixes * typeo in nodejs .gitattribute ([#358](https://www.github.com/googleapis/nodejs-cloud-container/issues/358)) ([8d4b79a](https://www.github.com/googleapis/nodejs-cloud-container/commit/8d4b79aa731f06e7c31e86ec3f8d0190554f40be)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
* fix unmatched region tag * fix lint * fix bad copy paste * fix another bad copy paste * add new region tags to different demos * update new tags to match most-used tag from other langs * docs: remove unused region tags Co-authored-by: Benjamin E. Coe <bencoe@google.com> Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ### [2.1.1](https://www.github.com/googleapis/nodejs-cloud-container/compare/v2.1.0...v2.1.1) (2020-07-09) ### Bug Fixes * typeo in nodejs .gitattribute ([#358](https://www.github.com/googleapis/nodejs-cloud-container/issues/358)) ([8d4b79a](https://www.github.com/googleapis/nodejs-cloud-container/commit/8d4b79aa731f06e7c31e86ec3f8d0190554f40be)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
@frankyn a few (nitpicky) questions for you: