校验运维模板
更新时间:2026-07-16
描述
该接口用于校验运维模版。
OpenAPI Explorer
去调试
您可以在 OpenAPI Explorer 中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer 可以自动生成 SDK 代码示例。
请求结构
Plain Text
1POST /v{version}/template/check
2Host: oos.bj.baidubce.com
3Authorization: authorization string
4
5{
6 "name": name,
7 "description": description,
8 "tags": [
9 {
10 "key": key,
11 "value": value
12 }
13 ],
14 "linear": linear,
15 "parallelism": parallelism,
16 "operators": [
17 {
18 "name": name,
19 "description": description,
20 "tags": [
21 {
22 "key": key,
23 "value": value
24 }
25 ],
26 "operator": operator,
27 "label": label,
28 "template": {
29 "id": id,
30 "ref": ref,
31 "name": name,
32 "type": type,
33 "description": description,
34 "tags": [
35 {
36 "key": key,
37 "value": value
38 }
39 ],
40 "linear": linear,
41 "parallelism": parallelism,
42 "operators": [
43 {
44 "name": name,
45 "description": description,
46 "tags": [
47 {
48 "key": key,
49 "value": value
50 }
51 ],
52 "operator": operator,
53 "label": label,
54 "template": {
55 "id": id,
56 "ref": ref,
57 "name": name,
58 "type": type,
59 "description": description,
60 "tags": tags,
61 "linear": linear,
62 "parallelism": parallelism,
63 "operators": operators,
64 "links": links,
65 "properties": properties,
66 "updatedTime": updatedTime,
67 "supportedInstanceTypes": supportedInstanceTypes
68 },
69 "retries": retries,
70 "retryInterval": retryInterval,
71 "timeout": timeout,
72 "parallelismRatio": parallelismRatio,
73 "parallelismCount": parallelismCount,
74 "parallelismControl": {
75 "ratio": ratio,
76 "count": count
77 },
78 "allowedFailureRatio": allowedFailureRatio,
79 "allowedFailureCount": allowedFailureCount,
80 "allowedFailureControl": {
81 "ratio": ratio,
82 "count": count
83 },
84 "manually": manually,
85 "scheduleDelayMilli": scheduleDelayMilli,
86 "waitOnAgentMilli": waitOnAgentMilli,
87 "pauseOnFailure": pauseOnFailure,
88 "condition": condition,
89 "breakpoints": [breakpoints],
90 "triggerRule": triggerRule,
91 "loopWindowType": loopWindowType,
92 "properties": properties,
93 "loops": [
94 {}
95 ]
96 }
97 ],
98 "links": [
99 {
100 "src": src,
101 "dst": dst
102 }
103 ],
104 "properties": [
105 {
106 "name": name,
107 "required": required,
108 "type": type,
109 "label": label,
110 "description": description,
111 "multiple": multiple,
112 "options": [options],
113 "selectOptions": [
114 {
115 "label": label,
116 "value": value
117 }
118 ],
119 "defaultValue": defaultValue
120 }
121 ],
122 "updatedTime": updatedTime,
123 "supportedInstanceTypes": [supportedInstanceTypes]
124 },
125 "retries": retries,
126 "retryInterval": retryInterval,
127 "timeout": timeout,
128 "parallelismRatio": parallelismRatio,
129 "parallelismCount": parallelismCount,
130 "parallelismControl": {
131 "ratio": ratio,
132 "count": count
133 },
134 "allowedFailureRatio": allowedFailureRatio,
135 "allowedFailureCount": allowedFailureCount,
136 "allowedFailureControl": {
137 "ratio": ratio,
138 "count": count
139 },
140 "manually": manually,
141 "scheduleDelayMilli": scheduleDelayMilli,
142 "waitOnAgentMilli": waitOnAgentMilli,
143 "pauseOnFailure": pauseOnFailure,
144 "condition": condition,
145 "breakpoints": [breakpoints],
146 "triggerRule": triggerRule,
147 "loopWindowType": loopWindowType,
148 "properties": properties,
149 "loops": [
150 {}
151 ]
152 }
153 ],
154 "links": [
155 {
156 "src": src,
157 "dst": dst
158 }
159 ],
160 "properties": [
161 {
162 "name": name,
163 "required": required,
164 "type": type,
165 "label": label,
166 "description": description,
167 "multiple": multiple,
168 "options": [options],
169 "selectOptions": [
170 {
171 "label": label,
172 "value": value
173 }
174 ],
175 "defaultValue": defaultValue
176 }
177 ]
178}
请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
|---|---|---|---|---|
| version | String | 是 | URL参数 | |
| name | String | 是 | RequestBody参数 | 模板名称,不允许重复 |
| description | String | 否 | RequestBody参数 | 模板描述 |
| tags | List<KeyValuePair> | 否 | RequestBody参数 | 模板标签 |
| linear | Boolean | 否 | RequestBody参数 | 任务是否串行执行,默认false |
| parallelism | Integer | 否 | RequestBody参数 | 并发度,当linear=false的时候,可以控制Operator并发执行的数量 |
| operators | List<Operator> | 是 | RequestBody参数 | 模板任务步骤列表 |
| links | List<LinkModel> | 否 | RequestBody参数 | 描述 operator 之间的拓扑关系,linear=false 时必填 |
| properties | List<Property> | 否 | RequestBody参数 | 全局参数列表 |
返回头域
除公共头域,无其它特殊头域。
返回参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| success | Boolean | 请求是否成功 |
| msg | String | 失败时返回失败原因,成功时为空字符串 |
| code | Integer | 状态码 |
请求示例
Plain Text
1POST /v{version}/template/check
2Host: oos.bj.baidubce.com
3Authorization: authorization string
返回示例
Plain Text
1200 Success
2
3{
4 "success" : true,
5 "msg" : "",
6 "code" : 200
7}
评价此篇文章
