This function will not synchronize files stored in the bucket before function was started
Contains cloud function code to execute with trigger type Cloud storage
and event type Finalise/Create
. This function uses GCP Secret Manager to retrieve JWT token to access Sesam node. Check environment variables section for details.
- SESAM_PIPE_NAME - name of receiver pipe (see example in example-pipe.json)
- SESAM_NODE_NAME - name of Sesam.io node
- SESAM_TOKEN_SECRET - name of secret where JWT token to access the node is stored (cloud function service account must have permission to read it)
To push data into Sesam an http_endpoint source pipe is needed. An example provided below.
{
"_id": "example-pipe",
"type": "pipe",
"source": {
"type": "http_endpoint"
},
"transform": [{
"type": "dtl",
"rules": {
"default": [
["add", "_id", "_S.selfLink"],
["copy", "*"]
]
}
}]
}