forked from devsapp/cdn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.yaml
197 lines (197 loc) · 5.87 KB
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
Type: Component
Name: cdn
Provider:
- 阿里云
Version: dev
Description: 阿里云CDN 操作
HomePage: https://github.com/devsapp/cdn
Tags: #标签详情
- CDN
Category: 基础云服务
Service:
CDN:
Authorities: #权限描述
- AliyunCDNFullAccess
Commands: # 指令,格式为指令:指令描述,例如:
deploy: 部署
start: 启动
stop: 停用
refresh: 刷新节点上的文件内容
warmUp: 预热源站内容
remove: 删除加速域名
help: 帮助
Properties:
required:
- cdnType
- domainName
- sources
cdnType:
title: 加速域名的业务类型
enum:
- web # 图片小文件
- download # 大文件下载
- video # 视音频点播
x-enum-label:
- 图片小文件
- 大文件下载
- 视音频点播
default: web
domainName:
title: 加速域名
description: 需要接入CDN的加速域名。支持泛域名,以英文句号(.)开头,例如.example.com。
type: string
examples:
- .example.com
sources:
type: array
title: 回源地址列表
default: []
examples: []
minItems: 1
uniqueItems: true
items:
oneOf:
- type: object
title: 回源地址
required:
- type
- content
properties:
type:
title: 源站类型
enum:
- ipaddr # IP源站
- domain # 域名源站
- oss # OSS Bucket为源站
- fc_domain # 函数计算为源站
x-enum-label:
- IP源站
- 域名源站
- OSS Bucket为源站
- 函数计算为源站
content:
title: 回源地址
description: 可以是IP或域名。
type: string
port:
title: 端口
description: 可以指定443或80端口,也可以自定义端口,默认值为80端口。443端口支持HTTPS协议回源。
priority:
title: 优先级
description: 源站地址对应的优先级。支持20和30,默认值为20。20是主源,30是备源。
enum:
- 20
- 30
x-enum-label:
- 主源
- 备源
default: 20
weight:
title: 回源权重
description: 回源权重,取值范围为100以内,默认值为10。
type: integer
default: 10
maximum: 100
checkUrl:
type: string
title: 健康检测URL
examples:
- www.example.com/test.html
scope:
title: 加速区域
enum:
- domestic
- overseas
- global
x-enum-label:
- 仅中国内地
- 全球(不包含中国内地)
- 全球
default: domestic
topLevelDomain:
type: string
title: 顶级接入域
examples:
- example.com
refreshConfig:
type: object
title: 刷新节点的文件内容配置
required:
- objectPaths
properties:
objectPaths:
type: array
title: 刷新URL
default: [ ]
examples: [ ]
uniqueItems: true
items:
oneOf:
- type: string
description: "objectType时必须以http://或https://开头,不能重复。请参考<a href='https://help.aliyun.com/document_detail/27140.html?spm=api-workbench.API%20Explorer.0.0.48731e0fH4DOa6'>刷新和预热资源</a>,正则刷新的功能说明和操作示例请参考<a href='https://help.aliyun.com/document_detail/146195.html?spm=api-workbench.API%20Explorer.0.0.48731e0fH4DOa6'>正则刷新说明</a>。"
objectType:
default: File
title: 刷新的类型
enum:
- File
- Directory
- Regex
x-enum-label:
- 文件刷新
- 目录刷新
- 正则刷新
pushObjectCacheConfig:
type: object
title: 预热源站内容配置
required:
- objectPaths
properties:
objectPaths:
type: array
title: 预热URL
default: [ ]
examples: [ ]
uniqueItems: true
items:
oneOf:
- type: string
description: 必须以http://或https://开头,不能重复。
pattern: '^((https|http)?:\/\/)[^\s]+'
area:
title: 预热区域
description: 如果不传该参数,默认的预热区域为您的域名所配置的CDN加速区域。
enum:
- domestic
- overseas
x-enum-label:
- 仅中国内地
- 全球(不包含中国内地)
l2Preload:
title: 是否直接预热到L2节点
type: boolean
description: true:代表预热的节点层级必须包含L2节点。false:代表仅预热回源层节点(false为默认值,回源层节点可能是L2节点,也可能是L3节点)。
waitUntilFinished:
title: 是否等待完全执行再进行下一步
type: boolean
default: true
maxWaitMs:
title: 最长等待毫秒数
description: 与waitUntilFinised参数配合使用,超过最长等待时间不再等待,直接执行下一步,默认最长等待七分钟
default: 60000
refreshAfterDeploy:
title: 部署后自动刷新cdn
description: 如果该值为true,且参数refreshConfig未填写,直接刷新加速域名下所有的文件
type: boolean
default: true
autoOpen:
title: 自动开通cdn服务
description: cdn服务未开通时自动开通
default: true
autoCreate:
title: 自动创建加速域名
description: start时,加速域名不存在自动创建
default: true
autoStart:
title: 自动启用加速域名
description: 更新加速域名信息时,如果加速域名已停用自动启用
default: true