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
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
|
<?php return [
'version' => '1.0',
'info' => ['style' => 'RPC', 'product' => 'Actiontrail', 'version' => '2017-12-04'],
'directories' => [
[
'id' => 5314,
'title' => '地域',
'type' => 'directory',
'children' => ['DescribeRegions'],
],
[
'id' => 5316,
'title' => '跟踪',
'type' => 'directory',
'children' => ['CreateTrail', 'DeleteTrail', 'StartLogging', 'StopLogging', 'UpdateTrail', 'DescribeTrails', 'GetTrailStatus'],
],
[
'id' => 5318,
'title' => '事件',
'type' => 'directory',
'children' => ['LookupEvents'],
],
],
'components' => [
'schemas' => [],
],
'apis' => [
'DescribeRegions' => [
'summary' => '查询操作审计支持的阿里云地域。',
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => ['FEATUREactiontrailHCRZJP'],
'tenantRelevance' => 'publicInformation',
],
'parameters' => [],
'responses' => [
200 => [
'schema' => [
'description' => 'test',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '4ABAEA6E-C740-5CE2-A003-643E551964F5'],
'Regions' => [
'description' => '地域列表。',
'type' => 'object',
'properties' => [
'Region' => [
'description' => '地域。',
'type' => 'array',
'items' => [
'description' => 'test',
'type' => 'object',
'properties' => [
'RegionId' => ['description' => '地域ID。', 'type' => 'string', 'example' => 'cn-shanghai'],
],
],
],
],
],
],
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4ABAEA6E-C740-5CE2-A003-643E551964F5\\",\\n \\"Regions\\": {\\n \\"Region\\": [\\n {\\n \\"RegionId\\": \\"cn-shanghai\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<DescribeRegionsResponse>\\n <RequestId>4ABAEA6E-C740-5CE2-A003-643E551964F5</RequestId>\\n <Regions>\\n <Region>\\n <RegionId>cn-hangzhou</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-shanghai</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-nanjing</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-fuzhou</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-qingdao</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-beijing</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-zhangjiakou</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-huhehaote</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-wulanchabu</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-shenzhen</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-heyuan</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-guangzhou</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-chengdu</RegionId>\\n </Region>\\n <Region>\\n <RegionId>cn-hongkong</RegionId>\\n </Region>\\n <Region>\\n <RegionId>ap-southeast-1</RegionId>\\n </Region>\\n <Region>\\n <RegionId>ap-southeast-2</RegionId>\\n </Region>\\n <Region>\\n <RegionId>ap-northeast-2</RegionId>\\n </Region>\\n <Region>\\n <RegionId>ap-southeast-3</RegionId>\\n </Region>\\n <Region>\\n <RegionId>ap-southeast-5</RegionId>\\n </Region>\\n <Region>\\n <RegionId>ap-northeast-1</RegionId>\\n </Region>\\n <Region>\\n <RegionId>eu-central-1</RegionId>\\n </Region>\\n <Region>\\n <RegionId>eu-west-1</RegionId>\\n </Region>\\n <Region>\\n <RegionId>us-west-1</RegionId>\\n </Region>\\n <Region>\\n <RegionId>us-east-1</RegionId>\\n </Region>\\n <Region>\\n <RegionId>me-east-1</RegionId>\\n </Region>\\n <Region>\\n <RegionId>ap-southeast-7</RegionId>\\n </Region>\\n <Region>\\n <RegionId>ap-south-1</RegionId>\\n </Region>\\n </Regions>\\n</DescribeRegionsResponse>","errorExample":""}]',
'title' => '查询可以使用的阿里云地域',
'description' => '更多信息,请参见[地域和可用区](~~40654~~)。',
'requestParamsDescription' => ' 关于公共请求参数的详情,请参见[公共参数](~~28837~~)。',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
],
'CreateTrail' => [
'summary' => '创建操作审计跟踪。',
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'write',
'deprecated' => false,
'systemTags' => [
'operationType' => 'create',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => ['FEATUREactiontrail321LUI'],
'tenantRelevance' => 'publicInformation',
],
'parameters' => [
[
'name' => 'Name',
'in' => 'query',
'schema' => ['description' => '创建的跟踪名称。 '."\n"
.'长度为6~36个字符,必须以小写英文字母开头,可包含小写英文字母、数字、短划线(-)和下划线(_)。'."\n"
.'>同一个账号内跟踪名称不可重复。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'trail-test'],
],
[
'name' => 'OssBucketName',
'in' => 'query',
'schema' => ['description' => '跟踪投递的OSS存储空间。 '."\n"
.'长度为3~63个字符,必须以小写英文字母或者数字开头,可包含小写英文字母、数字和短划线(-)。 '."\n"
."\n"
.'> OssBucketName和SlsProjectArn需至少指定其中一个参数。'."\n", 'type' => 'string', 'required' => false, 'example' => 'audit-log'],
],
[
'name' => 'OssKeyPrefix',
'in' => 'query',
'schema' => ['description' => '跟踪投递的OSS存储空间文件名的前缀。 '."\n"
.'长度为6~32个字符,必须以英文字母开头,可包含英文字母、数字、短划线(-)、正斜线(/)和下划线(_)。', 'type' => 'string', 'required' => false, 'example' => 'at-product-account-audit-B'],
],
[
'name' => 'RoleName',
'in' => 'query',
'schema' => ['description' => '操作审计服务关联角色名称,默认值:aliyunserviceroleforactiontrail。', 'type' => 'string', 'required' => false, 'docRequired' => false, 'example' => 'aliyunserviceroleforactiontrail'],
],
[
'name' => 'SlsProjectArn',
'in' => 'query',
'schema' => ['description' => '跟踪投递的日志服务项目的ARN。 '."\n"
."\n"
.'> OssBucketName和SlsProjectArn需至少指定其中一个参数。', 'type' => 'string', 'required' => false, 'example' => 'acs:log:cn-shanghai::project/***'],
],
[
'name' => 'SlsWriteRoleArn',
'in' => 'query',
'schema' => ['description' => '操作审计向日志服务项目投递操作事件时,扮演的角色ARN。'."\n"
."\n"
.'- 如果不指定该参数,操作审计会通过创建服务关联角色来创建相应的资源。更多信息,请参见[操作审计服务关联角色](~~169244~~)。'."\n"
."\n"
.'- 如果指定了该参数,当您需要将事件投递到本账号时,需要为RAM角色授予操作审计服务关联角色权限。当您需要将事件投递到其他账号时,需要为RAM角色绑定操作事件投递的系统权限策略。关于如何进行跨账号投递,请参见[将多个阿里云账号的事件投递到同一账号](~~207462~~)。', 'type' => 'string', 'required' => false, 'example' => 'acs:ram::***:role/aliyunserviceroleforactiontrail'],
],
[
'name' => 'EventRW',
'in' => 'query',
'schema' => ['description' => '投递事件的读写类型,取值:'."\n"
.'- Write(默认值):写类型。'."\n"
.'- Read:读类型。'."\n"
.'- All:读类型和写类型。', 'type' => 'string', 'required' => false, 'example' => 'Write'],
],
[
'name' => 'TrailRegion',
'in' => 'query',
'schema' => ['description' => '跟踪的地域。 '."\n"
.'默认值为All,表示跟踪全部地域的事件。 '."\n"
.'您也可以指定具体的地域。关于地域的更多信息,请调用[DescribeRegions](~~95532~~)接口查询。'."\n"
."\n\n"
."\n", 'type' => 'string', 'required' => false, 'example' => 'All'],
],
[
'name' => 'MnsTopicArn',
'in' => 'query',
'schema' => ['description' => '用于接收操作审计事件的轻量消息队列(原 MNS) Topic的ARN,格式为:`acs:mns:<Region>:<Account ID>:/topics/<topicName>`。填写此参数后,向OSS中投递事件时,会产生一条消息投递到该MNS Topic。', 'type' => 'string', 'required' => false, 'example' => 'acs:mns:cn-hangzhou:1111:/topics/your-topic-name'],
],
[
'name' => 'IsOrganizationTrail',
'in' => 'query',
'schema' => ['description' => '是否创建多账号跟踪。取值: '."\n"
."\n"
.'- true:创建多账号跟踪。 '."\n"
."\n"
.'- false(默认值):创建单账号跟踪。', 'type' => 'boolean', 'required' => false, 'example' => 'false'],
],
],
'responses' => [
200 => [
'schema' => [
'description' => 'test',
'type' => 'object',
'properties' => [
'MnsTopicArn' => ['description' => '用于接收操作审计事件的MNS Topic的ARN。 ', 'type' => 'string', 'example' => 'acs:mns:cn-hangzhou:1111:/topics/your-topic-name'],
'SlsProjectArn' => ['description' => '跟踪投递的日志服务项目的ARN。', 'type' => 'string', 'example' => 'acs:log:cn-hangzhou:151266687691****:project/test-project'],
'RoleName' => ['description' => '操作审计服务关联角色名称。', 'type' => 'string', 'example' => 'aliyunserviceroleforactiontrail'],
'EventRW' => ['description' => '投递事件的读写类型。', 'type' => 'string', 'example' => 'Write'],
'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0'],
'HomeRegion' => ['description' => '跟踪的Home地域。', 'type' => 'string', 'example' => 'cn-hangzhou'],
'OssKeyPrefix' => ['description' => 'OSS存储空间文件名的前缀。', 'type' => 'string', 'example' => 'at-product-account-audit-B'],
'OssBucketName' => ['description' => 'OSS存储空间。', 'type' => 'string', 'example' => 'audit-log'],
'SlsWriteRoleArn' => ['description' => '操作审计向日志服务项目投递操作事件时,扮演的角色ARN。', 'type' => 'string', 'example' => 'acs:ram::***:role/aliyunserviceroleforactiontrail'],
'TrailRegion' => ['description' => '跟踪的地域。', 'type' => 'string', 'example' => 'All'],
'Name' => ['description' => '跟踪名称。', 'type' => 'string', 'example' => 'trail-test'],
],
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'InvalidDeliveryConfigurationException', 'errorMessage' => 'You must specify at least one Log Service project or OSS bucket for a Trail.'],
['errorCode' => 'InvalidPrefixException', 'errorMessage' => 'The specified OSS bucket prefix is invalid.'],
['errorCode' => 'InvalidQueryParameter', 'errorMessage' => 'The specified query parameter is invalid.'],
['errorCode' => 'InvalidTrailNameException', 'errorMessage' => 'The specified Trail name is invalid.'],
['errorCode' => 'RepeatOssBucket', 'errorMessage' => 'The specified OSS bucket is already in use. We recommend that you modify the existing Trail or specify another bucket.'],
['errorCode' => 'SlsProjectDoesNotExistException', 'errorMessage' => 'The specified Log Service project does not exist.'],
['errorCode' => 'TrailAlreadyExistsException', 'errorMessage' => 'The specified Trail name already exists.'],
['errorCode' => 'MaximumNumberOfOrganizationTrailExceeded', 'errorMessage' => 'Your account can create only one organization trail.'],
['errorCode' => 'NotAllowCreateOrganizationTrail', 'errorMessage' => 'Your account does not allow you to create organization trail. Submit a ticket to get customer support.'],
],
403 => [
['errorCode' => 'InsufficientBucketPolicyException', 'errorMessage' => 'Access to the specified OSS bucket was denied.'],
['errorCode' => 'InsufficientSlsPolicyException', 'errorMessage' => 'Access to the specified Log Service project was denied.'],
['errorCode' => 'MaximumNumberOfTrailsExceededException', 'errorMessage' => 'The number of Trails in the same region exceeds the upper limit (5).'],
],
[
['errorCode' => 'BucketDoesNotExistException', 'errorMessage' => 'The specified OSS bucket does not exist.'],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"MnsTopicArn\\": \\"acs:mns:cn-hangzhou:1111:/topics/your-topic-name\\",\\n \\"SlsProjectArn\\": \\"acs:log:cn-hangzhou:151266687691****:project/test-project\\",\\n \\"RoleName\\": \\"aliyunserviceroleforactiontrail\\",\\n \\"EventRW\\": \\"Write\\",\\n \\"RequestId\\": \\"145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0\\",\\n \\"HomeRegion\\": \\"cn-hangzhou\\",\\n \\"OssKeyPrefix\\": \\"at-product-account-audit-B\\",\\n \\"OssBucketName\\": \\"audit-log\\",\\n \\"SlsWriteRoleArn\\": \\"acs:ram::***:role/aliyunserviceroleforactiontrail\\",\\n \\"TrailRegion\\": \\"All\\",\\n \\"Name\\": \\"trail-test\\"\\n}","errorExample":""},{"type":"xml","example":"<CreateTrailResponse>\\n <RoleName>aliyunserviceroleforactiontrail</RoleName>\\n <EventRW>Write</EventRW>\\n <RequestId>AB7A5AE1-EC3C-4C00-91B0-BE7BDEE354AE</RequestId>\\n <HomeRegion>cn-hangzhou</HomeRegion>\\n <OssBucketName>audit-log</OssBucketName>\\n <TrailRegion>All</TrailRegion>\\n <Name>trail-test</Name>\\n</CreateTrailResponse>","errorExample":""}]',
'title' => '创建跟踪',
'description' => '您可以创建跟踪,将操作事件分别投递到日志服务SLS或对象存储OSS,或者同时进行投递。创建跟踪前请进行以下操作: '."\n"
."\n"
.'- 投递到日志服务SLS:请确保您已经创建SLS的Project。 '."\n"
.'> 投递成功后操作审计会自动创建一个名为`actiontrail_<跟踪名称>`的日志库(Logstore),该Logstore会自动帮您设置审计最佳配置,创建查询所需索引和仪表盘,并禁止用户写入,保证审计数据的准确性。您无需提前创建Logstore。'."\n"
."\n"
.'- 投递到对象存储OSS:请确保您已经创建对象存储OSS的存储空间。'."\n"
."\n"
.'本文将提供一个示例,为您创建一个名为`trail-test`的单账号跟踪,将操作事件投递到名为`audit-log`的OSS存储空间中。',
'requestParamsDescription' => ' 关于公共请求参数的详情,请参见[公共参数](~~28837~~)。',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
],
'DeleteTrail' => [
'summary' => '删除操作审计跟踪。',
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'write',
'deprecated' => false,
'systemTags' => [
'operationType' => 'delete',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => ['FEATUREactiontrail321LUI'],
],
'parameters' => [
[
'name' => 'Name',
'in' => 'query',
'schema' => ['description' => '要删除的跟踪名称。 '."\n"
.'长度为6~36个字符,必须以小写英文字母开头,可包含小写英文字母、数字、短划线(-)和下划线(_)。'."\n"
."\n"
.'> 同一个账号内跟踪名称不可重复。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'my-test'],
],
],
'responses' => [
200 => [
'schema' => [
'description' => 'test',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0'],
],
],
],
],
'errorCodes' => [
404 => [
['errorCode' => 'TrailNotFoundException', 'errorMessage' => 'The specified Trail does not exist.'],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0\\"\\n}","errorExample":""},{"type":"xml","example":"","errorExample":""}]',
'title' => '删除跟踪',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
],
'StartLogging' => [
'summary' => '启用跟踪,开始将操作审计事件投递到 OSS 或 SLS。',
'methods' => ['get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'write',
'deprecated' => false,
'systemTags' => [
'operationType' => 'update',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => ['FEATUREactiontrail321LUI', 'FEATUREactiontrailK0OCFQ'],
],
'parameters' => [
[
'name' => 'Name',
'in' => 'query',
'schema' => ['description' => '要启用的跟踪名称。 '."\n"
.'长度为6~36个字符,必须以小写英文字母开头,可包含小写英文字母、数字、短划线(-)和下划线(_)。'."\n"
."\n"
.'>同一个账号内跟踪名称不可重复。 ', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'trail-test'],
],
],
'responses' => [
200 => [
'schema' => [
'description' => 'test',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0'],
],
],
],
],
'errorCodes' => [
404 => [
['errorCode' => 'TrailNotFoundException', 'errorMessage' => 'The specified Trail does not exist.'],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0\\"\\n}","errorExample":""},{"type":"xml","example":"<StartLoggingResponse>\\n <RequestId>1C488B66-B819-4D14-8711-C4EAAA13AC01</RequestId>\\n</StartLoggingResponse>","errorExample":""}]',
'title' => '启用跟踪',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
],
'StopLogging' => [
'summary' => '停止跟踪,停止将操作审计事件投递到 OSS 或 SLS。',
'methods' => ['get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'write',
'deprecated' => false,
'systemTags' => [
'operationType' => 'update',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => ['FEATUREactiontrailHCRZJP'],
],
'parameters' => [
[
'name' => 'Name',
'in' => 'query',
'schema' => ['description' => '要禁用的跟踪名称。 '."\n"
.'长度为6~36个字符,必须以小写英文字母开头,可包含小写英文字母、数字、短划线(-)和下划线(_)。'."\n"
."\n"
.'> 同一个账号内跟踪名称不可重复。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'trail-test'],
],
],
'responses' => [
200 => [
'schema' => [
'description' => 'test',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0'],
],
],
],
],
'errorCodes' => [
404 => [
['errorCode' => 'TrailNotFoundException', 'errorMessage' => 'The specified Trail does not exist.'],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0\\"\\n}","errorExample":""},{"type":"xml","example":"<StopLoggingResponse>\\n <RequestId>1C488B66-B819-4D14-8711-C4EAAA13AC01</RequestId>\\n</StopLoggingResponse>","errorExample":""}]',
'title' => '禁用跟踪',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
],
'UpdateTrail' => [
'summary' => '调整操作审计跟踪的配置信息。',
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'write',
'deprecated' => false,
'systemTags' => [
'operationType' => 'update',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => ['FEATUREactiontrail321LUI', 'FEATUREactiontrailK0OCFQ'],
],
'parameters' => [
[
'name' => 'Name',
'in' => 'query',
'schema' => ['description' => '要更新的跟踪名称。 '."\n"
."\n"
.'长度为6~36个字符,必须以小写英文字母开头,可包含小写英文字母、数字、短划线(-)和下划线(_)。'."\n"
."\n"
.'> 同一个账号内跟踪名称不可重复。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'trail-test'],
],
[
'name' => 'OssBucketName',
'in' => 'query',
'schema' => ['description' => '跟踪投递的OSS存储空间。 '."\n"
."\n"
.'长度为3~63个字符,必须以小写英文字母或者数字开头,可包含小写英文字母、数字和短划线(-)。 '."\n"
."\n"
.'> 更新时必须确保该存储空间已经存在。', 'type' => 'string', 'required' => false, 'example' => 'audit-log'],
],
[
'name' => 'OssKeyPrefix',
'in' => 'query',
'schema' => ['description' => '跟踪投递的OSS存储空间文件名的前缀。 '."\n"
."\n"
.'长度为6~32个字符,必须以英文字母开头,可包含英文字母、数字、短划线(-)、正斜线(/)和下划线(_)。', 'type' => 'string', 'required' => false, 'example' => 'at-product-account-audit-B'],
],
[
'name' => 'RoleName',
'in' => 'query',
'schema' => ['description' => '用户允许操作审计服务扮演的RAM角色名称,默认值:`aliyunserviceroleforactiontrail`。', 'type' => 'string', 'required' => false, 'example' => 'aliyunserviceroleforactiontrail'],
],
[
'name' => 'SlsProjectArn',
'in' => 'query',
'schema' => ['description' => '跟踪投递的日志服务项目的ARN。', 'type' => 'string', 'required' => false, 'example' => 'acs:log:cn-hangzhou:159498693826****:project/trail-test'],
],
[
'name' => 'SlsWriteRoleArn',
'in' => 'query',
'schema' => ['description' => '操作审计向日志服务项目投递操作事件时,扮演的角色ARN。'."\n"
."\n"
.'- 如果不指定该参数,操作审计会通过创建服务关联角色来创建相应的资源。更多信息,请参见[操作审计服务关联角色](~~169244~~)。'."\n"
."\n"
.'- 如果指定了该参数,当您需要将事件投递到本账号时,需要为RAM角色授予操作审计服务关联角色权限。当您需要将事件投递到其他账号时,需要为RAM角色绑定操作事件投递的系统权限策略。关于如何进行跨账号投递,请参见[将多个阿里云账号的事件投递到同一账号](~~207462~~)。', 'type' => 'string', 'required' => false, 'example' => 'acs:ram::159498693826****:role/aliyunserviceroleforactiontrail'],
],
[
'name' => 'EventRW',
'in' => 'query',
'schema' => ['description' => '投递事件的读写类型,取值:'."\n"
."\n"
.'- Write(默认值):写类型。'."\n"
."\n"
.'- Read:读类型。'."\n"
."\n"
.'- All:读类型和写类型。', 'type' => 'string', 'required' => false, 'example' => 'All'],
],
[
'name' => 'TrailRegion',
'in' => 'query',
'schema' => ['description' => '跟踪的地域。 '."\n"
."\n"
.'默认值为All,表示跟踪全部地域的事件。 '."\n"
."\n"
.'您也可以指定具体的地域。关于地域的更多信息,请调用[DescribeRegions](~~95532~~)接口查询。', 'type' => 'string', 'required' => false, 'example' => 'All'],
],
[
'name' => 'MnsTopicArn',
'in' => 'query',
'schema' => ['description' => '用于接收操作审计事件的MNS Topic的ARN,格式为:`acs:mns:<Region>:<Account ID>:/topics/<topicName>`。填写此参数后,向OSS中投递事件时,会产生一条消息投递到该MNS Topic。 ', 'type' => 'string', 'required' => false, 'example' => 'acs:mns:cn-hangzhou:1111:/topics/your-topic-name'],
],
],
'responses' => [
200 => [
'schema' => [
'description' => 'test',
'type' => 'object',
'properties' => [
'MnsTopicArn' => ['description' => '用于接收操作审计事件的MNS Topic的ARN。 ', 'type' => 'string', 'example' => 'acs:mns:cn-hangzhou:1111:/topics/your-topic-name'],
'SlsProjectArn' => ['description' => '跟踪投递的日志服务项目的ARN。', 'type' => 'string', 'example' => 'acs:log:cn-hangzhou:159498693826****:project/trail-test'],
'RoleName' => ['description' => '用户允许操作审计服务扮演的RAM角色名称。', 'type' => 'string', 'example' => 'aliyunserviceroleforactiontrail'],
'EventRW' => ['description' => '投递事件的读写类型。', 'type' => 'string', 'example' => 'All'],
'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0'],
'HomeRegion' => ['description' => '跟踪的Home地域。', 'type' => 'string', 'example' => 'cn-hangzhou'],
'OssKeyPrefix' => ['description' => 'OSS存储空间文件名的前缀。', 'type' => 'string', 'example' => 'at-product-account-audit-B'],
'OssBucketName' => ['description' => 'OSS存储空间的名称。', 'type' => 'string', 'example' => 'audit-log'],
'SlsWriteRoleArn' => ['description' => '操作审计向日志服务项目投递操作事件时,扮演的角色ARN。', 'type' => 'string', 'example' => 'acs:ram::159498693826****:role/aliyunserviceroleforactiontrail'],
'TrailRegion' => ['description' => '跟踪的地域。', 'type' => 'string', 'example' => 'All'],
'Name' => ['description' => '跟踪名称。', 'type' => 'string', 'example' => 'trail-test'],
],
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'RepeatOssBucket', 'errorMessage' => 'The specified OSS bucket is already in use. We recommend that you modify the existing Trail or specify another bucket.'],
['errorCode' => 'SlsProjectDoesNotExistException', 'errorMessage' => 'The specified Log Service project does not exist.'],
['errorCode' => 'IncompleteSignature', 'errorMessage' => 'The request signature does not conform to Alibaba Cloud standards.'],
['errorCode' => 'InvalidDeliveryConfigurationException', 'errorMessage' => 'You must specify at least one Log Service project or OSS bucket for a Trail.'],
['errorCode' => 'InvalidPrefixException', 'errorMessage' => 'The specified OSS bucket prefix is invalid.'],
],
403 => [
['errorCode' => 'InsufficientBucketPolicyException', 'errorMessage' => 'Access to the specified OSS bucket was denied.'],
['errorCode' => 'InsufficientSlsPolicyException', 'errorMessage' => 'Access to the specified Log Service project was denied.'],
],
[
['errorCode' => 'TrailNotFoundException', 'errorMessage' => 'The specified Trail does not exist.'],
['errorCode' => 'BucketDoesNotExistException', 'errorMessage' => 'The specified OSS bucket does not exist.'],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"MnsTopicArn\\": \\"acs:mns:cn-hangzhou:1111:/topics/your-topic-name\\",\\n \\"SlsProjectArn\\": \\"acs:log:cn-hangzhou:159498693826****:project/trail-test\\",\\n \\"RoleName\\": \\"aliyunserviceroleforactiontrail\\",\\n \\"EventRW\\": \\"All\\",\\n \\"RequestId\\": \\"145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0\\",\\n \\"HomeRegion\\": \\"cn-hangzhou\\",\\n \\"OssKeyPrefix\\": \\"at-product-account-audit-B\\",\\n \\"OssBucketName\\": \\"audit-log\\",\\n \\"SlsWriteRoleArn\\": \\"acs:ram::159498693826****:role/aliyunserviceroleforactiontrail\\",\\n \\"TrailRegion\\": \\"All\\",\\n \\"Name\\": \\"trail-test\\"\\n}","errorExample":""},{"type":"xml","example":"<UpdateTrailResponse>\\n <SlsProjectArn>acs:log:cn-hangzhou:159498693826****:project/trail-test</SlsProjectArn>\\n <RoleName>aliyunserviceroleforactiontrail</RoleName>\\n <EventRW>All</EventRW>\\n <RequestId>145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0</RequestId>\\n <HomeRegion>cn-hangzhou</HomeRegion>\\n <OssBucketName>audit-log</OssBucketName>\\n <SlsWriteRoleArn>acs:ram::159498693826****:role/aliyunserviceroleforactiontrail</SlsWriteRoleArn>\\n <TrailRegion>All</TrailRegion>\\n <Name>trail-test</Name>\\n</UpdateTrailResponse>","errorExample":""}]',
'title' => '更新跟踪',
'description' => '本文将提供一个示例,将跟踪`trail-test`投递的OSS存储空间更新为`audit-log`。',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
],
'DescribeTrails' => [
'summary' => '查看已创建的跟踪列表。',
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => ['FEATUREactiontrailHCRZJP'],
],
'parameters' => [
[
'name' => 'IncludeShadowTrails',
'in' => 'query',
'schema' => ['description' => '是否显示影子跟踪,取值:'."\n"
."\n"
.'- false(默认值):不显示。'."\n"
.'- true:显示。', 'type' => 'boolean', 'required' => false, 'example' => 'true'],
],
[
'name' => 'NameList',
'in' => 'query',
'schema' => ['description' => '需要查询的跟踪名称列表,以半角逗号(,)分隔。', 'type' => 'string', 'required' => false, 'example' => 'audit-log,trail-test2'],
],
[
'name' => 'IncludeOrganizationTrail',
'in' => 'query',
'schema' => ['description' => '是否查询多账号跟踪。取值: '."\n"
."\n"
.'- true:查询多账号跟踪。'."\n"
."\n"
.'- false(默认值):不查询多账号跟踪,即查询单账号跟踪。', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'default' => 'true'],
],
],
'responses' => [
200 => [
'schema' => [
'description' => 'test',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '10313D41-C40A-4D53-ACA0-0190334DF81C'],
'TrailList' => [
'description' => '跟踪列表。',
'type' => 'array',
'items' => [
'description' => 'test',
'type' => 'object',
'properties' => [
'TrailRegion' => ['description' => '跟踪的地域,取值示例:'."\n"
.'- All(默认值):跟踪全部地域的事件。'."\n"
.'- cn-hangzhou :仅跟踪杭州地域的事件 。'."\n"
.'- cn-beijing:仅跟踪北京地域的事件。', 'type' => 'string', 'example' => 'All'],
'Status' => ['description' => '跟踪状态,取值:'."\n"
.'- Disable:停止。'."\n"
.'- Enable:开启。 '."\n"
."\n"
.'- Fresh:已创建跟踪,但未开启。', 'type' => 'string', 'example' => 'Enable'],
'UpdateTime' => ['description' => '跟踪配置上次更新的时间。', 'type' => 'string', 'example' => '1619407012000'],
'HomeRegion' => ['description' => '跟踪的Home地域。', 'type' => 'string', 'example' => 'cn-hangzhou'],
'CreateTime' => ['description' => '跟踪创建的时间。', 'type' => 'string', 'example' => '1614580048000'],
'OssKeyPrefix' => ['description' => 'OSS存储空间文件名的前缀。', 'type' => 'string', 'example' => 'trail1'],
'EventRW' => ['description' => '投递事件的读写类型,取值:'."\n"
.'- Write(默认值):写类型。'."\n"
.'- Read:读类型。'."\n"
.'- All:读类型和写类型。', 'type' => 'string', 'example' => 'Write'],
'StartLoggingTime' => ['description' => '用户上一次开启该跟踪的时间。', 'type' => 'string', 'example' => '1619407012000'],
'MnsTopicArn' => ['description' => '用于接收操作审计事件的MNS Topic的ARN,格式为:`acs:mns:<Region>:<Account ID>:/topics/<topicName>`。填写此参数后,向OSS中投递事件时,会产生一条消息投递到该MNS Topic。 ', 'type' => 'string', 'example' => 'acs:mns:cn-hangzhou:1111:/topics/your-topic-name'],
'RoleName' => ['description' => '用户允许操作审计服务扮演的RAM角色名称。', 'type' => 'string', 'example' => 'aliyunactiontraildefaultrole'],
'SlsProjectArn' => ['description' => '跟踪投递目标的日志服务项目在阿里云唯一的资源名称(Aliyun Resource Name,ARN)。', 'type' => 'string', 'example' => 'acs:log:cn-hangzhou:159498693826****:project/alice-audit-log'],
'IsOrganizationTrail' => ['description' => '是否是多账号跟踪,取值:'."\n"
."\n"
.'- false(默认值):否。'."\n"
.'- true:是。', 'type' => 'boolean', 'example' => 'false'],
'SlsWriteRoleArn' => ['description' => '操作审计向目标日志服务项目投递日志时,扮演的角色在阿里云唯一的资源名称(Aliyun Resource Name,ARN)。', 'type' => 'string', 'example' => 'acs:ram::159498693826****:role/aliyunserviceroleforactiontrail'],
'StopLoggingTime' => ['description' => '用户上一次停止该跟踪的时间。', 'type' => 'string', 'example' => '1617674944000'],
'Name' => ['description' => '跟踪名称。 ', 'type' => 'string', 'example' => 'test-4'],
'OssBucketName' => ['description' => 'OSS存储空间的名称。', 'type' => 'string', 'example' => 'secloud'],
],
],
],
],
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'InvalidTrailNameException', 'errorMessage' => 'The specified Trail name is invalid.'],
['errorCode' => 'InvalidQueryParameter', 'errorMessage' => 'The specified query parameter is invalid.'],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"10313D41-C40A-4D53-ACA0-0190334DF81C\\",\\n \\"TrailList\\": [\\n {\\n \\"TrailRegion\\": \\"All\\",\\n \\"Status\\": \\"Enable\\",\\n \\"UpdateTime\\": \\"1619407012000\\",\\n \\"HomeRegion\\": \\"cn-hangzhou\\",\\n \\"CreateTime\\": \\"1614580048000\\",\\n \\"OssKeyPrefix\\": \\"trail1\\",\\n \\"EventRW\\": \\"Write\\",\\n \\"StartLoggingTime\\": \\"1619407012000\\",\\n \\"MnsTopicArn\\": \\"acs:mns:cn-hangzhou:1111:/topics/your-topic-name\\",\\n \\"RoleName\\": \\"aliyunactiontraildefaultrole\\",\\n \\"SlsProjectArn\\": \\"acs:log:cn-hangzhou:159498693826****:project/alice-audit-log\\",\\n \\"IsOrganizationTrail\\": false,\\n \\"SlsWriteRoleArn\\": \\"acs:ram::159498693826****:role/aliyunserviceroleforactiontrail\\",\\n \\"StopLoggingTime\\": \\"1617674944000\\",\\n \\"Name\\": \\"test-4\\",\\n \\"OssBucketName\\": \\"secloud\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<DescribeTrailsResponse>\\n <RequestId>10313D41-C40A-4D53-ACA0-0190334DF81C</RequestId>\\n <TrailList>\\n <Status>Enable</Status>\\n <MnsTopicArn>acs:mns:cn-hangzhou:1111:/topics/your-topic-name</MnsTopicArn>\\n <HomeRegion>cn-hangzhou</HomeRegion>\\n <StartLoggingTime>1619407012000</StartLoggingTime>\\n <CreateTime>1614580048000</CreateTime>\\n <StopLoggingTime>1617674944000</StopLoggingTime>\\n <SlsWriteRoleArn>acs:ram::159498693826****:role/aliyunserviceroleforactiontrail</SlsWriteRoleArn>\\n <TrailRegion>All</TrailRegion>\\n <Name>test-4</Name>\\n <IsOrganizationTrail>false</IsOrganizationTrail>\\n <SlsProjectArn>acs:log:cn-hangzhou:159498693826****:project/alice-audit-log</SlsProjectArn>\\n <RoleName>aliyunactiontraildefaultrole</RoleName>\\n <EventRW>Write</EventRW>\\n <UpdateTime>1619407012000</UpdateTime>\\n <OssKeyPrefix>trail1</OssKeyPrefix>\\n <OssBucketName>secloud</OssBucketName>\\n </TrailList>\\n</DescribeTrailsResponse>","errorExample":""}]',
'title' => '查询某地域的跟踪列表',
'description' => '本文将提供一个示例,查询当前账号的单账号跟踪列表。返回结果显示只有一条名为`test-4`的跟踪。',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
],
'GetTrailStatus' => [
'summary' => '查看跟踪状态。',
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => ['FEATUREactiontrail321LUI'],
],
'parameters' => [
[
'name' => 'Name',
'in' => 'query',
'schema' => ['description' => '跟踪名称。 '."\n"
.'长度为6~36个字符,必须以小写英文字母开头,可包含小写英文字母、数字、短划线(-)和下划线(_)。'."\n"
.'>同一账号内跟踪名称不可重复。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'trail-test'],
],
[
'name' => 'IsOrganizationTrail',
'in' => 'query',
'schema' => ['description' => '是否查询多账号跟踪的状态。取值: '."\n"
."\n"
.'- true:查询多账号跟踪的状态。 '."\n"
."\n"
.'- false(默认值):不查询多账号跟踪的状态,即查询单账号跟踪的状态。', 'type' => 'boolean', 'required' => false, 'example' => 'false'],
],
],
'responses' => [
200 => [
'schema' => [
'description' => 'test',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '8FFD2DE7-74F0-4582-A4CB-BF6523FEF06C'],
'StartLoggingTime' => ['description' => '用户上一次开启该跟踪的时间。', 'type' => 'string', 'example' => '2021-03-31T04:06:41Z'],
'LatestDeliveryError' => ['description' => '最后一次行为追踪异常的日志信息。', 'type' => 'string', 'example' => 'write sls failed, exception: the parent of sub user must be project owner, itemscount: 1'],
'StopLoggingTime' => ['description' => '用户上一次停止该跟踪的时间。', 'type' => 'string', 'example' => '2021-04-02T02:36:56Z'],
'IsLogging' => ['description' => '是否开启日志记录。', 'type' => 'boolean', 'example' => 'false'],
'LatestDeliveryTime' => ['description' => '最后一次成功记录行为的时间。', 'type' => 'string', 'example' => '1547792223000'],
],
],
],
],
'errorCodes' => [
404 => [
['errorCode' => 'TrailNotFoundException', 'errorMessage' => 'The specified Trail does not exist.'],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"8FFD2DE7-74F0-4582-A4CB-BF6523FEF06C\\",\\n \\"StartLoggingTime\\": \\"2021-03-31T04:06:41Z\\",\\n \\"LatestDeliveryError\\": \\"write sls failed, exception: the parent of sub user must be project owner, itemscount: 1\\",\\n \\"StopLoggingTime\\": \\"2021-04-02T02:36:56Z\\",\\n \\"IsLogging\\": false,\\n \\"LatestDeliveryTime\\": \\"1547792223000\\"\\n}","errorExample":""},{"type":"xml","example":"<GetTrailStatusResponse>\\n <RequestId>8FFD2DE7-74F0-4582-A4CB-BF6523FEF06C</RequestId>\\n <StartLoggingTime>2021-03-31T04:06:41Z</StartLoggingTime>\\n <LatestDeliveryError>write sls failed, exception: the parent of sub user must be project owner, itemscount: 1</LatestDeliveryError>\\n <StopLoggingTime>2021-04-02T02:36:56Z</StopLoggingTime>\\n <IsLogging>false</IsLogging>\\n</GetTrailStatusResponse>","errorExample":""}]',
'title' => '查询跟踪状态',
'description' => '本文将提供一个示例,查询名为`trail-test`的跟踪的状态。',
'requestParamsDescription' => ' 关于公共请求参数的详情,请参见[公共参数](~~28837~~)。',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
],
'LookupEvents' => [
'summary' => '检索历史操作事件。',
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => ['FEATUREactiontrailHCRZJP'],
'tenantRelevance' => 'publicInformation',
],
'parameters' => [
[
'name' => 'Event',
'in' => 'query',
'schema' => ['description' => '事件ID。', 'type' => 'string', 'required' => false, 'example' => 'AD9CD9DA-EC2D-4EB7-A817-C0442A94****'],
],
[
'name' => 'Request',
'in' => 'query',
'schema' => ['description' => '请求ID。', 'type' => 'string', 'required' => false, 'example' => 'AD9CD9DA-EC2D-4EB7-A817-C0442A94****'],
],
[
'name' => 'EventType',
'in' => 'query',
'schema' => ['description' => '事件类型,取值:'."\n"
."\n"
.'- ApiCall:API调用事件。'."\n"
."\n"
.'- ConsoleOperation:控制台操作事件。'."\n"
."\n"
.'- AliyunServiceEvent:阿里云服务事件。 '."\n"
."\n"
.'- PasswordReset:密码重置事件。 '."\n"
."\n"
.'- ConsoleSignin:控制台登录事件。 '."\n"
."\n"
.'- ConsoleSignout:控制台登出事件。', 'type' => 'string', 'required' => false, 'example' => 'ConsoleSignin'],
],
[
'name' => 'ServiceName',
'in' => 'query',
'schema' => ['description' => '云服务名称。', 'type' => 'string', 'required' => false, 'example' => 'AsaSub'],
],
[
'name' => 'EventName',
'in' => 'query',
'schema' => ['description' => '事件名称。', 'type' => 'string', 'required' => false, 'example' => 'ConsoleSignin'],
],
[
'name' => 'User',
'in' => 'query',
'schema' => ['description' => '调用者名称,即RAM用户。', 'type' => 'string', 'required' => false, 'example' => 'yanjie.wyj'],
],
[
'name' => 'ResourceType',
'in' => 'query',
'schema' => ['description' => '资源类型。', 'type' => 'string', 'required' => false, 'example' => 'Instance'],
],
[
'name' => 'ResourceName',
'in' => 'query',
'schema' => ['description' => '资源名称。', 'type' => 'string', 'required' => false, 'example' => 'i-bp14664y88udkt45****'],
],
[
'name' => 'EventRW',
'in' => 'query',
'schema' => ['description' => '请求事件的读写类型,取值: '."\n"
."\n"
.'- Read:读类型。 '."\n"
."\n"
.'- Write(默认值):写类型。 '."\n"
."\n"
.'- All:读类型和写类型。', 'type' => 'string', 'required' => false, 'example' => 'Write'],
],
[
'name' => 'EventAccessKeyId',
'in' => 'query',
'schema' => ['description' => '要检索事件的AccessKey ID。', 'type' => 'string', 'required' => false, 'example' => 'LTAI****************'],
],
[
'name' => 'NextToken',
'in' => 'query',
'schema' => ['description' => '用于请求下一页检索的结果。'."\n"
.'>请求参数必须保证和上次请求一致。', 'type' => 'string', 'required' => false, 'example' => '20'],
],
[
'name' => 'MaxResults',
'in' => 'query',
'schema' => ['description' => '允许返回的最大结果数目。 '."\n"
.'取值范围:0~50个。', 'type' => 'string', 'required' => false, 'example' => '20'],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => ['description' => '检索事件的开始时间,默认为当前时间7天前的时间点。日期格式按照ISO8601标准,并使用UTC时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。'."\n"
.'>支持最长90天内,跨度不超过30天的事件检索。'."\n"
."\n\n", 'type' => 'string', 'required' => false, 'example' => '2020-06-15T14:00:00Z'],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => ['description' => '检索事件的结束时间,默认为当前时间点。日期格式按照ISO8601标准,并使用UTC时间。格式为:`YYYY-MM-DDThh:mm:ssZ`。'."\n"
.'>支持最长90天内,跨度不超过30天的事件检索。'."\n"
."\n", 'type' => 'string', 'required' => false, 'example' => '2020-06-22T14:00:00Z'],
],
],
'responses' => [
200 => [
'schema' => [
'description' => 'test',
'type' => 'object',
'properties' => [
'EndTime' => ['description' => '检索到事件的结束时间。', 'type' => 'string', 'example' => '2020-07-22T14:00:00Z'],
'NextToken' => ['description' => '返回下一页的检索结果。'."\n"
.'>若无更多结果,则不返回此字段。', 'type' => 'string', 'example' => '1'],
'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'FD79665A-CE8B-49D4-82E6-5EE2E0E791DD'],
'Events' => [
'description' => 'test',
'type' => 'array',
'items' => ['description' => '检索到的事件列表。', 'type' => 'object', 'example' => 'AD9CD9DA-EC2D-4EB7-A817-C0442A94****'],
],
'StartTime' => ['description' => '检索到事件的开始时间。', 'type' => 'string', 'example' => '2020-07-15T14:00:00Z'],
],
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'IncompleteSignature', 'errorMessage' => 'The request signature does not conform to Alibaba Cloud standards.'],
['errorCode' => 'InvalidParameterCombination', 'errorMessage' => 'The end time must be later than the start time.'],
['errorCode' => 'InvalidQueryParameter', 'errorMessage' => 'The specified query parameter is invalid.'],
['errorCode' => 'InvalidParameterDateOutOfRange', 'errorMessage' => 'Query time range exceeds 30 days.'],
['errorCode' => 'InvalidParameterEndTime', 'errorMessage' => 'The specified EndTime is invalid.'],
['errorCode' => 'InvalidParameterStartTime', 'errorMessage' => 'The specified StartTime is invalid.'],
['errorCode' => 'InvalidParameterStartTimeExceedsCurrent', 'errorMessage' => 'The StartTime exceeds the current time. Use GMT time format for queries.'],
['errorCode' => 'InvalidParameterStartTimeOutOfDate', 'errorMessage' => 'The StartTime exceeds the limit of 90 days.'],
['errorCode' => 'InvalidTimeRangeException', 'errorMessage' => 'The end time must be later than the start time. The time span cannot exceed 30 days.'],
],
404 => [
['errorCode' => 'InvalidAction', 'errorMessage' => 'The specified action is invalid.'],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"EndTime\\": \\"2020-07-22T14:00:00Z\\",\\n \\"NextToken\\": \\"1\\",\\n \\"RequestId\\": \\"FD79665A-CE8B-49D4-82E6-5EE2E0E791DD\\",\\n \\"Events\\": [\\n {\\n \\"test\\": \\"test\\",\\n \\"test2\\": 1\\n }\\n ],\\n \\"StartTime\\": \\"2020-07-15T14:00:00Z\\"\\n}","errorExample":""},{"type":"xml","example":"<LookupEventsResponse>\\n <RequestId>AB6843AF-C07E-4B59-BBF8-A0CEB785E6A2</RequestId>\\n <NextToken>2</NextToken>\\n <EndTime>2020-11-26T01:30:39Z</EndTime>\\n <Events>\\n <eventId>96.227_1606286128938_****</eventId>\\n <eventVersion>1</eventVersion>\\n <errorMessage>success</errorMessage>\\n <eventSource>signin.aliyun.com</eventSource>\\n <sourceIpAddress>42.120.XX.XX</sourceIpAddress>\\n <userAgent>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36</userAgent>\\n <eventType>ConsoleSignin</eventType>\\n <userIdentity>\\n <accountId>159498693826****</accountId>\\n <principalId>24611178745315****</principalId>\\n <type>ram-user</type>\\n <userName>alice</userName>\\n </userIdentity>\\n <serviceName>AasSub</serviceName>\\n <additionalEventData>\\n <callbackUrl>https://api.aliyun.com/new?spm=a2c1g.8271268.10000.9.2d59df259iBwq1</callbackUrl>\\n <mfaChecked>false</mfaChecked>\\n </additionalEventData>\\n <requestId>96.227_1606286128938_2847</requestId>\\n <eventTime>2020-11-25T06:35:29Z</eventTime>\\n <acsRegion>cn-hangzhou</acsRegion>\\n <eventName>ConsoleSignin</eventName>\\n </Events>\\n <Events>\\n <eventId>132.20_1606132532480_****</eventId>\\n <eventVersion>1</eventVersion>\\n <errorMessage>success</errorMessage>\\n <eventSource>signin.aliyun.com</eventSource>\\n <sourceIpAddress>42.120.XX.XX</sourceIpAddress>\\n <userAgent>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36</userAgent>\\n <eventType>ConsoleSignin</eventType>\\n <userIdentity>\\n <accountId>159498693826****</accountId>\\n <principalId>26855899827085****</principalId>\\n <type>ram-user</type>\\n <userName>yuge.****</userName>\\n </userIdentity>\\n <serviceName>AasSub</serviceName>\\n <additionalEventData>\\n <callbackUrl>https://home.console.aliyun.com/</callbackUrl>\\n <mfaChecked>false</mfaChecked>\\n </additionalEventData>\\n <requestId>132.20_1606132532480_7292</requestId>\\n <eventTime>2020-11-23T11:55:32Z</eventTime>\\n <acsRegion>cn-hangzhou</acsRegion>\\n <eventName>ConsoleSignin</eventName>\\n </Events>\\n <StartTime>2020-11-19T01:31:09Z</StartTime>\\n</LookupEventsResponse>","errorExample":""}]',
'title' => '检索详细历史事件',
'description' => '使用LookupEvents检索历史事件时,每秒钟最多调用两次。'."\n"
.'注意:请勿频繁调用该接口。您可以创建跟踪,将事件投递到日志服务SLS,通过SLS的实时消费功能来近实时地检索历史事件。'."\n"
.'具体操作,请参见[创建单账号跟踪](~~28810~~)、[创建多账号跟踪](~~160661~~)和[实时消费](~~28997~~)。 '."\n"
."\n"
.'> 该接口(2017-12-04版本API LookupEvents接口)即将下线,推荐您使用2020-07-06版本API。更多信息,请参见[LookupEvents](~~185722~~)。',
'requestParamsDescription' => 'Event内的子字段说明,请参见[操作事件结构定义](~~28819~~)。',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
],
],
'endpoints' => [
['regionId' => 'ap-northeast-2-pop', 'endpoint' => 'actiontrail.ap-northeast-1.aliyuncs.com'],
['regionId' => 'cn-beijing-finance-pop', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-beijing-gov-1', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-beijing-nu16-b01', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-edge-1', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-fujian', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-haidian-cm12-c01', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-hangzhou-bj-b01', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-hangzhou-internal-prod-1', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-hangzhou-internal-test-1', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-hangzhou-internal-test-2', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-hangzhou-internal-test-3', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-hangzhou-test-306', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-hongkong-finance-pop', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-qingdao-nebula', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-shanghai-et15-b01', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-shanghai-et2-b01', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-shanghai-inner', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-shanghai-internal-test-1', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-shenzhen-inner', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-shenzhen-st4-d01', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-shenzhen-su18-b01', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-wuhan', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-yushanfang', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-zhangbei-na61-b01', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-zhangjiakou-na62-a01', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'cn-zhengzhou-nebula-1', 'endpoint' => 'actiontrail.aliyuncs.com'],
['regionId' => 'eu-west-1-oxs', 'endpoint' => 'actiontrail.ap-northeast-1.aliyuncs.com'],
['regionId' => 'rus-west-1-pop', 'endpoint' => 'actiontrail.ap-northeast-1.aliyuncs.com'],
['regionId' => 'cn-qingdao', 'endpoint' => 'actiontrail.cn-qingdao.aliyuncs.com'],
['regionId' => 'cn-beijing', 'endpoint' => 'actiontrail.cn-beijing.aliyuncs.com'],
['regionId' => 'cn-chengdu', 'endpoint' => 'actiontrail.cn-chengdu.aliyuncs.com'],
['regionId' => 'cn-zhangjiakou', 'endpoint' => 'actiontrail.cn-zhangjiakou.aliyuncs.com'],
['regionId' => 'cn-huhehaote', 'endpoint' => 'actiontrail.cn-huhehaote.aliyuncs.com'],
['regionId' => 'cn-hangzhou', 'endpoint' => 'actiontrail.cn-hangzhou.aliyuncs.com'],
['regionId' => 'cn-shanghai', 'endpoint' => 'actiontrail.cn-shanghai.aliyuncs.com'],
['regionId' => 'cn-shenzhen', 'endpoint' => 'actiontrail.cn-shenzhen.aliyuncs.com'],
['regionId' => 'cn-hongkong', 'endpoint' => 'actiontrail.cn-hongkong.aliyuncs.com'],
['regionId' => 'ap-southeast-1', 'endpoint' => 'actiontrail.ap-southeast-1.aliyuncs.com'],
['regionId' => 'ap-southeast-3', 'endpoint' => 'actiontrail.ap-southeast-3.aliyuncs.com'],
['regionId' => 'ap-southeast-5', 'endpoint' => 'actiontrail.ap-southeast-5.aliyuncs.com'],
['regionId' => 'ap-northeast-1', 'endpoint' => 'actiontrail.ap-northeast-1.aliyuncs.com'],
['regionId' => 'eu-west-1', 'endpoint' => 'actiontrail.eu-west-1.aliyuncs.com'],
['regionId' => 'us-west-1', 'endpoint' => 'actiontrail.us-west-1.aliyuncs.com'],
['regionId' => 'us-east-1', 'endpoint' => 'actiontrail.us-east-1.aliyuncs.com'],
['regionId' => 'eu-central-1', 'endpoint' => 'actiontrail.eu-central-1.aliyuncs.com'],
['regionId' => 'me-east-1', 'endpoint' => 'actiontrail.me-east-1.aliyuncs.com'],
['regionId' => 'cn-shanghai-finance-1', 'endpoint' => 'actiontrail.cn-shanghai-finance-1.aliyuncs.com'],
['regionId' => 'cn-north-2-gov-1', 'endpoint' => 'actiontrail.cn-north-2-gov-1.aliyuncs.com'],
['regionId' => 'cn-wulanchabu', 'endpoint' => 'actiontrail.cn-wulanchabu.aliyuncs.com'],
['regionId' => 'cn-nanjing', 'endpoint' => 'actiontrail.cn-nanjing.aliyuncs.com'],
['regionId' => 'cn-heyuan', 'endpoint' => 'actiontrail.cn-heyuan.aliyuncs.com'],
['regionId' => 'cn-guangzhou', 'endpoint' => 'actiontrail.cn-guangzhou.aliyuncs.com'],
['regionId' => 'ap-northeast-2', 'endpoint' => 'actiontrail.ap-northeast-2.aliyuncs.com'],
['regionId' => 'ap-southeast-7', 'endpoint' => 'actiontrail.ap-southeast-7.aliyuncs.com'],
['regionId' => 'na-south-1', 'endpoint' => 'actiontrail.na-south-1.aliyuncs.com'],
],
];
|