summaryrefslogtreecommitdiff
path: root/data/zh_cn/saf/2019-05-21/api-docs.php
blob: aeb823e7155510b9da58e6a96386b84b83b362d7 (plain)
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
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
<?php return [
    'version' => '1.0',
    'info' => [
        'style' => 'RPC',
        'product' => 'saf',
        'version' => '2019-05-21',
    ],
    'directories' => [
        [
            'id' => 181717,
            'title' => '国内公共服务调用',
            'type' => 'directory',
            'children' => [
                'ExecuteRequest',
            ],
        ],
        [
            'id' => 181718,
            'title' => '海外公共服务调用',
            'type' => 'directory',
            'children' => [
                'ExecuteRequestML',
                'ExecuteRequestSG',
            ],
        ],
        [
            'id' => 181726,
            'title' => '自定义事件服务调用',
            'type' => 'directory',
            'children' => [
                'RequestDecision',
            ],
        ],
    ],
    'components' => [
        'schemas' => [],
    ],
    'apis' => [
        'ExecuteRequest' => [
            'summary' => '风险检测接口,该接口支持公共服务调用和自定义事件调用。',
            'methods' => [
                'post',
                'get',
            ],
            'schemes' => [
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => [
                'operationType' => 'none',
                'riskType' => 'none',
                'chargeType' => 'paid',
                'abilityTreeCode' => '48720',
                'abilityTreeNodes' => [
                    'FEATUREsaf7L0MVB',
                ],
            ],
            'parameters' => [
                [
                    'name' => 'ServiceParameters',
                    'in' => 'query',
                    'schema' => [
                        'description' => '服务入参,Json格式的字符串,完整Json字符串信息。如果是自定义事件,这里需要添加eventCode属性。',
                        'type' => 'string',
                        'required' => true,
                        'docRequired' => true,
                        'example' => '{"accountId": "1233***"}',
                    ],
                ],
                [
                    'name' => 'Service',
                    'in' => 'query',
                    'schema' => [
                        'description' => '服务产品码。如果是自定义事件,这里填saf_de。',
                        'type' => 'string',
                        'required' => true,
                        'docRequired' => true,
                        'example' => 'account_abuse_pro',
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'type' => 'object',
                        'properties' => [
                            'Code' => [
                                'description' => '状态码。',
                                'type' => 'integer',
                                'format' => 'int32',
                                'example' => '200',
                            ],
                            'Message' => [
                                'description' => '结果信息。',
                                'type' => 'string',
                                'example' => 'OK',
                            ],
                            'Data' => [
                                'description' => '数据信息,包含:tags、score、extend等字段。',
                                'type' => 'object',
                                'example' => '{"score": 80.4, "tags": "ra0601,rnk0002,rn0312"}',
                            ],
                            'RequestId' => [
                                'description' => '请求ID。',
                                'type' => 'string',
                                'example' => 'A5F41DC6-2070-5CE7-8B2D-7A23D882932D',
                            ],
                            'AccessDeniedDetail' => [
                                'description' => '无权限诊断详情。',
                                'type' => 'object',
                                'properties' => [
                                    'AuthAction' => [
                                        'description' => '访问者尝试执行的具体操作(如 s3:PutObject, ec2:DescribeInstances 等)。',
                                        'type' => 'string',
                                        'example' => 'yundun-saf:Execute',
                                    ],
                                    'AuthPrincipalType' => [
                                        'description' => '请求主体的身份类型。'."\n"
                                            .'- SubUser:子账号(主账号创建的子用户)。'."\n"
                                            .'- AssumedRoleUser:角色(通过 AssumeRole 操作获得的临时身份)。',
                                        'type' => 'string',
                                        'example' => 'SubUser',
                                    ],
                                    'AuthPrincipalOwnerId' => [
                                        'description' => '发起请求的访问主体所属的云账号UID。',
                                        'type' => 'string',
                                        'example' => '178059440630****',
                                    ],
                                    'AuthPrincipalDisplayName' => [
                                        'description' => '请求主体的可读标识名称(如用户名、角色名)。',
                                        'type' => 'string',
                                        'example' => '29918048924096****',
                                    ],
                                    'PolicyType' => [
                                        'description' => '标识无权限场景下的策略作用范围及类型'."\n"
                                            .'- AccountLevelIdentityBasedPolicy:账号层级身份策略(作用于整个云账号)。'."\n"
                                            .'- ResourceGroupLevelIdentityBasedPolicy:资源组层级身份策略(作用于指定资源组)。'."\n"
                                            .'- SessionPolicy:角色会话策略(临时会话生效的附加策略)。'."\n"
                                            .'- ControlPolicy:管控策略(核心权限控制策略)。'."\n"
                                            .'- AssumeRolePolicy:角色信任策略(定义角色被哪些实体信任)。',
                                        'type' => 'string',
                                        'example' => 'AccountLevelIdentityBasedPolicy',
                                    ],
                                    'NoPermissionType' => [
                                        'description' => '无权限的具体判定类型。'."\n"
                                            .'- ImplicitDeny:隐式拒绝(无显式授权)。'."\n"
                                            .'- ExplicitDeny:显式拒绝(策略中明确拒绝该操作)。',
                                        'type' => 'string',
                                        'example' => 'ImplicitDeny',
                                    ],
                                    'EncodedDiagnosticMessage' => [
                                        'description' => 'Base64编码的权限诊断日志,用于问题排查和自动化分析。',
                                        'type' => 'string',
                                        'example' => 'AQIBIAAAA...r+ow==',
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"Code\\": 200,\\n  \\"Message\\": \\"OK\\",\\n  \\"Data\\": {\\n    \\"score\\": 80.4,\\n    \\"tags\\": \\"ra0601,rnk0002,rn0312\\"\\n  },\\n  \\"RequestId\\": \\"A5F41DC6-2070-5CE7-8B2D-7A23D882932D\\",\\n  \\"AccessDeniedDetail\\": {\\n    \\"AuthAction\\": \\"yundun-saf:Execute\\",\\n    \\"AuthPrincipalType\\": \\"SubUser\\",\\n    \\"AuthPrincipalOwnerId\\": \\"178059440630****\\",\\n    \\"AuthPrincipalDisplayName\\": \\"29918048924096****\\",\\n    \\"PolicyType\\": \\"AccountLevelIdentityBasedPolicy\\",\\n    \\"NoPermissionType\\": \\"ImplicitDeny\\",\\n    \\"EncodedDiagnosticMessage\\": \\"AQIBIAAAA...r+ow==\\"\\n  }\\n}","type":"json"}]',
            'title' => '多个场景风险识别检测',
        ],
        'ExecuteRequestML' => [
            'summary' => '风险检测接口,该接口只支持自定义事件调用,并且只适用于马来西亚区域。',
            'methods' => [
                'post',
                'get',
            ],
            'schemes' => [
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'operationType' => 'readAndWrite',
            'deprecated' => false,
            'systemTags' => [
                'operationType' => 'none',
                'riskType' => 'none',
                'chargeType' => 'paid',
                'abilityTreeCode' => '48721',
                'abilityTreeNodes' => [
                    'FEATUREsaf6MRPQF',
                ],
            ],
            'parameters' => [
                [
                    'name' => 'ServiceParameters',
                    'in' => 'query',
                    'schema' => [
                        'description' => '服务入参,Json格式的字符串,完整Json字符串信息。这里需要添加自定义事件的eventCode属性。',
                        'type' => 'string',
                        'required' => true,
                        'docRequired' => true,
                        'example' => '{"accountId": "1233***"}',
                    ],
                ],
                [
                    'name' => 'Service',
                    'in' => 'query',
                    'schema' => [
                        'description' => '服务产品码。因为该接口只支持自定义事件,所以这里填saf_de。',
                        'type' => 'string',
                        'required' => true,
                        'docRequired' => true,
                        'example' => 'saf_de',
                    ],
                ],
                [
                    'name' => 'Lang',
                    'in' => 'query',
                    'schema' => [
                        'description' => '语言。',
                        'type' => 'string',
                        'required' => false,
                        'example' => 'en',
                        'default' => 'en-us',
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'type' => 'object',
                        'properties' => [
                            'Code' => [
                                'description' => '状态码。',
                                'type' => 'integer',
                                'format' => 'int32',
                                'example' => '200',
                            ],
                            'Message' => [
                                'description' => '结果信息。',
                                'type' => 'string',
                                'example' => 'OK',
                            ],
                            'Data' => [
                                'description' => '数据信息,包含:tags、score、extend等字段。',
                                'type' => 'object',
                                'example' => '{"score": 80.4, "tags": "ra0601,rnk0002,rn0312"}',
                            ],
                            'RequestId' => [
                                'description' => '请求ID。',
                                'type' => 'string',
                                'example' => 'A5F41DC6-2070-5CE7-8B2D-7A23D882932D',
                            ],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"Code\\": 200,\\n  \\"Message\\": \\"OK\\",\\n  \\"Data\\": {\\n    \\"score\\": 80.4,\\n    \\"tags\\": \\"ra0601,rnk0002,rn0312\\"\\n  },\\n  \\"RequestId\\": \\"A5F41DC6-2070-5CE7-8B2D-7A23D882932D\\"\\n}","type":"json"}]',
            'title' => '调用决策引擎马来集群',
        ],
        'ExecuteRequestSG' => [
            'summary' => '风险检测接口,该接口支持公共服务调用和自定义事件调用。',
            'methods' => [
                'post',
                'get',
            ],
            'schemes' => [
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => [
                'operationType' => 'none',
                'riskType' => 'none',
                'chargeType' => 'paid',
                'abilityTreeCode' => '48722',
                'abilityTreeNodes' => [
                    'FEATUREsaf6MRPQF',
                ],
            ],
            'parameters' => [
                [
                    'name' => 'ServiceParameters',
                    'in' => 'query',
                    'schema' => [
                        'description' => '服务入参,Json格式的字符串,完整Json字符串信息。如果是自定义事件,这里需要添加eventCode属性。',
                        'type' => 'string',
                        'required' => true,
                        'docRequired' => true,
                        'example' => '{"accountId": "1233***"}',
                    ],
                ],
                [
                    'name' => 'Service',
                    'in' => 'query',
                    'schema' => [
                        'description' => '服务产品码。如果是自定义事件,这里填saf_de。',
                        'type' => 'string',
                        'required' => true,
                        'docRequired' => true,
                        'example' => 'account_abuse_intl_pro',
                    ],
                ],
                [
                    'name' => 'Lang',
                    'in' => 'query',
                    'schema' => [
                        'description' => '语言。',
                        'type' => 'string',
                        'required' => false,
                        'example' => 'en',
                        'default' => 'en-us',
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'type' => 'object',
                        'properties' => [
                            'Code' => [
                                'description' => '状态码。',
                                'type' => 'integer',
                                'format' => 'int32',
                                'example' => '200',
                            ],
                            'Message' => [
                                'description' => '结果信息。',
                                'type' => 'string',
                                'example' => 'OK',
                            ],
                            'Data' => [
                                'description' => '数据信息,包含:tags、score、extend等字段。',
                                'type' => 'object',
                                'example' => '{"score": 80.4, "tags": "ra0601,rnk0002,rn0312"}',
                            ],
                            'RequestId' => [
                                'description' => '请求ID。',
                                'type' => 'string',
                                'example' => 'A5F41DC6-2070-5CE7-8B2D-7A23D882932D',
                            ],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"Code\\": 200,\\n  \\"Message\\": \\"OK\\",\\n  \\"Data\\": {\\n    \\"score\\": 80.4,\\n    \\"tags\\": \\"ra0601,rnk0002,rn0312\\"\\n  },\\n  \\"RequestId\\": \\"A5F41DC6-2070-5CE7-8B2D-7A23D882932D\\"\\n}","type":"json"}]',
            'title' => '调用决策引擎新加坡集群',
        ],
        'RequestDecision' => [
            'summary' => '风险检测接口,该接口只支持自定义事件调用。',
            'methods' => [
                'post',
            ],
            'schemes' => [
                'http',
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => [
                'operationType' => 'none',
                'riskType' => 'none',
                'chargeType' => 'paid',
                'abilityTreeCode' => '114081',
                'abilityTreeNodes' => [
                    'FEATUREsaf6MRPQF',
                ],
            ],
            'parameters' => [
                [
                    'name' => 'ServiceParameters',
                    'in' => 'query',
                    'schema' => [
                        'description' => '服务入参,Json格式的字符串,完整Json字符串信息。',
                        'type' => 'string',
                        'required' => false,
                        'example' => '{"accountId": "1233***"}',
                    ],
                ],
                [
                    'name' => 'EventCode',
                    'in' => 'query',
                    'schema' => [
                        'description' => '事件编码。',
                        'type' => 'string',
                        'required' => false,
                        'example' => 'de_*',
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'title' => 'Schema of Response',
                        'description' => 'Schema of Response',
                        'type' => 'object',
                        'properties' => [
                            'RequestId' => [
                                'title' => 'Id of the request',
                                'description' => '请求ID。',
                                'type' => 'string',
                                'example' => 'A5F41DC6-2070-5CE7-8B2D-7A23D882932D',
                            ],
                            'Code' => [
                                'description' => '状态码。',
                                'type' => 'integer',
                                'format' => 'int64',
                                'example' => '200',
                            ],
                            'Message' => [
                                'description' => '结果信息。',
                                'type' => 'string',
                                'example' => 'OK',
                            ],
                            'Data' => [
                                'description' => '数据信息,包含:tags、score、extend等字段。',
                                'type' => 'object',
                                'example' => '{"score": 80.4, "tags": "ra0601,rnk0002,rn0312"}',
                            ],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"RequestId\\": \\"A5F41DC6-2070-5CE7-8B2D-7A23D882932D\\",\\n  \\"Code\\": 200,\\n  \\"Message\\": \\"OK\\",\\n  \\"Data\\": {\\n    \\"score\\": 80.4,\\n    \\"tags\\": \\"ra0601,rnk0002,rn0312\\"\\n  }\\n}","type":"json"}]',
            'title' => '调用决策引擎自定义事件',
        ],
    ],
    'endpoints' => [
        [
            'regionId' => 'cn-hangzhou',
            'endpoint' => 'saf.cn-hangzhou.aliyuncs.com',
        ],
        [
            'regionId' => 'cn-beijing',
            'endpoint' => 'saf.cn-beijing.aliyuncs.com',
        ],
        [
            'regionId' => 'cn-zhangjiakou',
            'endpoint' => 'saf.cn-zhangjiakou.aliyuncs.com',
        ],
        [
            'regionId' => 'cn-shanghai',
            'endpoint' => 'saf.cn-shanghai.aliyuncs.com',
        ],
        [
            'regionId' => 'cn-shenzhen',
            'endpoint' => 'saf.cn-shenzhen.aliyuncs.com',
        ],
        [
            'regionId' => 'cn-hongkong',
            'endpoint' => 'saf.cn-hongkong.aliyuncs.com',
        ],
        [
            'regionId' => 'ap-southeast-1',
            'endpoint' => 'saf.ap-southeast-1.aliyuncs.com',
        ],
        [
            'regionId' => 'ap-southeast-3',
            'endpoint' => 'saf.ap-southeast-3.aliyuncs.com',
        ],
        [
            'regionId' => 'us-east-1',
            'endpoint' => 'saf.us-east-1.aliyuncs.com',
        ],
        [
            'regionId' => 'us-west-1',
            'endpoint' => 'saf.us-west-1.aliyuncs.com',
        ],
        [
            'regionId' => 'eu-central-1',
            'endpoint' => 'saf.eu-central-1.aliyuncs.com',
        ],
        [
            'regionId' => 'ap-south-1',
            'endpoint' => 'saf.ap-south-1.aliyuncs.com',
        ],
    ],
];