diff --git a/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.py b/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.py index 851f29b1ca2a..cb2bd27a3bb5 100644 --- a/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.py +++ b/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.py @@ -266,8 +266,10 @@ def upload_blob(client, file_path, bucket_name, object_name): def gcs_list_bucket_objects(client, default_bucket, args): bucket_name = get_bucket_name(args, default_bucket) + prefix = args.get('prefix', None) + delimiter = args.get('delimiter', None) - blobs = client.list_blobs(bucket_name) + blobs = client.list_blobs(bucket_name, prefix=prefix, delimiter=delimiter) result = [blob2dict(blob) for blob in blobs] return_outputs( diff --git a/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.yml b/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.yml index a24208c4a5a4..b9299aec79bd 100644 --- a/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.yml +++ b/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.yml @@ -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., "/". + name: delimiter description: Retrieves the list of objects in a bucket. name: gcs-list-bucket-objects outputs: @@ -384,7 +388,7 @@ script: required: true description: Removes an entity from an object's Access Control List. name: gcs-delete-bucket-object-policy - dockerimage: demisto/google-cloud-storage:1.0.0.68936 + dockerimage: demisto/google-cloud-storage:1.0.0.83364 runonce: false script: '-' type: python diff --git a/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/README.md b/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/README.md index 4b9dbda7c233..13a1ecaac7cd 100644 --- a/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/README.md +++ b/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/README.md @@ -291,6 +291,16 @@
@@ -368,7 +378,7 @@
gcs-list-bucket-objects bucket_name=my-bucket+
gcs-list-bucket-objects bucket_name=my-bucket prefix=some/path/ delimiter=/