-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
GoogleCloudStorage.yml
398 lines (398 loc) · 14.6 KB
/
GoogleCloudStorage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
category: IT Services
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
- displaypassword: Service Account Private Key file contents (JSON)
name: credentials_service_account_json
hiddenusername: true
type: 9
required: false
- display: Default Bucket
name: default_bucket
type: 0
required: false
- display: Use system proxy settings
name: proxy
type: 8
required: false
- display: Trust any certificate (not secure)
name: insecure
type: 8
required: false
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:
- 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://tools.ietf.org/html/rfc4960#appendix-B), 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.
Common entity formats are:
* user-<userId or email>
* group-<groupId or email>
* allUsers
* allAuthenticatedUsers
For more options and details, see: https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls#resource
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.
Common entity formats are:
* user-<userId or email>
* group-<groupId or email>
* allUsers
* allAuthenticatedUsers
For more options and details, see: https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls#resource
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.
Common entity formats are:
* user-<userId or email>
* group-<groupId or email>
* allUsers
* allAuthenticatedUsers
For more options and details, see: https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls#resource
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.
Common entity formats are:
* user-<userId or email>
* group-<groupId or email>
* allUsers
* allAuthenticatedUsers
For more options and details, see: https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls#resource
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.
Common entity formats are:
* user-<userId or email>
* group-<groupId or email>
* allUsers
* allAuthenticatedUsers
For more options and details, see: https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls#resource
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.
Common entity formats are:
* user-<userId or email>
* group-<groupId or email>
* allUsers
* allAuthenticatedUsers
For more options and details, see: https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls#resource
name: entity
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.83364
runonce: false
script: '-'
type: python
subtype: python3
tests:
- GCS - Test
fromversion: 5.0.0