检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
Workflow + Function: Automatically Processing Data in OBS Introduction Preparation Building a Program Processing Images
Creating an EG Trigger (OBS Application Service) This section describes how to create an EG trigger (OBS Application Service) on the FunctionGraph console. The EG trigger triggers a function when a file in an OBS bucket is updated.
OBS Events Huawei Cloud functions can be triggered by different event sources, which can be defined and configured through events. OBS Events In this example, an OBS event is set.
Step 2: Modify the Metadata of Function: Modify the OBS address, bucket name, and file name in the function configurations. Step 3: Test the Function: Verify whether the function can successfully download files from the OBS bucket.
Upload the fss_examples_python2.7.zip package to the OBS bucket and record the link URL of the OBS bucket.
Using an OBS Trigger For details about the OBS event source, see Supported Event Sources. Constraints OBS triggers are available only in CN-Hong Kong, AP-Bangkok, AP-Singapore, AP-Jakarta, LA-Mexico City2, and TR-Istanbulregions.
Uploading a deployment package using an OBS bucket After creating a ZIP deployment package, upload it to an OBS bucket in the same region as your FunctionGraph, and then paste the link URL of the OBS bucket into the function.
Select Object Storage Service (OBS) for Trigger Type, and set the trigger information, as shown in Figure 1. Select bucket input_bucket. For Events, select Post and Put. Figure 1 Creating an OBS trigger Click OK.
OBS KAFKA Enumeration values: TIMER CTS DDS DMS DIS LTS OBS SMN KAFKA RABBITMQ DEDICATEDGATEWAY OPENSOURCEKAFKA APIC Gemini Mongo EVENTGRID IOTDA trigger_status No String Trigger status. Options: ACTIVE and DISABLED.
Compress project files into a ZIP file and upload it to an OBS bucket.
Figure 4 Saving a flow Parent topic: Workflow + Function: Automatically Processing Data in OBS
Data in OBS
Scenarios Upload files to a specified OBS bucket. Encrypt and decrypt each uploaded file. Upload the processed files to another OBS bucket. This tutorial uses two different OBS buckets.
For example, you can create a timer trigger to periodically analyze and process log data in an OBS bucket. Parent topic: Integrating with LTS to Analyze Logs in Real Time
Preparation Create an OBS bucket to store uploaded images. Then create an agency to delegate FunctionGraph to access OBS resources. Creating an OBS bucket The bucket and function must be in the same region.
Preparation Create two OBS buckets to store uploaded and encrypted/decrypted files, respectively. Create an agency to delegate FunctionGraph to access OBS resources.
For details, see Creating an EG Trigger (OBS Application Service). In addition, you can use the SDK tool of the corresponding language to implement OBS read/write operation in your function code. FunctionGraph provides two ephemeral storage specifications: 512 MB and 10 GB.
For non-standard third-party libraries that are not provided by FunctionGraph, you can use them by performing the following steps: Package the dependent libraries into a ZIP file, upload the ZIP file to an OBS bucket, and obtain the OBS link URL.
Parent topic: Workflow + Function: Automatically Processing Data in OBS
Compress project files into a ZIP file and upload it to an OBS bucket.