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

samples(storage-control): add folders samples #26021

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

bajajneha27
Copy link
Contributor

closes: #25992

Copy link

snippet-bot bot commented May 31, 2024

Here is the summary of changes.

You are about to add 5 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment


# The storage bucket path uses the global access pattern, in which the "_"
# denotes this bucket exists in the global namespace.
bucket_path = storage_control.bucket_path project: "_", bucket: bucket_name
Copy link

Choose a reason for hiding this comment

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

Thanks for the samples! So this is the specific aspect we want/need to showcase in the handwritten samples, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We usually take advantage of the paths helper function to construct the needed path in Ruby. I feel this is helpful but if you have a better way of doing this in your language, that works too.


response = storage_control.get_folder request

puts response.name
Copy link

Choose a reason for hiding this comment

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

nit: maybe something like "Got folder #{response.name}"

@bajajneha27 bajajneha27 merged commit 2a71a7e into googleapis:main Jun 7, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storage: add HNS folders samples
3 participants