Google Cloud Storage
Google Cloud Storage is a RESTful online file storage web service for storing and accessing data on Google Cloud Platform infrastructure.
IT Services · Google Cloud Storage
Details
| ID | Google Cloud Storage |
|---|---|
| Provider | |
| Category | IT Services |
| From Version | 5.0.0 |
| Docker Image | demisto/google-cloud-storage:1.0.0.10120494 |
| Supported Modules | Agentix XSIAM |
README
Use the Google Cloud Storage integration to manage files, buckets, bucket objects, and bucket policies.
This integration was integrated and tested with API version v1 of Google Cloud Storage.
Detailed Description
Create a Service Account:
- Go to the Google documentation and follow the procedure in the Creating a Service Account section. After you create a service account, a Service Account Private Key file is downloaded. You will need this file in step 3.
- Grant the Storage Admin permission to the Service Account to enable the Service Account to perform all Google Storage API commands.
- In Cortex XSOAR, configure an instance of the Google Cloud Storage integration. For the Service Account Private Key parameter, copy the JSON contents of the file you downloaded in step 1.
Configure Google Cloud Storage on Cortex XSOAR
- Navigate to Settings > Integrations > Servers & Services.
- Search for Google Cloud Storage.
- Click Add instance to create and configure a new integration instance.
- Name: a textual name for the integration instance.
- Service Account Private Key file contents (JSON)
- Optional: Use system proxy settings
- Optional: Trust any certificate (not secure)
- Click Test to validate the new instance.
Commands
You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.
- Retrieves the list of buckets: gcs-list-buckets
- Retrieves bucket information: gcs-get-bucket
- Creates a new bucket: gcs-create-bucket
- Deletes a bucket: gcs-delete-bucket
- Retrieves the list of objects in a bucket: gcs-list-bucket-objects
- Retrieves object data into a file: gcs-download-file
- Uploads a file (object) into a bucket: gcs-upload-file
- Retrieves the Access Control List of a bucket: gcs-list-bucket-policy
- Adds a new entity to a bucket's Access Control List: gcs-create-bucket-policy
- Updates an existing entity in a bucket's Access Control List: gcs-put-bucket-policy
- Removes an entity from a bucket's Access Control List: gcs-delete-bucket-policy
- Retrieves the Access Control List of an object: gcs-list-bucket-object-policy
- Adds a new entity to an object's Access Control List: gcs-create-bucket-object-policy
- Updates an existing entity in an object's Access Control List: gcs-put-bucket-object-policy
- Removes an entity from an object's Access Control List: gcs-delete-bucket-object-policy
1. Retrieve the list of buckets
Retrieve the list of buckets.
Base Command
gcs-list-buckets
Context Output
| Path | Type | Description |
|---|---|---|
| GCS.Bucket.Name | String | Bucket name (also ID). |
| GCS.Bucket.TimeCreated | Date | Bucket creation time. |
| GCS.Bucket.TimeUpdated | Date | Last time bucket was modified. |
| GCS.Bucket.OwnerID | String | Bucket owner ID. |
Command Example
gcs-list-buckets
Human Readable Output
Buckets in project my-project
| Name | Time Created | Time Updated | Owner ID |
|---|---|---|---|
| my-bucket | 2019-08-25T11:14:46 | 2019-08-25T11:14:49 | |
| another-bucket | 2019-09-01T15:31:45 | 2019-09-01T17:52:23 |
2. Retrieve bucket information
Retrieves bucket information.
Base Command
gcs-get-bucket
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket to retrieve. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GCS.Bucket.Name | String | Bucket name (also ID). |
| GCS.Bucket.TimeCreated | Date | Bucket creation time. |
| GCS.Bucket.TimeUpdated | Date | Last time bucket was modified. |
| GCS.Bucket.OwnerID | String | Bucket owner ID. |
Command Example
gcs-get-bucket bucket_name=my-bucket
Human Readable Output
Bucket my-bucket
| Name | Time Created | Time Updated | Owner ID |
|---|---|---|---|
| my-bucket | 2019-08-25T11:14:46 | 2019-08-25T11:14:49 |
3. Create a new bucket
Creates a new bucket.
Base Command
gcs-create-bucket
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket to create. | Required |
| bucket_acl | Access Control List for the bucket. | Optional |
| default_object_acl | Default Access Control List for the object. | Optional |
| location | The location of the bucket, The default value is US. | Optional |
| uniform_bucket_level_access | Whether the bucket is configured to allow only IAM, The default value is false. | Optional |
Command Example
gcs-create-bucket bucket_name=my-bucket bucket_acl=publicRead default_object_acl=authenticatedRead
Human Readable Output
Bucket my-bucket was created successfully.
4. Delete a bucket
Deletes a bucket.
Base Command
gcs-delete-bucket
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket to delete. | Required |
| force | Forces the bucket to delete (if not empty). | Required |
Command Example
gcs-delete-bucket bucket_name=my-bucket force=true
Human Readable Output
Bucket my-bucket was deleted successfully.
5. Retrieve a list of objects in a bucket
Retrieves the list of objects in a bucket.
Base Command
gcs-list-bucket-objects
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | 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 |
Context Output
| Path | Type | Description |
|---|---|---|
| GCS.BucketObject.Name | String | Object name. |
| GCS.BucketObject.Bucket | String | Name of the bucket containing the object. |
| GCS.BucketObject.ContentType | String | Content-Type of the object data. |
| GCS.BucketObject.TimeCreated | Date | Object creation time. |
| GCS.BucketObject.TimeUpdated | Date | Last time object was modified. |
| GCS.BucketObject.TimeDeleted | Date | Object deletion time (available if the object is archived). |
| GCS.BucketObject.Size | Number | Object size in bytes. |
| GCS.BucketObject.MD5 | String | MD5 hash of the data in Base64. |
| GCS.BucketObject.OwnerID | String | Object owner ID. |
| GCS.BucketObject.CRC32c | String | CRC32c checksum (as described in RFC 4960, Appendix B), encoded using Base64 in big-endian byte order. |
| GCS.BucketObject.EncryptionAlgorithm | String | The encryption algorithm. |
| GCS.BucketObject.EncryptionKeySHA256 | String | SHA256 hash value of the encryption key. |
Command Example
gcs-list-bucket-objects bucket_name=my-bucket prefix=some/path/ delimiter=/
Human Readable Output
Objects in bucket my-bucket
| Name | Bucket | Content Type | Time Created | Time Updated | Time Deleted | Size | MD5 | Owner ID | CRC32c | Encryption Algorithm | Encryption Key SHA256 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| /some/path/file1.txt | my-bucket | text/plain | 2019-08-25T11:15:48 | 2019-08-25T11:15:48 | 29 | TMPFaqwyxk3L8lVD+4GKXA== | 0B/wfQ== | ||||
| /some/path/file2.txt | my-bucket | text/plain | 2019-09-01T14:08:15 | 2019-09-01T14:08:15 | 29 | Ao3wKBgCODPKqSnqx2GGAc== | xL/6R5== |
6. Retrieve object data into a file
Retrieves object data into a file.
Base Command
gcs-download-file
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket in which the object resides. | Required |
| object_name | Name of the object to download. | Required |
| saved_file_name | Name of the file in which the object is downloaded (if not specified, the name is derived from the object name, but this may fail if the object contains invalid filename characters). | Optional |
Command Example
gcs-download-file bucket_name=my-bucket object_name=/some/path/file1.txt
Human Readable Output
Link to the retrieved file.
7. Upload a file (object) into a bucket
Uploads a file (object) into a bucket.
Base Command
gcs-upload-file
Input
| Argument Name | Description | Required |
|---|---|---|
| entry_id | ID of a context entry containing the file to upload. | Required |
| bucket_name | Name of the bucket in which to upload the object. | Required |
| object_name | Name of the uploaded object within the bucket. | Required |
| object_acl | Access Control List for the uploaded object. | Optional |
Command Example
gcs-upload-file entry_id=889@a7c34bf4-a552-49b2-83b6-e95590596286 bucket_name=my-bucket object_name=/some/path/my_file.txt object_acl=bucketOwnerRead
Human Readable Output
File some_source_file.txt was successfully uploaded to bucket my-bucket as /some/path/my_file.txt
8. Retrieve the Access Control List of a bucket
Retrieves the Access Control List of a bucket.
Base Command
gcs-list-bucket-policy
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket for the Access Control List. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GCS.BucketPolicy.Bucket | String | Name of the bucket holding the Access Control List. |
| GCS.BucketPolicy.Entity | String | The entity holding the permission. |
| GCS.BucketPolicy.Email | String | Email address associated with the entity (if any). |
| GCS.BucketPolicy.Role | String | The access permission for the entity. |
| GCS.BucketPolicy.Team | String | Project team associated with the entity (if any). |
Command Example
gcs-list-bucket-policy bucket_name=my-bucket
Human Readable Output
ACL policy for bucket my-bucket
| Bucket | Entity | Role | Team | |
|---|---|---|---|---|
| my-bucket | project-owners-12345 | OWNER | owners | |
| my-bucket | user-alice@company.com | alice@company.com | WRITER | writers |
| my-bucket | allUsers | WRITER |
9. Add a new entity to a bucket's Access Control List
Adds a new entity to a bucket's Access Control List. Note: use the gcs-put-bucket-policy command to update an existing entry.
Base Command
gcs-create-bucket-policy
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket in which to modify the Access Control List. | Required |
| entity | Entity to add into the Access Control List. Common entity formats are: * user-<userId or email> * group-<groupId or email> * allUsers * allAuthenticatedUsers For more options and details, see this reference |
Required |
| role | The access permission for the entity. | Required |
Command Example
gcs-create-bucket-policy bucket_name=my-bucket entity=user-alice@company.com role=Writer
Human Readable Output
Added entity user-alice@company.com to ACL of bucket my-bucket with role Writer
10. Updates an existing entity in a bucket's Access Control List
Updates an existing entity in a bucket's Access Control List. Note: use the gcs-create-bucket-policy command to create a new entry.
Base Command
gcs-put-bucket-policy
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket in which to modify the Access Control List. | Required |
| entity | The entity to update in the Access Control List. Common entity formats are: * user-<userId or email> * group-<groupId or email> * allUsers * allAuthenticatedUsers For more options and details, see this reference |
Required |
| role | The access permissions for the entity. | Required |
Command Example
gcs-put-bucket-policy bucket_name=my-bucket entity=user-alice@company.com role=Reader
Human Readable Output
Updated ACL entity user-alice@company.com in bucket my-bucket to role Reader
11. Removes an entity from a bucket's Access Control List
Removes an entity from a bucket's Access Control List.
Base Command
gcs-delete-bucket-policy
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket in which to modify the Access Control List. | Required |
| entity | Entity to remove from the Access Control List. Common entity formats are: * user-<userId or email> * group-<groupId or email> * allUsers * allAuthenticatedUsers For more options and details, see this reference |
Required |
Command Example
gcs-delete-bucket-policy bucket_name=my-bucket entity=user-alice@company.com
Human Readable Output
Removed entity user-alice@company.com from ACL of bucket my-bucket
12. Retrieves the Access Control List of an object
Retrieves the Access Control List of an object.
Base Command
gcs-list-bucket-object-policy
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket in which the object resides. | Required |
| object_name | Name of the object in which to list access controls. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| GCS.BucketObjectPolicy.Bucket | String | Name of the bucket in which the object resides. |
| GCS.BucketObjectPolicy.Object | String | Name of the object holding the Access Control List. |
| GCS.BucketObjectPolicy.Entity | String | The entity holding the permission. |
| GCS.BucketObjectPolicy.Email | String | Email address associated with the entity (if any). |
| GCS.BucketObjectPolicy.Role | String | The access permission for the entity. |
| GCS.BucketObjectPolicy.Team | String | Project team associated with the entity (if any). |
Command Example
gcs-list-bucket-object-policy bucket_name=my-bucket object_name=/some/path/my_file.txt
Human Readable Output
ACL policy for object foo/bar/moshe.txt
| Bucket | Object | Entity | Role | Team | |
|---|---|---|---|---|---|
| my-bucket | /some/path/my_file.txt | allAuthenticatedUsers | READER | ||
| my-bucket | /some/path/my_file.txt | user-alice@company.com | alice@company.com | OWNER | owners |
13. Adds a new entity to an object's Access Control List
Adds a new entity to an object's Access Control List. Note: use the gcs-put-bucket-object-policy command to update an existing entry.
Base Command
gcs-create-bucket-object-policy
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket in which the object resides. | Required |
| object_name | Name of the object in which to modify the Access control List. | Required |
| entity | Entity to add into the Access Control List. Common entity formats are: * user-<userId or email> * group-<groupId or email> * allUsers * allAuthenticatedUsers For more options and details, see this reference |
Required |
| role | The access permission for the entity. | Required |
Command Example
gcs-create-bucket-object-policy bucket_name=my-bucket object_name=/some/path/my_file.txt entity=allUsers role=Reader
Human Readable Output
Added entity allUsers to ACL of object /some/path/my_file.txt with role Reader
14. Update an existing entity in an object's Access Control List
Updates an existing entity in an object's Access Control List. Note: use gcs-create-bucket-object-policy command to create a new entry.
Base Command
gcs-put-bucket-object-policy
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket in which the object resides. | Required |
| object_name | Name of the object in which to modify access controls. | Required |
| entity | The entity to update in the Access Control List. Common entity formats are: * user-<userId or email> * group-<groupId or email> * allUsers * allAuthenticatedUsers For more options and details, see this reference |
Required |
| role | The access permissions for the entity. | Required |
Command Example
gcs-put-bucket-object-policy bucket_name=my-bucket object_name=/some/path/my_file.txt entity=allUsers role=Owner
Human Readable Output
Updated ACL entity allUsers in object /some/path/my_file.txt to role Owner
15. Remove an entity from an object's Access Control List
Removes an entity from an object's Access Control List.
Base Command
gcs-delete-bucket-object-policy
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket in which the object resides. | Required |
| object_name | Name of the object in which to modify access controls. | Required |
| entity | Entity to remove from the Access Control List. Common entity formats are: * user-<userId or email> * group-<groupId or email> * allUsers * allAuthenticatedUsers For more options and details, see this reference |
Required |
Command Example
gcs-delete-bucket-object-policy bucket_name=my-bucket object_name=/some/path/my_file.txt entity=allUsers
Human Readable Output
Removed entity allUsers from ACL of object /some/path/my_file.txt
16. Copy an object from one bucket to another
Copies an object from one bucket to another.</h3>
Base Command
gcs-copy-file
Input
| Argument Name | Description | Required |
|---|---|---|
| source_bucket_name | Name of the Bucket to copy the object from. If not specified, operation will be performed on the default bucket parameter. | Optional |
| destination_bucket_name | Name of the Bucket to copy the object to | Required |
| source_object_name | Name of the object to copy | Required |
| destination_object_name | Name of the object in the destination bucket. If not specified, operation will be performed with the source_object_name parameter. | Optional |
Command Example
gcs-copy-file source_bucket_name="my-bucket" destination_bucket_name="another-bucket" source_object_name="/some/path/my_file.txt"
Human Readable Output
File was successfully copied to bucket "another-bucket" as /some/path/my_file.txt
17. Use public access prevention
Blocks public access to a specified Google Cloud Storage bucket by enabling public access prevention, ensuring only authorized users can access the bucket.</h3>
Base Command
gcs-block-public-access-bucket
Input
| Argument Name | Description | Required |
|---|---|---|
| bucket_name | Name of the bucket to which public access policy is to be applied. | Optional |
| public_access_prevention | Defines the public access prevention mode for the bucket. - enforced: Completely blocks public access to the bucket, ensuring only authorized users can access it. - inherited: The bucket will inherit the public access prevention setting from its parent project. | Required |
Command Example
gcs-block-public-access-bucket source_bucket_name="my-bucket" public_access_prevention="enforced"
Human Readable Output
Public access prevention is set to enforced for my-bucket.
### gcs-delete-file *** Deletes a file (object) from a bucket. #### Base Command `gcs-delete-file` #### Input | **Argument Name** | **Description** | **Required** | | --- | --- | --- | | object_name | Name of the file to delete. | Required | | bucket_name | Name of the bucket that stores the file to delete. | Optional | #### Context Output There is no context output for this command.Configuration parameters
service_account_json— Service Account Private Key file contents (JSON)credentials_service_account_json—default_bucket— Default Bucketproxy— Use system proxy settingsinsecure— Trust any certificate (not secure)
Commands (18)
-
gcs-block-public-access-bucketBlocks public access to a specified Google Cloud Storage bucket by enabling public access prevention, ensuring only authorized users can access the bucket.
-
gcs-copy-fileCopies a file (object) from one bucket to another.
-
gcs-create-bucketCreates a new bucket.
-
gcs-create-bucket-object-policyAdds a new entity to an object's Access Control List. Note: use the gcs-put-bucket-object-policy command to update an existing entry.
-
gcs-create-bucket-policyAdds a new entity to a bucket's Access Control List. Note: use the gcs-put-bucket-policy command to update an existing entry.
-
gcs-delete-bucketDeletes a bucket.
-
gcs-delete-bucket-object-policyRemoves an entity from an object's Access Control List.
-
gcs-delete-bucket-policyRemoves an entity from a bucket's Access Control List.
-
gcs-delete-fileDeletes a file (object) from a bucket.
-
gcs-download-fileRetrieves object data into a file.
-
gcs-get-bucketRetrieves bucket information.
-
gcs-list-bucket-object-policyRetrieves the Access Control List of an object.
-
gcs-list-bucket-objectsRetrieves the list of objects in a bucket.
-
gcs-list-bucket-policyRetrieves the Access Control List of a bucket.
-
gcs-list-bucketsRetrieves the list of buckets.
-
gcs-put-bucket-object-policyUpdates an existing entity in an object's Access Control List. Note: use gcs-create-bucket-object-policy command to create a new entry.
-
gcs-put-bucket-policyUpdates an existing entity in a bucket's Access Control List. Note: use the gcs-create-bucket-policy command to create a new entry.
-
gcs-upload-fileUploads a file (object) into a bucket.
category: IT Services provider: Google sectionorder: - Connect commonfields: id: Google Cloud Storage version: -1 configuration: - display: Service Account Private Key file contents (JSON) name: service_account_json type: 4 hidden: true required: false section: Connect - displaypassword: Service Account Private Key file contents (JSON) name: credentials_service_account_json hiddenusername: true type: 9 required: false display: "" section: Connect - display: Default Bucket name: default_bucket type: 0 required: false section: Connect - display: Use system proxy settings name: proxy type: 8 required: false section: Connect - display: Trust any certificate (not secure) name: insecure type: 8 required: false section: Connect description: Google Cloud Storage is a RESTful online file storage web service for storing and accessing data on Google Cloud Platform infrastructure. display: Google Cloud Storage name: Google Cloud Storage script: commands: - description: Retrieves the list of buckets. name: gcs-list-buckets outputs: - contextPath: GCS.Bucket.Name description: Bucket name (also ID). type: String - contextPath: GCS.Bucket.TimeCreated description: Bucket creation time. type: Date - contextPath: GCS.Bucket.TimeUpdated description: Last time bucket was modified. type: Date - contextPath: GCS.Bucket.OwnerID description: Bucket owner ID. type: String arguments: [] - arguments: - default: true description: Name of the bucket to retrieve. If not specified, operation will be performed on the default bucket parameter. name: bucket_name description: Retrieves bucket information. name: gcs-get-bucket outputs: - contextPath: GCS.Bucket.Name description: Bucket name (also ID). type: String - contextPath: GCS.Bucket.TimeCreated description: Bucket creation time. type: Date - contextPath: GCS.Bucket.TimeUpdated description: Last time bucket was modified. type: Date - contextPath: GCS.Bucket.OwnerID description: Bucket owner ID. type: String - arguments: - default: true description: Name of the bucket to create. name: bucket_name required: true - auto: PREDEFINED description: Access Control List for the bucket. name: bucket_acl predefined: - authenticatedRead - private - projectPrivate - publicRead - publicReadWrite - auto: PREDEFINED description: Default Access Control List for the object. name: default_object_acl predefined: - authenticatedRead - bucketOwnerFullControl - bucketOwnerRead - private - projectPrivate - publicRead - defaultValue: US description: The location of the bucket, The default value is US. name: location - auto: PREDEFINED description: Whether the bucket is configured to allow only IAM, The default value is false. name: uniform_bucket_level_access defaultValue: 'false' predefined: - 'false' - 'true' description: Creates a new bucket. name: gcs-create-bucket - arguments: - default: true description: Name of the bucket to delete. name: bucket_name required: true - auto: PREDEFINED defaultValue: 'false' description: Forces the bucket to delete (if not empty). name: force predefined: - 'true' - 'false' required: true description: Deletes a bucket. name: gcs-delete-bucket - arguments: - 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: - contextPath: GCS.BucketObject.Name description: Object name. type: String - contextPath: GCS.BucketObject.Bucket description: Name of the bucket containing the object. type: String - contextPath: GCS.BucketObject.ContentType description: Content-Type of the object data. type: String - contextPath: GCS.BucketObject.TimeCreated description: Object creation time. type: Date - contextPath: GCS.BucketObject.TimeUpdated description: Last time object was modified. type: Date - contextPath: GCS.BucketObject.TimeDeleted description: Object deletion time (available if the object is archived). type: Date - contextPath: GCS.BucketObject.Size description: Object size in bytes. type: Number - contextPath: GCS.BucketObject.MD5 description: MD5 hash of the data in Base64. type: String - contextPath: GCS.BucketObject.OwnerID description: Object owner ID. type: String - contextPath: GCS.BucketObject.CRC32c description: CRC32c checksum (as described in RFC 4960, Appendix B https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_html_rfc4960-23appendix-2DB&d=DwIGAg&c=V9IgWpI5PvzTw83UyHGVSoW3Uc1MFWe5J8PTfkrzVSo&r=b9Fq_yWX5bK6LtJv3NzERfzrKVHG5CUxWT-Z_zrN7_0&m=23UgUuCAGIb_tk2KjPQ7flkf3KxEH2uNP5shu6agImd-DtM0WdvP9g6W20UUx7XU&s=MR1rkxIrivnuZMyIZTpFtBdsKt5EkVuLzeEp8_vY-oQ&e= ), encoded using Base64 in big-endian byte order. type: String - contextPath: GCS.BucketObject.EncryptionAlgorithm description: The encryption algorithm. type: String - contextPath: GCS.BucketObject.EncryptionKeySHA256 description: SHA256 hash value of the encryption key. type: String - arguments: - description: Name of the bucket in which the object resides. If not specified, operation will be performed on the default bucket parameter. name: bucket_name - default: true description: Name of the object to download. name: object_name required: true - description: Name of the file in which the object is downloaded (if not specified, the name is derived from the object name, but this may fail if the object contains invalid filename characters). name: saved_file_name description: Retrieves object data into a file. name: gcs-download-file - arguments: - default: true description: ID of a context entry containing the file to upload. name: entry_id required: true - description: Name of the bucket in which to upload the object. If not specified, operation will be performed on the default bucket parameter. name: bucket_name - description: Name of the uploaded object within the bucket. name: object_name required: true - auto: PREDEFINED description: Access Control List for the uploaded object. name: object_acl predefined: - authenticatedRead - bucketOwnerFullControl - bucketOwnerRead - private - projectPrivate - publicRead description: Uploads a file (object) into a bucket. name: gcs-upload-file - arguments: - default: true description: Name of the bucket for the Access Control List. If not specified, operation will be performed on the default bucket parameter. name: bucket_name description: Retrieves the Access Control List of a bucket. name: gcs-list-bucket-policy outputs: - contextPath: GCS.BucketPolicy.Bucket description: Name of the bucket holding the Access Control List. type: String - contextPath: GCS.BucketPolicy.Entity description: The entity holding the permission. type: String - contextPath: GCS.BucketPolicy.Email description: Email address associated with the entity (if any). type: String - contextPath: GCS.BucketPolicy.Role description: The access permission for the entity. type: String - contextPath: GCS.BucketPolicy.Team description: Project team associated with the entity (if any). type: String - arguments: - description: Name of the bucket in which to modify the Access Control List. If not specified, operation will be performed on the default bucket parameter. name: bucket_name - default: true description: "Entity to add into the Access Control List.\nCommon entity formats are:\n* user-<userId or email>\n* group-<groupId or email>\n* allUsers\n* allAuthenticatedUsers\nFor more options and details, see: https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.google.com_storage_docs_json-5Fapi_v1_bucketAccessControls-23resource&d=DwIGAg&c=V9IgWpI5PvzTw83UyHGVSoW3Uc1MFWe5J8PTfkrzVSo&r=b9Fq_yWX5bK6LtJv3NzERfzrKVHG5CUxWT-Z_zrN7_0&m=23UgUuCAGIb_tk2KjPQ7flkf3KxEH2uNP5shu6agImd-DtM0WdvP9g6W20UUx7XU&s=1GCdJlrnmwfjQl_Y784dvhpe-evnWU4_QIdNVfl9xJw&e= " name: entity required: true - auto: PREDEFINED description: The access permission for the entity. name: role predefined: - Reader - Writer - Owner required: true description: |- Adds a new entity to a bucket's Access Control List. Note: use the gcs-put-bucket-policy command to update an existing entry. name: gcs-create-bucket-policy - arguments: - description: Name of the bucket in which to modify the Access Control List. If not specified, operation will be performed on the default bucket parameter. name: bucket_name - default: true description: "The entity to update in the Access Control List.\nCommon entity formats are:\n* user-<userId or email>\n* group-<groupId or email>\n* allUsers\n* allAuthenticatedUsers\nFor more options and details, see: https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.google.com_storage_docs_json-5Fapi_v1_bucketAccessControls-23resource&d=DwIGAg&c=V9IgWpI5PvzTw83UyHGVSoW3Uc1MFWe5J8PTfkrzVSo&r=b9Fq_yWX5bK6LtJv3NzERfzrKVHG5CUxWT-Z_zrN7_0&m=23UgUuCAGIb_tk2KjPQ7flkf3KxEH2uNP5shu6agImd-DtM0WdvP9g6W20UUx7XU&s=1GCdJlrnmwfjQl_Y784dvhpe-evnWU4_QIdNVfl9xJw&e= " name: entity required: true - auto: PREDEFINED description: The access permissions for the entity. name: role predefined: - Reader - Writer - Owner required: true description: |- Updates an existing entity in a bucket's Access Control List. Note: use the gcs-create-bucket-policy command to create a new entry. name: gcs-put-bucket-policy - arguments: - description: Name of the bucket in which to modify the Access Control List. If not specified, operation will be performed on the default bucket parameter. name: bucket_name - default: true description: "Entity to remove from the Access Control List.\nCommon entity formats are:\n* user-<userId or email>\n* group-<groupId or email>\n* allUsers\n* allAuthenticatedUsers\nFor more options and details, see: https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.google.com_storage_docs_json-5Fapi_v1_bucketAccessControls-23resource&d=DwIGAg&c=V9IgWpI5PvzTw83UyHGVSoW3Uc1MFWe5J8PTfkrzVSo&r=b9Fq_yWX5bK6LtJv3NzERfzrKVHG5CUxWT-Z_zrN7_0&m=23UgUuCAGIb_tk2KjPQ7flkf3KxEH2uNP5shu6agImd-DtM0WdvP9g6W20UUx7XU&s=1GCdJlrnmwfjQl_Y784dvhpe-evnWU4_QIdNVfl9xJw&e= " name: entity required: true description: Removes an entity from a bucket's Access Control List. name: gcs-delete-bucket-policy - arguments: - description: Name of the bucket in which the object resides. If not specified, operation will be performed on the default bucket parameter. name: bucket_name - default: true description: Name of the object in which to list access controls. name: object_name required: true description: Retrieves the Access Control List of an object. name: gcs-list-bucket-object-policy outputs: - contextPath: GCS.BucketObjectPolicy.Bucket description: Name of the bucket in which the object resides. type: String - contextPath: GCS.BucketObjectPolicy.Object description: Name of the object holding the Access Control List. type: String - contextPath: GCS.BucketObjectPolicy.Entity description: The entity holding the permission. type: String - contextPath: GCS.BucketObjectPolicy.Email description: Email address associated with the entity (if any). type: String - contextPath: GCS.BucketObjectPolicy.Role description: The access permission for the entity. type: String - contextPath: GCS.BucketObjectPolicy.Team description: Project team associated with the entity (if any). type: String - arguments: - description: Name of the bucket in which the object resides. If not specified, operation will be performed on the default bucket parameter. name: bucket_name - description: Name of the object in which to modify the Access control List. name: object_name required: true - default: true description: "Entity to add into the Access Control List.\nCommon entity formats are:\n* user-<userId or email>\n* group-<groupId or email>\n* allUsers\n* allAuthenticatedUsers\nFor more options and details, see: https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.google.com_storage_docs_json-5Fapi_v1_bucketAccessControls-23resource&d=DwIGAg&c=V9IgWpI5PvzTw83UyHGVSoW3Uc1MFWe5J8PTfkrzVSo&r=b9Fq_yWX5bK6LtJv3NzERfzrKVHG5CUxWT-Z_zrN7_0&m=23UgUuCAGIb_tk2KjPQ7flkf3KxEH2uNP5shu6agImd-DtM0WdvP9g6W20UUx7XU&s=1GCdJlrnmwfjQl_Y784dvhpe-evnWU4_QIdNVfl9xJw&e= " name: entity required: true - auto: PREDEFINED description: The access permission for the entity. name: role predefined: - Reader - Owner required: true description: |- Adds a new entity to an object's Access Control List. Note: use the gcs-put-bucket-object-policy command to update an existing entry. name: gcs-create-bucket-object-policy - arguments: - description: Name of the bucket in which the object resides. If not specified, operation will be performed on the default bucket parameter. name: bucket_name - description: Name of the object in which to modify access controls. name: object_name required: true - default: true description: "The entity to update in the Access Control List.\nCommon entity formats are:\n* user-<userId or email>\n* group-<groupId or email>\n* allUsers\n* allAuthenticatedUsers\nFor more options and details, see: https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.google.com_storage_docs_json-5Fapi_v1_bucketAccessControls-23resource&d=DwIGAg&c=V9IgWpI5PvzTw83UyHGVSoW3Uc1MFWe5J8PTfkrzVSo&r=b9Fq_yWX5bK6LtJv3NzERfzrKVHG5CUxWT-Z_zrN7_0&m=23UgUuCAGIb_tk2KjPQ7flkf3KxEH2uNP5shu6agImd-DtM0WdvP9g6W20UUx7XU&s=1GCdJlrnmwfjQl_Y784dvhpe-evnWU4_QIdNVfl9xJw&e= " name: entity required: true - auto: PREDEFINED description: The access permissions for the entity. name: role predefined: - Reader - Owner required: true description: |- Updates an existing entity in an object's Access Control List. Note: use gcs-create-bucket-object-policy command to create a new entry. name: gcs-put-bucket-object-policy - arguments: - description: Name of the bucket in which the object resides. If not specified, operation will be performed on the default bucket parameter. name: bucket_name - description: Name of the object in which to modify access controls. name: object_name required: true - default: true description: "Entity to remove from the Access Control List.\nCommon entity formats are:\n* user-<userId or email>\n* group-<groupId or email>\n* allUsers\n* allAuthenticatedUsers\nFor more options and details, see: https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.google.com_storage_docs_json-5Fapi_v1_bucketAccessControls-23resource&d=DwIGAg&c=V9IgWpI5PvzTw83UyHGVSoW3Uc1MFWe5J8PTfkrzVSo&r=b9Fq_yWX5bK6LtJv3NzERfzrKVHG5CUxWT-Z_zrN7_0&m=23UgUuCAGIb_tk2KjPQ7flkf3KxEH2uNP5shu6agImd-DtM0WdvP9g6W20UUx7XU&s=1GCdJlrnmwfjQl_Y784dvhpe-evnWU4_QIdNVfl9xJw&e= " name: entity required: true description: Removes an entity from an object's Access Control List. name: gcs-delete-bucket-object-policy - arguments: - description: Name of the Bucket to copy the object from. If not specified, operation will be performed on the default bucket parameter. name: source_bucket_name - description: Name of the Bucket to copy the object to. name: destination_bucket_name required: true - description: Name of the object to copy. name: source_object_name required: true - description: Name of the object in the destination bucket. If not specified, operation will be performed with the source_object_name parameter. name: destination_object_name description: Copies a file (object) from one bucket to another. name: gcs-copy-file - arguments: - description: Name of the bucket to which public access policy is to be applied. name: bucket_name required: false - description: | Defines the public access prevention mode for the bucket. - enforced: Completely blocks public access to the bucket, ensuring only authorized users can access it. - inherited: The bucket will inherit the public access prevention setting from its parent project. name: public_access_prevention required: true auto: PREDEFINED defaultValue: 'enforced' predefined: - enforced - inherited description: | Blocks public access to a specified Google Cloud Storage bucket by enabling public access prevention, ensuring only authorized users can access the bucket. name: gcs-block-public-access-bucket - name: gcs-delete-file arguments: - name: object_name required: true description: Name of the file to delete. - name: bucket_name description: Name of the bucket that stores the file to delete. description: Deletes a file (object) from a bucket. execution: true dockerimage: demisto/google-cloud-storage:1.0.0.10120494 runonce: false script: '' type: python subtype: python3 tests: - GCS - Test fromversion: 5.0.0