Skip to content
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 requester pays samples #453

Merged
merged 7 commits into from
Aug 15, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ Options:
Examples:
node requesterPays.js enable my-bucket Enables requester-pays requests on a bucket named
"my-bucket".
node requesterPays.js list Disables requester-pays requests on a bucket named
node requesterPays.js disable Disables requester-pays requests on a bucket named
"my-bucket".
node requesterPays.js delete my-bucket Determines whether requester-pays requests are enabled
node requesterPays.js get-status my-bucket Determines whether requester-pays requests are enabled
for a bucket named "my-bucket".
node requesterPays.js download my-bucket file.txt ./file.txt Downloads "gs://my-bucket/file.txt" to "./file.txt"
using requester-pays requests.
Expand Down
4 changes: 2 additions & 2 deletions storage/requesterPays.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ const cli = require(`yargs`)
(opts) => downloadFileUsingRequesterPays(opts.projectId, opts.bucketName, opts.srcFileName, opts.destFileName)
)
.example(`node $0 enable my-bucket`, `Enables requester-pays requests on a bucket named "my-bucket".`)
.example(`node $0 list`, `Disables requester-pays requests on a bucket named "my-bucket".`)
.example(`node $0 delete my-bucket`, `Determines whether requester-pays requests are enabled for a bucket named "my-bucket".`)
.example(`node $0 disable`, `Disables requester-pays requests on a bucket named "my-bucket".`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last nit, disable should accept a bucket id similar to enable.

.example(`node $0 get-status my-bucket`, `Determines whether requester-pays requests are enabled for a bucket named "my-bucket".`)
.example(`node $0 download my-bucket file.txt ./file.txt`, `Downloads "gs://my-bucket/file.txt" to "./file.txt" using requester-pays requests.`)
.wrap(120)
.recommendCommands()
Expand Down