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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
|
<?php return [
'version' => '1.0',
'info' => [
'style' => 'RPC',
'product' => 'ecd',
'version' => '2023-06-27',
],
'directories' => [
'DescribeBenefits',
'GetRedeemCodes',
'GetRequestToken',
],
'components' => [
'schemas' => [],
],
'apis' => [
'DescribeBenefits' => [
'summary' => '查询渠道关联的权益规格、权益数量等信息,相关信息可用于渠道权益的发放。',
'methods' => [
'get',
],
'schemes' => [
'https',
],
'security' => [
[
'AK' => [],
],
],
'deprecated' => false,
'systemTags' => [
'operationType' => 'none',
],
'parameters' => [
[
'name' => 'ChannelId',
'in' => 'query',
'schema' => [
'description' => '渠道ID。权益查询的目标渠道。',
'type' => 'string',
'required' => true,
'example' => 'wuying****',
],
],
],
'responses' => [
200 => [
'schema' => [
'title' => 'Schema of Response',
'description' => '返回对象。',
'type' => 'object',
'properties' => [
'RequestId' => [
'title' => 'Id of the request',
'description' => '请求ID。',
'type' => 'string',
'example' => '25BB1CE-6B47-12DC-9FE6-03726****',
],
'Benefits' => [
'description' => '权益列表。',
'type' => 'array',
'items' => [
'description' => '权益列表对象。',
'type' => 'object',
'properties' => [
'BenefitId' => [
'description' => '权益ID。不同规格的权益,对应不同的权益ID。',
'type' => 'string',
'example' => '6a79****',
],
'BenefitType' => [
'description' => '权益类型。',
'type' => 'string',
'enumValueTitles' => [
'Desktop.TimePack' => '云电脑时长包',
],
'example' => 'Desktop.TimePack',
],
'TotalAmount' => [
'description' => '权益总量。',
'type' => 'integer',
'format' => 'int32',
'example' => '100',
],
'AvailableAmount' => [
'description' => '权益余量,即可用量,数量随着权益发放而减少。',
'type' => 'integer',
'format' => 'int32',
'example' => '80',
],
'SpecInfo' => [
'description' => '权益规格详情。',
'type' => 'object',
'properties' => [
'CpuCore' => [
'description' => 'vCPU核数。',
'type' => 'integer',
'format' => 'int32',
'example' => '4',
],
'AvailableHours' => [
'description' => '可用时长,单位:小时。',
'type' => 'integer',
'format' => 'int32',
'example' => '800',
],
'MemorySize' => [
'description' => '内存大小,单位:MB。',
'type' => 'integer',
'format' => 'int32',
'example' => '8192',
],
],
],
],
],
],
],
],
],
],
'staticInfo' => [
'returnType' => 'synchronous',
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"25BB1CE-6B47-12DC-9FE6-03726****\\",\\n \\"Benefits\\": [\\n {\\n \\"BenefitId\\": \\"6a79****\\",\\n \\"BenefitType\\": \\"Desktop.TimePack\\",\\n \\"TotalAmount\\": 100,\\n \\"AvailableAmount\\": 80,\\n \\"SpecInfo\\": {\\n \\"CpuCore\\": 4,\\n \\"AvailableHours\\": 800,\\n \\"MemorySize\\": 8192\\n }\\n }\\n ]\\n}","type":"json"}]',
'title' => '查询渠道权益',
],
'GetRedeemCodes' => [
'summary' => '获取权益兑换码。渠道权益,将以兑换码的形式进行发放和流转。生成兑换码后,相应的权益数量将会扣减。',
'methods' => [
'get',
],
'schemes' => [
'https',
],
'security' => [
[
'AK' => [],
],
],
'deprecated' => false,
'systemTags' => [
'operationType' => 'none',
],
'parameters' => [
[
'name' => 'CodeQuantity',
'in' => 'query',
'schema' => [
'description' => '需要的兑换码数量,取值范围:1~100。',
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '1',
],
],
[
'name' => 'BenefitId',
'in' => 'query',
'schema' => [
'description' => '兑换码包含的权益ID,通过[DescribeBenefits](~~2500858~~)获取。',
'type' => 'string',
'required' => true,
'example' => '6a79****'."\n",
],
],
[
'name' => 'RequestToken',
'in' => 'query',
'schema' => [
'description' => '渠道服务请求凭证,可通过[GetRequestToken](~~2500860~~)获取,每个渠道服务请求凭证使用有效次数:1次。',
'type' => 'string',
'required' => true,
'example' => '8789d7271c36979****'."\n",
],
],
],
'responses' => [
200 => [
'schema' => [
'title' => 'Schema of Response',
'description' => '返回对象。',
'type' => 'object',
'properties' => [
'RequestId' => [
'title' => 'Id of the request',
'description' => '请求ID。',
'type' => 'string',
'example' => '25BB1CE-6B47-12DC-9FE6-03726****',
],
'RedeemCodes' => [
'description' => '兑换码列表。',
'type' => 'array',
'items' => [
'description' => '兑换码。',
'type' => 'string',
'example' => '068c8-55a1a-*****',
],
],
],
],
],
],
'staticInfo' => [
'returnType' => 'synchronous',
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"25BB1CE-6B47-12DC-9FE6-03726****\\",\\n \\"RedeemCodes\\": [\\n \\"068c8-55a1a-*****\\"\\n ]\\n}","type":"json"}]',
'title' => '获取兑换码',
],
'GetRequestToken' => [
'summary' => '获取渠道服务请求一次性凭证,该凭证可用于渠道相关接口的鉴权,使用后失效。',
'methods' => [
'get',
],
'schemes' => [
'https',
],
'security' => [
[
'AK' => [],
],
],
'deprecated' => false,
'systemTags' => [
'operationType' => 'none',
],
'parameters' => [
[
'name' => 'ChannelId',
'in' => 'query',
'schema' => [
'description' => '渠道ID。获取渠道服务请求凭证,凭证仅在此渠道下生效。',
'type' => 'string',
'required' => true,
'example' => 'wuying****',
],
],
],
'responses' => [
200 => [
'schema' => [
'title' => 'Schema of Response',
'description' => '返回对象。',
'type' => 'object',
'properties' => [
'RequestId' => [
'title' => 'Id of the request',
'description' => '请求ID。',
'type' => 'string',
'example' => '25BB1CE-6B47-12DC-9FE6-03726****',
],
'RequestToken' => [
'description' => '生成的渠道服务请求凭证,每个渠道服务请求凭证使用有效次数:1次。',
'type' => 'string',
'example' => '8789d7271c36979****',
],
],
],
],
],
'staticInfo' => [
'returnType' => 'synchronous',
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"25BB1CE-6B47-12DC-9FE6-03726****\\",\\n \\"RequestToken\\": \\"8789d7271c36979****\\"\\n}","type":"json"}]',
'title' => '获取请求凭证',
],
],
'endpoints' => [
[
'regionId' => 'ap-northeast-1',
'endpoint' => 'ecd.ap-northeast-1.aliyuncs.com',
],
[
'regionId' => 'ap-southeast-1',
'endpoint' => 'ecd.ap-southeast-1.aliyuncs.com',
],
[
'regionId' => 'ap-southeast-5',
'endpoint' => 'ecd.ap-southeast-5.aliyuncs.com',
],
[
'regionId' => 'ap-southeast-6',
'endpoint' => 'ecd.ap-southeast-6.aliyuncs.com',
],
[
'regionId' => 'ap-southeast-7',
'endpoint' => 'ecd.ap-southeast-7.aliyuncs.com',
],
[
'regionId' => 'cn-beijing',
'endpoint' => 'ecd.cn-beijing.aliyuncs.com',
],
[
'regionId' => 'cn-chengdu',
'endpoint' => 'ecd.cn-chengdu.aliyuncs.com',
],
[
'regionId' => 'cn-guangzhou',
'endpoint' => 'ecd.cn-guangzhou.aliyuncs.com',
],
[
'regionId' => 'cn-hangzhou',
'endpoint' => 'ecd.cn-hangzhou.aliyuncs.com',
],
[
'regionId' => 'cn-hongkong',
'endpoint' => 'ecd.cn-hongkong.aliyuncs.com',
],
[
'regionId' => 'cn-nanjing',
'endpoint' => 'ecd.cn-nanjing.aliyuncs.com',
],
[
'regionId' => 'cn-qingdao',
'endpoint' => 'ecd.cn-qingdao.aliyuncs.com',
],
[
'regionId' => 'cn-shanghai',
'endpoint' => 'ecd.cn-shanghai.aliyuncs.com',
],
[
'regionId' => 'cn-shenzhen',
'endpoint' => 'ecd.cn-shenzhen.aliyuncs.com',
],
[
'regionId' => 'cn-wulanchabu',
'endpoint' => 'ecd.cn-wulanchabu.aliyuncs.com',
],
[
'regionId' => 'cn-zhangjiakou',
'endpoint' => 'ecd.cn-zhangjiakou.aliyuncs.com',
],
[
'regionId' => 'us-west-1',
'endpoint' => 'ecd.us-west-1.aliyuncs.com',
],
[
'regionId' => 'eu-west-1',
'endpoint' => 'ecd.eu-west-1.aliyuncs.com',
],
[
'regionId' => 'eu-central-1',
'endpoint' => 'ecd.eu-central-1.aliyuncs.com',
],
[
'regionId' => 'me-central-1',
'endpoint' => 'ecd.me-central-1.aliyuncs.com',
],
[
'regionId' => 'cn-shanghai-finance-1',
'endpoint' => 'ecd.cn-shanghai-finance-1.aliyuncs.com',
],
[
'regionId' => 'cn-hangzhou-finance',
'endpoint' => 'ecd.cn-hangzhou-finance.aliyuncs.com',
],
[
'regionId' => 'me-east-1',
'endpoint' => 'ecd.me-east-1.aliyuncs.com',
],
],
];
|