# FunctionTrigger 类

## 简要

代表无服务器云函数触发器配置的类。通过利用该类，您可以快速为无服务器云函数配置一个指定类型的触发器，而无需关注触发器配置数据类型。

```python
class FunctionTrigger
```

## 构造

该类仅支持构造类实例后使用，其构造实例方法签名如下：

```python
def __init__(self)
```

## 示例

在下文中我们将向您演示如何构造一个触发器配置类实例并使用它。

```python
from tencent.cloud.auth import credentials
from tencent.cloud.serverless import functions

# The method will return itself.

functions.FunctionTrigger().use_timer(
    timer_name = 'default',
    timer_cron = '* * * * *'
)
```

## 适用于

#### Tencent Cloud SDK for Python

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://smallso.gitbook.io/tencent-cloud-sdk/python-docs/serverless-functions/class-and-method/function-trigger.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
