Skip to content

Commit

Permalink
define the specification document for oss (alibaba#190)
Browse files Browse the repository at this point in the history
* define the specification document for oss
  • Loading branch information
coco-super authored and tanhe123 committed Apr 16, 2019
1 parent 7df2eb0 commit 1366a6a
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/specs/2018-04-03-zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ test-topic:
- [RDS](#rds)
- [MNSTopic](#mns_topic)
- [TableStore](#tablestore)
- [OSS](#OSS)

#### Timer

Expand Down Expand Up @@ -423,7 +424,32 @@ tablestore-trigger-test: # trigger name
InstanceName: test-inst
TableName: test-tbl
```
#### OSS

描述类型为 [OSS 触发器](https://help.aliyun.com/document_detail/62922.html) 的对象。

##### 属性

属性名称 | 类型 | 描述
---|:---:|---
events| `array` | **必填。** 为 OSS 端触发函数执行的事件,比如参数为 ["oss:ObjectCreated:PutObject", "oss:ObjectCreated:PutSymlink"] 等...
filter | `object` | **选填。** 为 OSS 对象过滤参数,满足过滤条件的 OSS 对象才可以触发函数,包含一个配置属性 key,表示过滤器支持过滤的对象键 (key)。
key | [key 对象](#key-配置对象) | **选填。** 过滤器支持过滤的对象键

##### 示例:OSS 事件源对象

```yaml
oss-trigger-test: # trigger name
Type: OSS # trigger type
Properties:
events:
- oss:ObjectCreated:*
- oss:ObjectRemoved:DeleteObject
filter:
key:
prefix: source/
suffix: .png
```

### Property 类型

Expand Down Expand Up @@ -571,4 +597,17 @@ PathConfig 用于设置自定义域名中路径与函数的映射关系。
'/a': # path
serviceName: serviceA
functionName: functionA
```

#### key-配置对象

key 配置对象包含的属性包括: `prefix``suffix` 属性。它们所代表的含义分别为:匹配前缀和匹配后缀。

示例:

```
key:
prefix: source/
suffix: .png
```
42 changes: 42 additions & 0 deletions docs/specs/2018-04-03.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ test-log-project:
- [RDS](#rds)
- [MNSTopic](#mns_topic)
- [TableStore](#tablestore)
- [OSS](#OSS)

#### Timer

Expand Down Expand Up @@ -396,6 +397,33 @@ tablestore-trigger-test: # trigger name
TableName: test-tbl
```

#### OSS

Describe the object of type [OSS Trigger](https://help.aliyun.com/document_detail/62922.html)。

##### Properties

Property Name | Type | Description
---|:---:|---
events | `array` | **Required.** Indicates the type of an OSS event.
filter | `object` | **Optional.** Filters OSS events. Only OSS objects that meet the filtering condition can trigger a function. This parameter has a key attribute:
key | [`key configuration object`](#key-configuration-object) | **Optional。** Indicates the key supported by the filter.

##### Example: OSS event source object

```yaml
oss-trigger-test: # trigger name
Type: OSS # trigger type
Properties:
events:
- oss:ObjectCreated:*
- oss:ObjectRemoved:DeleteObject
filter:
key:
prefix: source/
suffix: .png
```

### Property types

- [Event source object](#event-source-object)
Expand Down Expand Up @@ -544,3 +572,17 @@ Example:
serviceName: serviceA
functionName: functionA
```

#### key configuration object

The properties that the key configuration object contains include the `prefix` and `suffix` attributes.
They mean the following: matching prefix and matching suffix.

Example:

```
key:
prefix: source/
suffix: .png
```

0 comments on commit 1366a6a

Please sign in to comment.