File tree 2 files changed +11
-11
lines changed 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ It handles a Google Cloud Function that sends information to the function log ab
8
8
9
9
* You must have a [ Google Cloud Platform (GCP)] ( http://cloud.google.com/ ) account.
10
10
11
- * The code was written for Python 3 and Google Cloud Python Client Library .
11
+ * The code was written for Python 3.
12
12
13
13
## Using the code
14
14
Original file line number Diff line number Diff line change 4
4
# It handles a Google Cloud Funtion that sends information to the log about an object when it appears in a Cloud Storage bucket.
5
5
6
6
def gcs_event (event , context ):
7
- """Triggered by a change to a Cloud Storage bucket.
8
- Args:
9
- event (dict): Event payload.
10
- context (google.cloud.functions.Context): Metadata for the event.
11
- """
12
-
13
- file = event
14
- print (f"Bucket: { file ['bucket' ]} ." )
15
- print (f"Object: { file ['name' ]} ." )
16
- print (f"Object size: { file ['size' ]} ." )
7
+ """Triggered by a change to a Cloud Storage bucket.
8
+ Args:
9
+ event (dict): Event payload.
10
+ context (google.cloud.functions.Context): Metadata for the event.
11
+ """
12
+
13
+ file = event
14
+ print (f"Bucket: { file ['bucket' ]} ." )
15
+ print (f"Object: { file ['name' ]} ." )
16
+ print (f"Object size: { file ['size' ]} ." )
You can’t perform that action at this time.
0 commit comments