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-\n* group-\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-\n* group-\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-\n* group-\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-\n* group-\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-\n* group-\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-\n* group-\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