diff --git a/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.py b/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/GoogleCloudStorage.py index 851f29b1ca2..cb2bd27a3bb 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 a24208c4a5a..b9299aec79b 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 4b9dbda7c23..13a1ecaac7c 100644 --- a/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/README.md +++ b/Packs/GoogleCloudStorage/Integrations/GoogleCloudStorage/README.md @@ -291,6 +291,16 @@ Name of the bucket in which to list objects. Required + +prefix +Specify to limit blobs within a "folder" i.e., "folder-1/" if blob is "folder-1/file.txt". +Optional + + +delimiter +Use a delimiter if you want to limit results within a specific "folder" and without any nested blobs i.e., "/". +Optional +

 

@@ -368,7 +378,7 @@

 

Command Example
-
gcs-list-bucket-objects bucket_name=my-bucket
+
gcs-list-bucket-objects bucket_name=my-bucket prefix=some/path/ delimiter=/
Human Readable Output

Objects in bucket my-bucket

diff --git a/Packs/GoogleCloudStorage/ReleaseNotes/1_0_12.md b/Packs/GoogleCloudStorage/ReleaseNotes/1_0_12.md new file mode 100644 index 00000000000..8678060cf23 --- /dev/null +++ b/Packs/GoogleCloudStorage/ReleaseNotes/1_0_12.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Google Cloud Storage + +- Added the following arguments to the ***gcs-list-bucket-objects*** command: + - *delimiter* + - *prefix* +- Updated the Docker image to: *demisto/google-cloud-storage:1.0.0.83364*. \ No newline at end of file diff --git a/Packs/GoogleCloudStorage/pack_metadata.json b/Packs/GoogleCloudStorage/pack_metadata.json index 890ef2b1fc7..52a908d5ec2 100644 --- a/Packs/GoogleCloudStorage/pack_metadata.json +++ b/Packs/GoogleCloudStorage/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Google Cloud Storage", "description": "Google Cloud Storage is a RESTful online file storage web service for storing and accessing data on Google Cloud Platform infrastructure.", "support": "xsoar", - "currentVersion": "1.0.11", + "currentVersion": "1.0.12", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "",