- Print
- PDF
Object Storage type trigger
- Print
- PDF
Available in VPC
You can create an Object Storage type trigger in Cloud Functions > Trigger of the NAVER CLOUD PLATFORM console. Object Storage is a service on the NAVER Cloud Platform that provides a file storage space so that users can store and browse desired data anytime, anywhere. It can be used to store large amounts of data or data that needs to be stored securely. It comes with an API that can be used to back up and restore server data.
- Additional fees will be charged when you request subscription to Object Storage. For an introduction to Object Storage and a description of the fee plan, see the Service > Storage > Object Storage menu of the NAVER CLOUD PLATFORM portal.
Please see the Running Actions/Triggers and Trigger for how to run and monitor triggers that have been created.
Create triggers
To create an Object Storage type trigger, you should click and select Object Storage as the trigger type, and set up the trigger's basic information and Object Storage connection information.
Set up connection information
Yon can set up connections for Object Storage type triggers in the Object Storage connection information of the console.
- Select a bucket from Object Storage to view a list of events that belong to that bucket.
- Select a bucket and event, and then click the Add button to complete settings for the connection information of Object Storage. One or more events can be added, and each event occurrence will execute the same trigger.
- You must read the precautions on recursive calls and mark it as read in order to be able to create triggers.
Note that if the action connected to the Object Storage type trigger uses the same bucket as the Object Storage event, the recursive call may increase usage and result in excessive charges.
- Up to 10 triggers can be connected to a single bucket.
- If you click the [Create a bucket] button, you can go to the Object Storage console, and create a new bucket.
- If you click the [Create a bucket event] button, you can create a new bucket event. For information on how to create a bucket event, see the Object Storage user guide.
If you select Cloud Functions as a target when you create a bucket event in Object Storage on the NAVER Cloud Platform console, you can connect to it by selecting an existing trigger or creating a new trigger.
Events delivered to the trigger
When an event created by Object Storage occurs, the event information will be delivered to the Object Storage type trigger. The delivered event can be used as a parameter in action code connected to the Object Storage type trigger, enabling a wide range of applications. The following is an example of an event delivered to an Object Storage type trigger.
{
"container_name": "my-bucket", // Bucket name
"event_name": "my-event-rule", // Event name
"event_type": "ObjectCreated:PUT" // Event type
"event_version": "1.0" // Event format version
"object_length": "1000", // Object size
"object_name": "my-object", // Object key
"region": "KR", // Region name
"remote_address": "127.0.0.1", // Request IP
"remote_user_sha256": "ef5dd4b34d...", // SHA256 hash hex value of user access key
"remote_user_type": "user", // User type
"request_method": "PUT", // Request method
"request_type": "REST.PUT.OBJECT", // Request type
"timestamp_finish": "1627881611929", // Time when the request processing finished, Unix time, milliseconds
"timestamp_start": "1627881611914" // Time when the request processing started, Unix time, milliseconds
}
- If remote_user_type is not user, then null is entered for remote_access and remote_user_sha256.
- Please see the Object Storage user guide for more information on bucket events.
As the order of event occurrence is not guaranteed, if order guarantee is required, it should be implemented in the action code by utilizing Timestamp in the event information.