Skip to content

Commit

Permalink
Merge pull request #121 from aliyun/add_custom_domain_spec
Browse files Browse the repository at this point in the history
add custom domain docs
  • Loading branch information
tanhe123 authored Dec 29, 2018
2 parents 2bb0df0 + a21045d commit 3b8f659
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 1 deletion.
41 changes: 41 additions & 0 deletions docs/specs/2018-04-03-zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Resources:
- [Aliyun::Serverless::Service](#aliyunserverlessservice)
- [Aliyun::Serverless::Function](#aliyunserverlessfunction)
- [Aliyun::Serverless::CustomDomain](#aliyunserverlesscustomdomain)
- [Aliyun::Serverless::Api](#aliyunserverlessapi)
- [Aliyun:Serverless::TableStore](#aliyunserverlesstablestore)
- [Aliyun:Serverless::TableStore::Table](#aliyunserverlesstablestoretable)
Expand Down Expand Up @@ -122,6 +123,33 @@ MyService: # service name
Timeout: 15
```

#### Aliyun::Serverless::CustomDomain

创建自定义域名。自定义域名是函数计算的一个功能,可以通过自定义域名调用函数执行。

##### 属性
属性名称 | 类型 | 描述
---|:---:|---
Protocol | `string` | 自定义域名支持的协议类型。
RouteConfig | [PathConfig](#pathConfig) 数组 | 路由表,配置路径和函数的映射关系。

##### 示例:Aliyun::Serverless::CustomDomain

```yaml
abc.com: # domain name
Type: 'Aliyun::Serverless::CustomDomain'
Properties:
Protocol: HTTP
RouteConfig:
routes:
'/a':
serviceName: serviceA
functionName: functionA
'/b':
serviceName: serviceB
functionName: functionB
```

#### Aliyun::Serverless::Api

创建可通过 HTTPS 端点调用的阿里云 API 网关资源和方法的集合。
Expand Down Expand Up @@ -491,3 +519,16 @@ CodeUri 用来指定代码存储的位置,它可以用来指定:
oss 文件:`CodeUri: 'oss://my-fc-testt/2018/helloworld.zip'`

其中,当指定为 oss 文件时,形式为 `CodeUri: 'oss://bucket-name/filepath'`

<a name="pathConfig"></a>
#### PathConfig

PathConfig 用于设置自定义域名中路径与函数的映射关系。

示例:

```
'/a': # path
serviceName: serviceA
functionName: functionA
```
42 changes: 41 additions & 1 deletion docs/specs/2018-04-03.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ Resources:
All property names in Aliyun Fun are **case sensitive**.
### Resource types
- [Aliyun::Serverless::Service](#aliyunserverlessservice)
- [Aliyun::Serverless::Function](#aliyunserverlessfunction)
- [Aliyun::Serverless::CustomDomain](#aliyunserverlesscustomdomain)
- [Aliyun::Serverless::Api](#aliyunserverlessapi)
- [Aliyun::Serverless::TableStore](#aliyunserverlesstablestore)
- [Aliyun:Serverless::TableStore::Table](#aliyunserverlesstablestoretable)
Expand Down Expand Up @@ -117,6 +119,33 @@ MyService: # service name
Timeout: 15
```

#### Aliyun::Serverless::CustomDomain

create Custom Domain。Custom Domain is a feature of Function Compute, users can invoke functions via Custom Domain.

##### Properties
Property Name | Type | Description
---|:---:|---
Protocol | `string` | supported protocol
RouteConfig | [PathConfig](#pathConfig) array | mappings of paths and functions

##### Example:Aliyun::Serverless::CustomDomain

```yaml
abc.com: # domain name
Type: 'Aliyun::Serverless::CustomDomain'
Properties:
Protocol: HTTP
RouteConfig:
routes:
'/a':
serviceName: serviceA
functionName: functionA
'/b':
serviceName: serviceB
functionName: functionB
```

#### Aliyun::Serverless::Api

Creates a collection of Aliyun API Gateway resources and methods that can be invoked through HTTPS endpoints.
Expand Down Expand Up @@ -387,4 +416,15 @@ oss file: `CodeUri: 'oss://my-fc-testt/2018/helloworld.zip'`。

Among them, when specified as an oss file, the format is `CodeUri: 'oss://bucket-name/filepath'`.

<a name="pathConfig"></a>
#### PathConfig

PathConfig is used to set mapping relation of path and function.

Example:

```
'/a': # path
serviceName: serviceA
functionName: functionA
```

0 comments on commit 3b8f659

Please sign in to comment.