use_object_storage_bucket 方法

命名空间和模块:tencent.cloud.serverless.functions.client.FunctionTrigger

简要

配置使用对象存储桶触发器。什么是对象存储桶触发器?

def use_object_storage_bucket(self,
    bucket_endpoint: str,
    bucket_requirement_context: dict
)

参数

该方法具有以下参数,其参数、参数类型和参数描述如下:

返回值

该方法返回当前代表触发器配置的 FunctionTrigger 类实例本身。

异常

该方法可能会主动引发的异常类型如下:

ValueError

参数值或类型不符合预期。

示例

下面我们将通过一段 Python 代码向您演示如何使用该方法:

functions.FunctionTrigger.use_object_storage_bucket(
    bucket_endpoint = 'scf-code-1000000000.cos.ap-shanghai.myqcloud.com',
    bucket_requirement_context = {
        'event_id': 'cos:ObjectCreated:*'
    }
)

适用于

Tencent Cloud SDK for Python

产品软件包:tencent-cloud-sdk-serverless-functions >= 0.1.1

最后更新于