-
Notifications
You must be signed in to change notification settings - Fork 20
docs(samples): Add filtered listing samples #209
Conversation
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
# [END secretmanager_list_secret_versions_with_filter] | ||
|
||
|
||
if __name__ == "__main__": |
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.
Note: Adding the CLI is not encouraged or required, although it is a common pattern in many existing samples. Please keep this only if you think it is valuable for your users.
We expect that most developers will copy/paste the code from Code Snippets on cloud.google.com into their own codebase rather than attempt to run the Code Snippets as Sample Applications. Therefore, it's not critical that Code Snippets be runnable from the command line.
CLIs for Code Snippets have been very expensive to maintain in the past. We will not be creating new CLIs for Code Snippets and will be removing ones that exist.
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.
Done.
|
||
|
||
# [START secretmanager_list_secret_versions_with_filter] | ||
def list_secret_versions_with_filter(project_id, secret_id, filter_str): |
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.
Consider pre-filling with a valid filter_str = "..."
to help users. The state:ENABLED
passed in the test seems like a good option.
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.
Done.
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
🤖 I have created a release \*beep\* \*boop\* --- ## [2.8.0](https://www.github.com/googleapis/python-secret-manager/compare/v2.7.3...v2.8.0) (2021-11-08) ### Features * add context manager support in client ([#210](https://www.github.com/googleapis/python-secret-manager/issues/210)) ([8d247d4](https://www.github.com/googleapis/python-secret-manager/commit/8d247d4b7f96faa61532ac09ef95e2599c523702)) * add support for python 3.10 ([#214](https://www.github.com/googleapis/python-secret-manager/issues/214)) ([5e3cc7e](https://www.github.com/googleapis/python-secret-manager/commit/5e3cc7ef9a0e3660c9734f989d5b1e82a18d336c)) ### Bug Fixes * **deps:** drop packaging dependency ([6aac11f](https://www.github.com/googleapis/python-secret-manager/commit/6aac11f08d396835f7c4ca71c7a2f2a2a48e96db)) * **deps:** require google-api-core >= 1.28.0 ([6aac11f](https://www.github.com/googleapis/python-secret-manager/commit/6aac11f08d396835f7c4ca71c7a2f2a2a48e96db)) ### Documentation * list oneofs in docstring ([6aac11f](https://www.github.com/googleapis/python-secret-manager/commit/6aac11f08d396835f7c4ca71c7a2f2a2a48e96db)) * **samples:** Add filtered listing samples ([#209](https://www.github.com/googleapis/python-secret-manager/issues/209)) ([316de2d](https://www.github.com/googleapis/python-secret-manager/commit/316de2d68283e4c1da7f4fdc24fc7e6d65adbfd0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #208 🦕