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
Google Cloud Storage - Update gcs-list-bucket-objects to support prefix and delimiter arguments. #31496
Conversation
added arguments for prefix and delimiter to gcs_list_bucket_objects to support limiting results returned for blobs that are in "folders"
added arguments to support updates for gcs-list-bucket-objects to include prefix and delimiter parameters
Thank you for your contribution. Your generosity and caring are unrivaled! Make sure to register your contribution by filling the Contribution Registration form, so our content wizard @adi88d will know the proposed changes are ready to be reviewed. |
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.
Great Job!
Thanks a lot for this contribution, It is highly appreciated.
I added some review comments and suggestion:
- remove the
Packs/GoogleCloudStorage/CONTRIBUTORS.json
file - update release notes for the pack using demisto-sdk update-release-notes command
- add to the delimiter and prefix arguments to
GoogleCloudStorage/README.md
Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.yml
Outdated
Show resolved
Hide resolved
…eCloudStorage.yml Co-authored-by: Adi Daud <46249224+adi88d@users.noreply.github.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.
I committed the suggestion for YAML file although I'm not sure I understand it since all the other arguments and commands already implemented don't follow it
@@ -119,6 +119,10 @@ script: | |||
- default: true | |||
description: Name of the bucket in which to list objects. If not specified, operation will be performed on the default bucket parameter. | |||
name: bucket_name | |||
- description: Specify to limit blobs within a "folder" i.e. "folder-1/" if blob is "folder-1/file.txt". |
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.
- description: Specify to limit blobs within a "folder" i.e. "folder-1/" if blob is "folder-1/file.txt". | |
- description: Specify to limit blobs within a "folder" i.e., "folder-1/" if blob is "folder-1/file.txt". |
@@ -119,6 +119,10 @@ script: | |||
- default: true | |||
description: Name of the bucket in which to list objects. If not specified, operation will be performed on the default bucket parameter. | |||
name: bucket_name | |||
- description: Specify to limit blobs within a "folder" i.e. "folder-1/" if blob is "folder-1/file.txt". | |||
name: prefix | |||
- description: Use a delimiter if you want to limit results within a specific "folder" and without any nested blobs i.e. "/". |
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.
- description: Use a delimiter if you want to limit results within a specific "folder" and without any nested blobs i.e. "/". | |
- description: Use a delimiter if you want to limit results within a specific "folder" and without any nested blobs i.e., "/". |
@@ -291,6 +291,16 @@ | |||
<td style="width: 421px;">Name of the bucket in which to list objects.</td> | |||
<td style="width: 103px;">Required</td> | |||
</tr> | |||
<tr> | |||
<td style="width: 184px;">prefix</td> | |||
<td style="width: 421px;">Specify to limit blobs within a "folder" i.e. "folder-1/" if blob is "folder-1/file.txt".</td> |
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.
<td style="width: 421px;">Specify to limit blobs within a "folder" i.e. "folder-1/" if blob is "folder-1/file.txt".</td> | |
<td style="width: 421px;">Specify to limit blobs within a "folder" i.e., "folder-1/" if blob is "folder-1/file.txt".</td> |
</tr> | ||
<tr> | ||
<td style="width: 184px;">delimiter</td> | ||
<td style="width: 421px;">Use a delimiter if you want to limit results within a specific "folder" and without any nested blobs i.e. "/".</td> |
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.
<td style="width: 421px;">Use a delimiter if you want to limit results within a specific "folder" and without any nested blobs i.e. "/".</td> | |
<td style="width: 421px;">Use a delimiter if you want to limit results within a specific "folder" and without any nested blobs i.e., "/".</td> |
- ***delimiter*** | ||
- ***prefix*** |
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.
- ***delimiter*** | |
- ***prefix*** | |
- *delimiter* | |
- *prefix* |
|
||
##### Google Cloud Storage | ||
|
||
- Added the following arguments to the **gcs-list-bucket-objects** command: |
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.
- Added the following arguments to the **gcs-list-bucket-objects** command: | |
- Added the following arguments to the ***gcs-list-bucket-objects*** command: |
@adi88d Doc review completed. |
4409c9c
into
demisto:contrib/zdrouse_master
…ix and delimiter arguments. (#31496) (#31537) * Update GoogleCloudStorage.py added arguments for prefix and delimiter to gcs_list_bucket_objects to support limiting results returned for blobs that are in "folders" * Update GoogleCloudStorage.yml added arguments to support updates for gcs-list-bucket-objects to include prefix and delimiter parameters * Create CONTRIBUTORS.json * Update GoogleCloudStorage.yml spelling * Update Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.yml * added arguments to README * fix arguments to README * updated arguments to README * fix argument descriptions in GoogleCloudStorage.yml * fix yml structure * update RN * update docker * doc review --------- Co-authored-by: zdrouse <zdrouse@gmail.com> Co-authored-by: Adi Daud <46249224+adi88d@users.noreply.github.com> Co-authored-by: adi88d <adaud@paloaltonetworks.com>
…ix and delimiter arguments. (#31496) (#31537) * Update GoogleCloudStorage.py added arguments for prefix and delimiter to gcs_list_bucket_objects to support limiting results returned for blobs that are in "folders" * Update GoogleCloudStorage.yml added arguments to support updates for gcs-list-bucket-objects to include prefix and delimiter parameters * Create CONTRIBUTORS.json * Update GoogleCloudStorage.yml spelling * Update Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.yml * added arguments to README * fix arguments to README * updated arguments to README * fix argument descriptions in GoogleCloudStorage.yml * fix yml structure * update RN * update docker * doc review --------- Co-authored-by: zdrouse <zdrouse@gmail.com> Co-authored-by: Adi Daud <46249224+adi88d@users.noreply.github.com> Co-authored-by: adi88d <adaud@paloaltonetworks.com>
…ix and delimiter arguments. (#31496) (#31537) * Update GoogleCloudStorage.py added arguments for prefix and delimiter to gcs_list_bucket_objects to support limiting results returned for blobs that are in "folders" * Update GoogleCloudStorage.yml added arguments to support updates for gcs-list-bucket-objects to include prefix and delimiter parameters * Create CONTRIBUTORS.json * Update GoogleCloudStorage.yml spelling * Update Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.yml * added arguments to README * fix arguments to README * updated arguments to README * fix argument descriptions in GoogleCloudStorage.yml * fix yml structure * update RN * update docker * doc review --------- Co-authored-by: zdrouse <zdrouse@gmail.com> Co-authored-by: Adi Daud <46249224+adi88d@users.noreply.github.com> Co-authored-by: adi88d <adaud@paloaltonetworks.com>
Contributing to Cortex XSOAR Content
Make sure to register your contribution by filling the contribution registration form
The Pull Request will be reviewed only after the contribution registration form is filled.
Status
Related Issues
The google cloud storage python client supports these arguments.
https://github.com/googleapis/python-storage/blob/main/samples/snippets/storage_list_files_with_prefix.py
Description
Add support prefix and delimiter support for gcs-list-bucket-objects command. This will allow users to limit blobs returned from a GCS bucket.
Must have