aws-sdk-cloudtrail 1.19.0 → 1.24.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,23 +29,33 @@ module Aws::CloudTrail
29
29
  DescribeTrailsRequest = Shapes::StructureShape.new(name: 'DescribeTrailsRequest')
30
30
  DescribeTrailsResponse = Shapes::StructureShape.new(name: 'DescribeTrailsResponse')
31
31
  Event = Shapes::StructureShape.new(name: 'Event')
32
+ EventCategory = Shapes::StringShape.new(name: 'EventCategory')
32
33
  EventSelector = Shapes::StructureShape.new(name: 'EventSelector')
33
34
  EventSelectors = Shapes::ListShape.new(name: 'EventSelectors')
34
35
  EventsList = Shapes::ListShape.new(name: 'EventsList')
36
+ ExcludeManagementEventSources = Shapes::ListShape.new(name: 'ExcludeManagementEventSources')
35
37
  GetEventSelectorsRequest = Shapes::StructureShape.new(name: 'GetEventSelectorsRequest')
36
38
  GetEventSelectorsResponse = Shapes::StructureShape.new(name: 'GetEventSelectorsResponse')
39
+ GetInsightSelectorsRequest = Shapes::StructureShape.new(name: 'GetInsightSelectorsRequest')
40
+ GetInsightSelectorsResponse = Shapes::StructureShape.new(name: 'GetInsightSelectorsResponse')
37
41
  GetTrailRequest = Shapes::StructureShape.new(name: 'GetTrailRequest')
38
42
  GetTrailResponse = Shapes::StructureShape.new(name: 'GetTrailResponse')
39
43
  GetTrailStatusRequest = Shapes::StructureShape.new(name: 'GetTrailStatusRequest')
40
44
  GetTrailStatusResponse = Shapes::StructureShape.new(name: 'GetTrailStatusResponse')
45
+ InsightNotEnabledException = Shapes::StructureShape.new(name: 'InsightNotEnabledException')
46
+ InsightSelector = Shapes::StructureShape.new(name: 'InsightSelector')
47
+ InsightSelectors = Shapes::ListShape.new(name: 'InsightSelectors')
48
+ InsightType = Shapes::StringShape.new(name: 'InsightType')
41
49
  InsufficientDependencyServiceAccessPermissionException = Shapes::StructureShape.new(name: 'InsufficientDependencyServiceAccessPermissionException')
42
50
  InsufficientEncryptionPolicyException = Shapes::StructureShape.new(name: 'InsufficientEncryptionPolicyException')
43
51
  InsufficientS3BucketPolicyException = Shapes::StructureShape.new(name: 'InsufficientS3BucketPolicyException')
44
52
  InsufficientSnsTopicPolicyException = Shapes::StructureShape.new(name: 'InsufficientSnsTopicPolicyException')
45
53
  InvalidCloudWatchLogsLogGroupArnException = Shapes::StructureShape.new(name: 'InvalidCloudWatchLogsLogGroupArnException')
46
54
  InvalidCloudWatchLogsRoleArnException = Shapes::StructureShape.new(name: 'InvalidCloudWatchLogsRoleArnException')
55
+ InvalidEventCategoryException = Shapes::StructureShape.new(name: 'InvalidEventCategoryException')
47
56
  InvalidEventSelectorsException = Shapes::StructureShape.new(name: 'InvalidEventSelectorsException')
48
57
  InvalidHomeRegionException = Shapes::StructureShape.new(name: 'InvalidHomeRegionException')
58
+ InvalidInsightSelectorsException = Shapes::StructureShape.new(name: 'InvalidInsightSelectorsException')
49
59
  InvalidKmsKeyIdException = Shapes::StructureShape.new(name: 'InvalidKmsKeyIdException')
50
60
  InvalidLookupAttributesException = Shapes::StructureShape.new(name: 'InvalidLookupAttributesException')
51
61
  InvalidMaxResultsException = Shapes::StructureShape.new(name: 'InvalidMaxResultsException')
@@ -83,6 +93,8 @@ module Aws::CloudTrail
83
93
  PublicKeyList = Shapes::ListShape.new(name: 'PublicKeyList')
84
94
  PutEventSelectorsRequest = Shapes::StructureShape.new(name: 'PutEventSelectorsRequest')
85
95
  PutEventSelectorsResponse = Shapes::StructureShape.new(name: 'PutEventSelectorsResponse')
96
+ PutInsightSelectorsRequest = Shapes::StructureShape.new(name: 'PutInsightSelectorsRequest')
97
+ PutInsightSelectorsResponse = Shapes::StructureShape.new(name: 'PutInsightSelectorsResponse')
86
98
  ReadWriteType = Shapes::StringShape.new(name: 'ReadWriteType')
87
99
  RemoveTagsRequest = Shapes::StructureShape.new(name: 'RemoveTagsRequest')
88
100
  RemoveTagsResponse = Shapes::StructureShape.new(name: 'RemoveTagsResponse')
@@ -120,6 +132,12 @@ module Aws::CloudTrail
120
132
 
121
133
  AddTagsResponse.struct_class = Types::AddTagsResponse
122
134
 
135
+ CloudTrailARNInvalidException.struct_class = Types::CloudTrailARNInvalidException
136
+
137
+ CloudTrailAccessNotEnabledException.struct_class = Types::CloudTrailAccessNotEnabledException
138
+
139
+ CloudWatchLogsDeliveryUnavailableException.struct_class = Types::CloudWatchLogsDeliveryUnavailableException
140
+
123
141
  CreateTrailRequest.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Name"))
124
142
  CreateTrailRequest.add_member(:s3_bucket_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "S3BucketName"))
125
143
  CreateTrailRequest.add_member(:s3_key_prefix, Shapes::ShapeRef.new(shape: String, location_name: "S3KeyPrefix"))
@@ -183,12 +201,15 @@ module Aws::CloudTrail
183
201
  EventSelector.add_member(:read_write_type, Shapes::ShapeRef.new(shape: ReadWriteType, location_name: "ReadWriteType"))
184
202
  EventSelector.add_member(:include_management_events, Shapes::ShapeRef.new(shape: Boolean, location_name: "IncludeManagementEvents"))
185
203
  EventSelector.add_member(:data_resources, Shapes::ShapeRef.new(shape: DataResources, location_name: "DataResources"))
204
+ EventSelector.add_member(:exclude_management_event_sources, Shapes::ShapeRef.new(shape: ExcludeManagementEventSources, location_name: "ExcludeManagementEventSources"))
186
205
  EventSelector.struct_class = Types::EventSelector
187
206
 
188
207
  EventSelectors.member = Shapes::ShapeRef.new(shape: EventSelector)
189
208
 
190
209
  EventsList.member = Shapes::ShapeRef.new(shape: Event)
191
210
 
211
+ ExcludeManagementEventSources.member = Shapes::ShapeRef.new(shape: String)
212
+
192
213
  GetEventSelectorsRequest.add_member(:trail_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "TrailName"))
193
214
  GetEventSelectorsRequest.struct_class = Types::GetEventSelectorsRequest
194
215
 
@@ -196,6 +217,13 @@ module Aws::CloudTrail
196
217
  GetEventSelectorsResponse.add_member(:event_selectors, Shapes::ShapeRef.new(shape: EventSelectors, location_name: "EventSelectors"))
197
218
  GetEventSelectorsResponse.struct_class = Types::GetEventSelectorsResponse
198
219
 
220
+ GetInsightSelectorsRequest.add_member(:trail_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "TrailName"))
221
+ GetInsightSelectorsRequest.struct_class = Types::GetInsightSelectorsRequest
222
+
223
+ GetInsightSelectorsResponse.add_member(:trail_arn, Shapes::ShapeRef.new(shape: String, location_name: "TrailARN"))
224
+ GetInsightSelectorsResponse.add_member(:insight_selectors, Shapes::ShapeRef.new(shape: InsightSelectors, location_name: "InsightSelectors"))
225
+ GetInsightSelectorsResponse.struct_class = Types::GetInsightSelectorsResponse
226
+
199
227
  GetTrailRequest.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Name"))
200
228
  GetTrailRequest.struct_class = Types::GetTrailRequest
201
229
 
@@ -224,6 +252,63 @@ module Aws::CloudTrail
224
252
  GetTrailStatusResponse.add_member(:time_logging_stopped, Shapes::ShapeRef.new(shape: String, location_name: "TimeLoggingStopped"))
225
253
  GetTrailStatusResponse.struct_class = Types::GetTrailStatusResponse
226
254
 
255
+ InsightNotEnabledException.struct_class = Types::InsightNotEnabledException
256
+
257
+ InsightSelector.add_member(:insight_type, Shapes::ShapeRef.new(shape: InsightType, location_name: "InsightType"))
258
+ InsightSelector.struct_class = Types::InsightSelector
259
+
260
+ InsightSelectors.member = Shapes::ShapeRef.new(shape: InsightSelector)
261
+
262
+ InsufficientDependencyServiceAccessPermissionException.struct_class = Types::InsufficientDependencyServiceAccessPermissionException
263
+
264
+ InsufficientEncryptionPolicyException.struct_class = Types::InsufficientEncryptionPolicyException
265
+
266
+ InsufficientS3BucketPolicyException.struct_class = Types::InsufficientS3BucketPolicyException
267
+
268
+ InsufficientSnsTopicPolicyException.struct_class = Types::InsufficientSnsTopicPolicyException
269
+
270
+ InvalidCloudWatchLogsLogGroupArnException.struct_class = Types::InvalidCloudWatchLogsLogGroupArnException
271
+
272
+ InvalidCloudWatchLogsRoleArnException.struct_class = Types::InvalidCloudWatchLogsRoleArnException
273
+
274
+ InvalidEventCategoryException.struct_class = Types::InvalidEventCategoryException
275
+
276
+ InvalidEventSelectorsException.struct_class = Types::InvalidEventSelectorsException
277
+
278
+ InvalidHomeRegionException.struct_class = Types::InvalidHomeRegionException
279
+
280
+ InvalidInsightSelectorsException.struct_class = Types::InvalidInsightSelectorsException
281
+
282
+ InvalidKmsKeyIdException.struct_class = Types::InvalidKmsKeyIdException
283
+
284
+ InvalidLookupAttributesException.struct_class = Types::InvalidLookupAttributesException
285
+
286
+ InvalidMaxResultsException.struct_class = Types::InvalidMaxResultsException
287
+
288
+ InvalidNextTokenException.struct_class = Types::InvalidNextTokenException
289
+
290
+ InvalidParameterCombinationException.struct_class = Types::InvalidParameterCombinationException
291
+
292
+ InvalidS3BucketNameException.struct_class = Types::InvalidS3BucketNameException
293
+
294
+ InvalidS3PrefixException.struct_class = Types::InvalidS3PrefixException
295
+
296
+ InvalidSnsTopicNameException.struct_class = Types::InvalidSnsTopicNameException
297
+
298
+ InvalidTagParameterException.struct_class = Types::InvalidTagParameterException
299
+
300
+ InvalidTimeRangeException.struct_class = Types::InvalidTimeRangeException
301
+
302
+ InvalidTokenException.struct_class = Types::InvalidTokenException
303
+
304
+ InvalidTrailNameException.struct_class = Types::InvalidTrailNameException
305
+
306
+ KmsException.struct_class = Types::KmsException
307
+
308
+ KmsKeyDisabledException.struct_class = Types::KmsKeyDisabledException
309
+
310
+ KmsKeyNotFoundException.struct_class = Types::KmsKeyNotFoundException
311
+
227
312
  ListPublicKeysRequest.add_member(:start_time, Shapes::ShapeRef.new(shape: Date, location_name: "StartTime"))
228
313
  ListPublicKeysRequest.add_member(:end_time, Shapes::ShapeRef.new(shape: Date, location_name: "EndTime"))
229
314
  ListPublicKeysRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
@@ -257,6 +342,7 @@ module Aws::CloudTrail
257
342
  LookupEventsRequest.add_member(:lookup_attributes, Shapes::ShapeRef.new(shape: LookupAttributesList, location_name: "LookupAttributes"))
258
343
  LookupEventsRequest.add_member(:start_time, Shapes::ShapeRef.new(shape: Date, location_name: "StartTime"))
259
344
  LookupEventsRequest.add_member(:end_time, Shapes::ShapeRef.new(shape: Date, location_name: "EndTime"))
345
+ LookupEventsRequest.add_member(:event_category, Shapes::ShapeRef.new(shape: EventCategory, location_name: "EventCategory"))
260
346
  LookupEventsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
261
347
  LookupEventsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
262
348
  LookupEventsRequest.struct_class = Types::LookupEventsRequest
@@ -265,6 +351,16 @@ module Aws::CloudTrail
265
351
  LookupEventsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
266
352
  LookupEventsResponse.struct_class = Types::LookupEventsResponse
267
353
 
354
+ MaximumNumberOfTrailsExceededException.struct_class = Types::MaximumNumberOfTrailsExceededException
355
+
356
+ NotOrganizationMasterAccountException.struct_class = Types::NotOrganizationMasterAccountException
357
+
358
+ OperationNotPermittedException.struct_class = Types::OperationNotPermittedException
359
+
360
+ OrganizationNotInAllFeaturesModeException.struct_class = Types::OrganizationNotInAllFeaturesModeException
361
+
362
+ OrganizationsNotInUseException.struct_class = Types::OrganizationsNotInUseException
363
+
268
364
  PublicKey.add_member(:value, Shapes::ShapeRef.new(shape: ByteBuffer, location_name: "Value"))
269
365
  PublicKey.add_member(:validity_start_time, Shapes::ShapeRef.new(shape: Date, location_name: "ValidityStartTime"))
270
366
  PublicKey.add_member(:validity_end_time, Shapes::ShapeRef.new(shape: Date, location_name: "ValidityEndTime"))
@@ -281,6 +377,14 @@ module Aws::CloudTrail
281
377
  PutEventSelectorsResponse.add_member(:event_selectors, Shapes::ShapeRef.new(shape: EventSelectors, location_name: "EventSelectors"))
282
378
  PutEventSelectorsResponse.struct_class = Types::PutEventSelectorsResponse
283
379
 
380
+ PutInsightSelectorsRequest.add_member(:trail_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "TrailName"))
381
+ PutInsightSelectorsRequest.add_member(:insight_selectors, Shapes::ShapeRef.new(shape: InsightSelectors, required: true, location_name: "InsightSelectors"))
382
+ PutInsightSelectorsRequest.struct_class = Types::PutInsightSelectorsRequest
383
+
384
+ PutInsightSelectorsResponse.add_member(:trail_arn, Shapes::ShapeRef.new(shape: String, location_name: "TrailARN"))
385
+ PutInsightSelectorsResponse.add_member(:insight_selectors, Shapes::ShapeRef.new(shape: InsightSelectors, location_name: "InsightSelectors"))
386
+ PutInsightSelectorsResponse.struct_class = Types::PutInsightSelectorsResponse
387
+
284
388
  RemoveTagsRequest.add_member(:resource_id, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ResourceId"))
285
389
  RemoveTagsRequest.add_member(:tags_list, Shapes::ShapeRef.new(shape: TagsList, location_name: "TagsList"))
286
390
  RemoveTagsRequest.struct_class = Types::RemoveTagsRequest
@@ -295,12 +399,18 @@ module Aws::CloudTrail
295
399
 
296
400
  ResourceList.member = Shapes::ShapeRef.new(shape: Resource)
297
401
 
402
+ ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
403
+
298
404
  ResourceTag.add_member(:resource_id, Shapes::ShapeRef.new(shape: String, location_name: "ResourceId"))
299
405
  ResourceTag.add_member(:tags_list, Shapes::ShapeRef.new(shape: TagsList, location_name: "TagsList"))
300
406
  ResourceTag.struct_class = Types::ResourceTag
301
407
 
302
408
  ResourceTagList.member = Shapes::ShapeRef.new(shape: ResourceTag)
303
409
 
410
+ ResourceTypeNotSupportedException.struct_class = Types::ResourceTypeNotSupportedException
411
+
412
+ S3BucketDoesNotExistException.struct_class = Types::S3BucketDoesNotExistException
413
+
304
414
  StartLoggingRequest.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Name"))
305
415
  StartLoggingRequest.struct_class = Types::StartLoggingRequest
306
416
 
@@ -315,6 +425,8 @@ module Aws::CloudTrail
315
425
  Tag.add_member(:value, Shapes::ShapeRef.new(shape: String, location_name: "Value"))
316
426
  Tag.struct_class = Types::Tag
317
427
 
428
+ TagsLimitExceededException.struct_class = Types::TagsLimitExceededException
429
+
318
430
  TagsList.member = Shapes::ShapeRef.new(shape: Tag)
319
431
 
320
432
  Trail.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "Name"))
@@ -331,9 +443,12 @@ module Aws::CloudTrail
331
443
  Trail.add_member(:cloud_watch_logs_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "CloudWatchLogsRoleArn"))
332
444
  Trail.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: String, location_name: "KmsKeyId"))
333
445
  Trail.add_member(:has_custom_event_selectors, Shapes::ShapeRef.new(shape: Boolean, location_name: "HasCustomEventSelectors"))
446
+ Trail.add_member(:has_insight_selectors, Shapes::ShapeRef.new(shape: Boolean, location_name: "HasInsightSelectors"))
334
447
  Trail.add_member(:is_organization_trail, Shapes::ShapeRef.new(shape: Boolean, location_name: "IsOrganizationTrail"))
335
448
  Trail.struct_class = Types::Trail
336
449
 
450
+ TrailAlreadyExistsException.struct_class = Types::TrailAlreadyExistsException
451
+
337
452
  TrailInfo.add_member(:trail_arn, Shapes::ShapeRef.new(shape: String, location_name: "TrailARN"))
338
453
  TrailInfo.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "Name"))
339
454
  TrailInfo.add_member(:home_region, Shapes::ShapeRef.new(shape: String, location_name: "HomeRegion"))
@@ -343,8 +458,14 @@ module Aws::CloudTrail
343
458
 
344
459
  TrailNameList.member = Shapes::ShapeRef.new(shape: String)
345
460
 
461
+ TrailNotFoundException.struct_class = Types::TrailNotFoundException
462
+
463
+ TrailNotProvidedException.struct_class = Types::TrailNotProvidedException
464
+
346
465
  Trails.member = Shapes::ShapeRef.new(shape: TrailInfo)
347
466
 
467
+ UnsupportedOperationException.struct_class = Types::UnsupportedOperationException
468
+
348
469
  UpdateTrailRequest.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Name"))
349
470
  UpdateTrailRequest.add_member(:s3_bucket_name, Shapes::ShapeRef.new(shape: String, location_name: "S3BucketName"))
350
471
  UpdateTrailRequest.add_member(:s3_key_prefix, Shapes::ShapeRef.new(shape: String, location_name: "S3KeyPrefix"))
@@ -467,6 +588,7 @@ module Aws::CloudTrail
467
588
  o.output = Shapes::ShapeRef.new(shape: DescribeTrailsResponse)
468
589
  o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
469
590
  o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
591
+ o.errors << Shapes::ShapeRef.new(shape: InvalidTrailNameException)
470
592
  end)
471
593
 
472
594
  api.add_operation(:get_event_selectors, Seahorse::Model::Operation.new.tap do |o|
@@ -481,6 +603,19 @@ module Aws::CloudTrail
481
603
  o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
482
604
  end)
483
605
 
606
+ api.add_operation(:get_insight_selectors, Seahorse::Model::Operation.new.tap do |o|
607
+ o.name = "GetInsightSelectors"
608
+ o.http_method = "POST"
609
+ o.http_request_uri = "/"
610
+ o.input = Shapes::ShapeRef.new(shape: GetInsightSelectorsRequest)
611
+ o.output = Shapes::ShapeRef.new(shape: GetInsightSelectorsResponse)
612
+ o.errors << Shapes::ShapeRef.new(shape: TrailNotFoundException)
613
+ o.errors << Shapes::ShapeRef.new(shape: InvalidTrailNameException)
614
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
615
+ o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
616
+ o.errors << Shapes::ShapeRef.new(shape: InsightNotEnabledException)
617
+ end)
618
+
484
619
  api.add_operation(:get_trail, Seahorse::Model::Operation.new.tap do |o|
485
620
  o.name = "GetTrail"
486
621
  o.http_method = "POST"
@@ -501,6 +636,8 @@ module Aws::CloudTrail
501
636
  o.output = Shapes::ShapeRef.new(shape: GetTrailStatusResponse)
502
637
  o.errors << Shapes::ShapeRef.new(shape: TrailNotFoundException)
503
638
  o.errors << Shapes::ShapeRef.new(shape: InvalidTrailNameException)
639
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
640
+ o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
504
641
  end)
505
642
 
506
643
  api.add_operation(:list_public_keys, Seahorse::Model::Operation.new.tap do |o|
@@ -565,6 +702,9 @@ module Aws::CloudTrail
565
702
  o.errors << Shapes::ShapeRef.new(shape: InvalidTimeRangeException)
566
703
  o.errors << Shapes::ShapeRef.new(shape: InvalidMaxResultsException)
567
704
  o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
705
+ o.errors << Shapes::ShapeRef.new(shape: InvalidEventCategoryException)
706
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
707
+ o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
568
708
  o[:pager] = Aws::Pager.new(
569
709
  limit_key: "max_results",
570
710
  tokens: {
@@ -589,6 +729,23 @@ module Aws::CloudTrail
589
729
  o.errors << Shapes::ShapeRef.new(shape: InsufficientDependencyServiceAccessPermissionException)
590
730
  end)
591
731
 
732
+ api.add_operation(:put_insight_selectors, Seahorse::Model::Operation.new.tap do |o|
733
+ o.name = "PutInsightSelectors"
734
+ o.http_method = "POST"
735
+ o.http_request_uri = "/"
736
+ o.input = Shapes::ShapeRef.new(shape: PutInsightSelectorsRequest)
737
+ o.output = Shapes::ShapeRef.new(shape: PutInsightSelectorsResponse)
738
+ o.errors << Shapes::ShapeRef.new(shape: TrailNotFoundException)
739
+ o.errors << Shapes::ShapeRef.new(shape: InvalidTrailNameException)
740
+ o.errors << Shapes::ShapeRef.new(shape: InvalidHomeRegionException)
741
+ o.errors << Shapes::ShapeRef.new(shape: InvalidInsightSelectorsException)
742
+ o.errors << Shapes::ShapeRef.new(shape: InsufficientS3BucketPolicyException)
743
+ o.errors << Shapes::ShapeRef.new(shape: InsufficientEncryptionPolicyException)
744
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
745
+ o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
746
+ o.errors << Shapes::ShapeRef.new(shape: NotOrganizationMasterAccountException)
747
+ end)
748
+
592
749
  api.add_operation(:remove_tags, Seahorse::Model::Operation.new.tap do |o|
593
750
  o.name = "RemoveTags"
594
751
  o.http_method = "POST"
@@ -652,6 +809,7 @@ module Aws::CloudTrail
652
809
  o.errors << Shapes::ShapeRef.new(shape: InvalidKmsKeyIdException)
653
810
  o.errors << Shapes::ShapeRef.new(shape: InvalidTrailNameException)
654
811
  o.errors << Shapes::ShapeRef.new(shape: TrailNotProvidedException)
812
+ o.errors << Shapes::ShapeRef.new(shape: InvalidEventSelectorsException)
655
813
  o.errors << Shapes::ShapeRef.new(shape: InvalidParameterCombinationException)
656
814
  o.errors << Shapes::ShapeRef.new(shape: InvalidHomeRegionException)
657
815
  o.errors << Shapes::ShapeRef.new(shape: KmsKeyNotFoundException)
@@ -6,9 +6,493 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::CloudTrail
9
+
10
+ # When CloudTrail returns an error response, the Ruby SDK constructs and raises an error.
11
+ # These errors all extend Aws::CloudTrail::Errors::ServiceError < {Aws::Errors::ServiceError}
12
+ #
13
+ # You can rescue all CloudTrail errors using ServiceError:
14
+ #
15
+ # begin
16
+ # # do stuff
17
+ # rescue Aws::CloudTrail::Errors::ServiceError
18
+ # # rescues all CloudTrail API errors
19
+ # end
20
+ #
21
+ #
22
+ # ## Request Context
23
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
24
+ # information about the request that generated the error.
25
+ # See {Seahorse::Client::RequestContext} for more information.
26
+ #
27
+ # ## Error Classes
28
+ # * {CloudTrailARNInvalidException}
29
+ # * {CloudTrailAccessNotEnabledException}
30
+ # * {CloudWatchLogsDeliveryUnavailableException}
31
+ # * {InsightNotEnabledException}
32
+ # * {InsufficientDependencyServiceAccessPermissionException}
33
+ # * {InsufficientEncryptionPolicyException}
34
+ # * {InsufficientS3BucketPolicyException}
35
+ # * {InsufficientSnsTopicPolicyException}
36
+ # * {InvalidCloudWatchLogsLogGroupArnException}
37
+ # * {InvalidCloudWatchLogsRoleArnException}
38
+ # * {InvalidEventCategoryException}
39
+ # * {InvalidEventSelectorsException}
40
+ # * {InvalidHomeRegionException}
41
+ # * {InvalidInsightSelectorsException}
42
+ # * {InvalidKmsKeyIdException}
43
+ # * {InvalidLookupAttributesException}
44
+ # * {InvalidMaxResultsException}
45
+ # * {InvalidNextTokenException}
46
+ # * {InvalidParameterCombinationException}
47
+ # * {InvalidS3BucketNameException}
48
+ # * {InvalidS3PrefixException}
49
+ # * {InvalidSnsTopicNameException}
50
+ # * {InvalidTagParameterException}
51
+ # * {InvalidTimeRangeException}
52
+ # * {InvalidTokenException}
53
+ # * {InvalidTrailNameException}
54
+ # * {KmsException}
55
+ # * {KmsKeyDisabledException}
56
+ # * {KmsKeyNotFoundException}
57
+ # * {MaximumNumberOfTrailsExceededException}
58
+ # * {NotOrganizationMasterAccountException}
59
+ # * {OperationNotPermittedException}
60
+ # * {OrganizationNotInAllFeaturesModeException}
61
+ # * {OrganizationsNotInUseException}
62
+ # * {ResourceNotFoundException}
63
+ # * {ResourceTypeNotSupportedException}
64
+ # * {S3BucketDoesNotExistException}
65
+ # * {TagsLimitExceededException}
66
+ # * {TrailAlreadyExistsException}
67
+ # * {TrailNotFoundException}
68
+ # * {TrailNotProvidedException}
69
+ # * {UnsupportedOperationException}
70
+ #
71
+ # Additionally, error classes are dynamically generated for service errors based on the error code
72
+ # if they are not defined above.
9
73
  module Errors
10
74
 
11
75
  extend Aws::Errors::DynamicErrors
12
76
 
77
+ class CloudTrailARNInvalidException < ServiceError
78
+
79
+ # @param [Seahorse::Client::RequestContext] context
80
+ # @param [String] message
81
+ # @param [Aws::CloudTrail::Types::CloudTrailARNInvalidException] data
82
+ def initialize(context, message, data = Aws::EmptyStructure.new)
83
+ super(context, message, data)
84
+ end
85
+ end
86
+
87
+ class CloudTrailAccessNotEnabledException < ServiceError
88
+
89
+ # @param [Seahorse::Client::RequestContext] context
90
+ # @param [String] message
91
+ # @param [Aws::CloudTrail::Types::CloudTrailAccessNotEnabledException] data
92
+ def initialize(context, message, data = Aws::EmptyStructure.new)
93
+ super(context, message, data)
94
+ end
95
+ end
96
+
97
+ class CloudWatchLogsDeliveryUnavailableException < ServiceError
98
+
99
+ # @param [Seahorse::Client::RequestContext] context
100
+ # @param [String] message
101
+ # @param [Aws::CloudTrail::Types::CloudWatchLogsDeliveryUnavailableException] data
102
+ def initialize(context, message, data = Aws::EmptyStructure.new)
103
+ super(context, message, data)
104
+ end
105
+ end
106
+
107
+ class InsightNotEnabledException < ServiceError
108
+
109
+ # @param [Seahorse::Client::RequestContext] context
110
+ # @param [String] message
111
+ # @param [Aws::CloudTrail::Types::InsightNotEnabledException] data
112
+ def initialize(context, message, data = Aws::EmptyStructure.new)
113
+ super(context, message, data)
114
+ end
115
+ end
116
+
117
+ class InsufficientDependencyServiceAccessPermissionException < ServiceError
118
+
119
+ # @param [Seahorse::Client::RequestContext] context
120
+ # @param [String] message
121
+ # @param [Aws::CloudTrail::Types::InsufficientDependencyServiceAccessPermissionException] data
122
+ def initialize(context, message, data = Aws::EmptyStructure.new)
123
+ super(context, message, data)
124
+ end
125
+ end
126
+
127
+ class InsufficientEncryptionPolicyException < ServiceError
128
+
129
+ # @param [Seahorse::Client::RequestContext] context
130
+ # @param [String] message
131
+ # @param [Aws::CloudTrail::Types::InsufficientEncryptionPolicyException] data
132
+ def initialize(context, message, data = Aws::EmptyStructure.new)
133
+ super(context, message, data)
134
+ end
135
+ end
136
+
137
+ class InsufficientS3BucketPolicyException < ServiceError
138
+
139
+ # @param [Seahorse::Client::RequestContext] context
140
+ # @param [String] message
141
+ # @param [Aws::CloudTrail::Types::InsufficientS3BucketPolicyException] data
142
+ def initialize(context, message, data = Aws::EmptyStructure.new)
143
+ super(context, message, data)
144
+ end
145
+ end
146
+
147
+ class InsufficientSnsTopicPolicyException < ServiceError
148
+
149
+ # @param [Seahorse::Client::RequestContext] context
150
+ # @param [String] message
151
+ # @param [Aws::CloudTrail::Types::InsufficientSnsTopicPolicyException] data
152
+ def initialize(context, message, data = Aws::EmptyStructure.new)
153
+ super(context, message, data)
154
+ end
155
+ end
156
+
157
+ class InvalidCloudWatchLogsLogGroupArnException < ServiceError
158
+
159
+ # @param [Seahorse::Client::RequestContext] context
160
+ # @param [String] message
161
+ # @param [Aws::CloudTrail::Types::InvalidCloudWatchLogsLogGroupArnException] data
162
+ def initialize(context, message, data = Aws::EmptyStructure.new)
163
+ super(context, message, data)
164
+ end
165
+ end
166
+
167
+ class InvalidCloudWatchLogsRoleArnException < ServiceError
168
+
169
+ # @param [Seahorse::Client::RequestContext] context
170
+ # @param [String] message
171
+ # @param [Aws::CloudTrail::Types::InvalidCloudWatchLogsRoleArnException] data
172
+ def initialize(context, message, data = Aws::EmptyStructure.new)
173
+ super(context, message, data)
174
+ end
175
+ end
176
+
177
+ class InvalidEventCategoryException < ServiceError
178
+
179
+ # @param [Seahorse::Client::RequestContext] context
180
+ # @param [String] message
181
+ # @param [Aws::CloudTrail::Types::InvalidEventCategoryException] data
182
+ def initialize(context, message, data = Aws::EmptyStructure.new)
183
+ super(context, message, data)
184
+ end
185
+ end
186
+
187
+ class InvalidEventSelectorsException < ServiceError
188
+
189
+ # @param [Seahorse::Client::RequestContext] context
190
+ # @param [String] message
191
+ # @param [Aws::CloudTrail::Types::InvalidEventSelectorsException] data
192
+ def initialize(context, message, data = Aws::EmptyStructure.new)
193
+ super(context, message, data)
194
+ end
195
+ end
196
+
197
+ class InvalidHomeRegionException < ServiceError
198
+
199
+ # @param [Seahorse::Client::RequestContext] context
200
+ # @param [String] message
201
+ # @param [Aws::CloudTrail::Types::InvalidHomeRegionException] data
202
+ def initialize(context, message, data = Aws::EmptyStructure.new)
203
+ super(context, message, data)
204
+ end
205
+ end
206
+
207
+ class InvalidInsightSelectorsException < ServiceError
208
+
209
+ # @param [Seahorse::Client::RequestContext] context
210
+ # @param [String] message
211
+ # @param [Aws::CloudTrail::Types::InvalidInsightSelectorsException] data
212
+ def initialize(context, message, data = Aws::EmptyStructure.new)
213
+ super(context, message, data)
214
+ end
215
+ end
216
+
217
+ class InvalidKmsKeyIdException < ServiceError
218
+
219
+ # @param [Seahorse::Client::RequestContext] context
220
+ # @param [String] message
221
+ # @param [Aws::CloudTrail::Types::InvalidKmsKeyIdException] data
222
+ def initialize(context, message, data = Aws::EmptyStructure.new)
223
+ super(context, message, data)
224
+ end
225
+ end
226
+
227
+ class InvalidLookupAttributesException < ServiceError
228
+
229
+ # @param [Seahorse::Client::RequestContext] context
230
+ # @param [String] message
231
+ # @param [Aws::CloudTrail::Types::InvalidLookupAttributesException] data
232
+ def initialize(context, message, data = Aws::EmptyStructure.new)
233
+ super(context, message, data)
234
+ end
235
+ end
236
+
237
+ class InvalidMaxResultsException < ServiceError
238
+
239
+ # @param [Seahorse::Client::RequestContext] context
240
+ # @param [String] message
241
+ # @param [Aws::CloudTrail::Types::InvalidMaxResultsException] data
242
+ def initialize(context, message, data = Aws::EmptyStructure.new)
243
+ super(context, message, data)
244
+ end
245
+ end
246
+
247
+ class InvalidNextTokenException < ServiceError
248
+
249
+ # @param [Seahorse::Client::RequestContext] context
250
+ # @param [String] message
251
+ # @param [Aws::CloudTrail::Types::InvalidNextTokenException] data
252
+ def initialize(context, message, data = Aws::EmptyStructure.new)
253
+ super(context, message, data)
254
+ end
255
+ end
256
+
257
+ class InvalidParameterCombinationException < ServiceError
258
+
259
+ # @param [Seahorse::Client::RequestContext] context
260
+ # @param [String] message
261
+ # @param [Aws::CloudTrail::Types::InvalidParameterCombinationException] data
262
+ def initialize(context, message, data = Aws::EmptyStructure.new)
263
+ super(context, message, data)
264
+ end
265
+ end
266
+
267
+ class InvalidS3BucketNameException < ServiceError
268
+
269
+ # @param [Seahorse::Client::RequestContext] context
270
+ # @param [String] message
271
+ # @param [Aws::CloudTrail::Types::InvalidS3BucketNameException] data
272
+ def initialize(context, message, data = Aws::EmptyStructure.new)
273
+ super(context, message, data)
274
+ end
275
+ end
276
+
277
+ class InvalidS3PrefixException < ServiceError
278
+
279
+ # @param [Seahorse::Client::RequestContext] context
280
+ # @param [String] message
281
+ # @param [Aws::CloudTrail::Types::InvalidS3PrefixException] data
282
+ def initialize(context, message, data = Aws::EmptyStructure.new)
283
+ super(context, message, data)
284
+ end
285
+ end
286
+
287
+ class InvalidSnsTopicNameException < ServiceError
288
+
289
+ # @param [Seahorse::Client::RequestContext] context
290
+ # @param [String] message
291
+ # @param [Aws::CloudTrail::Types::InvalidSnsTopicNameException] data
292
+ def initialize(context, message, data = Aws::EmptyStructure.new)
293
+ super(context, message, data)
294
+ end
295
+ end
296
+
297
+ class InvalidTagParameterException < ServiceError
298
+
299
+ # @param [Seahorse::Client::RequestContext] context
300
+ # @param [String] message
301
+ # @param [Aws::CloudTrail::Types::InvalidTagParameterException] data
302
+ def initialize(context, message, data = Aws::EmptyStructure.new)
303
+ super(context, message, data)
304
+ end
305
+ end
306
+
307
+ class InvalidTimeRangeException < ServiceError
308
+
309
+ # @param [Seahorse::Client::RequestContext] context
310
+ # @param [String] message
311
+ # @param [Aws::CloudTrail::Types::InvalidTimeRangeException] data
312
+ def initialize(context, message, data = Aws::EmptyStructure.new)
313
+ super(context, message, data)
314
+ end
315
+ end
316
+
317
+ class InvalidTokenException < ServiceError
318
+
319
+ # @param [Seahorse::Client::RequestContext] context
320
+ # @param [String] message
321
+ # @param [Aws::CloudTrail::Types::InvalidTokenException] data
322
+ def initialize(context, message, data = Aws::EmptyStructure.new)
323
+ super(context, message, data)
324
+ end
325
+ end
326
+
327
+ class InvalidTrailNameException < ServiceError
328
+
329
+ # @param [Seahorse::Client::RequestContext] context
330
+ # @param [String] message
331
+ # @param [Aws::CloudTrail::Types::InvalidTrailNameException] data
332
+ def initialize(context, message, data = Aws::EmptyStructure.new)
333
+ super(context, message, data)
334
+ end
335
+ end
336
+
337
+ class KmsException < ServiceError
338
+
339
+ # @param [Seahorse::Client::RequestContext] context
340
+ # @param [String] message
341
+ # @param [Aws::CloudTrail::Types::KmsException] data
342
+ def initialize(context, message, data = Aws::EmptyStructure.new)
343
+ super(context, message, data)
344
+ end
345
+ end
346
+
347
+ class KmsKeyDisabledException < ServiceError
348
+
349
+ # @param [Seahorse::Client::RequestContext] context
350
+ # @param [String] message
351
+ # @param [Aws::CloudTrail::Types::KmsKeyDisabledException] data
352
+ def initialize(context, message, data = Aws::EmptyStructure.new)
353
+ super(context, message, data)
354
+ end
355
+ end
356
+
357
+ class KmsKeyNotFoundException < ServiceError
358
+
359
+ # @param [Seahorse::Client::RequestContext] context
360
+ # @param [String] message
361
+ # @param [Aws::CloudTrail::Types::KmsKeyNotFoundException] data
362
+ def initialize(context, message, data = Aws::EmptyStructure.new)
363
+ super(context, message, data)
364
+ end
365
+ end
366
+
367
+ class MaximumNumberOfTrailsExceededException < ServiceError
368
+
369
+ # @param [Seahorse::Client::RequestContext] context
370
+ # @param [String] message
371
+ # @param [Aws::CloudTrail::Types::MaximumNumberOfTrailsExceededException] data
372
+ def initialize(context, message, data = Aws::EmptyStructure.new)
373
+ super(context, message, data)
374
+ end
375
+ end
376
+
377
+ class NotOrganizationMasterAccountException < ServiceError
378
+
379
+ # @param [Seahorse::Client::RequestContext] context
380
+ # @param [String] message
381
+ # @param [Aws::CloudTrail::Types::NotOrganizationMasterAccountException] data
382
+ def initialize(context, message, data = Aws::EmptyStructure.new)
383
+ super(context, message, data)
384
+ end
385
+ end
386
+
387
+ class OperationNotPermittedException < ServiceError
388
+
389
+ # @param [Seahorse::Client::RequestContext] context
390
+ # @param [String] message
391
+ # @param [Aws::CloudTrail::Types::OperationNotPermittedException] data
392
+ def initialize(context, message, data = Aws::EmptyStructure.new)
393
+ super(context, message, data)
394
+ end
395
+ end
396
+
397
+ class OrganizationNotInAllFeaturesModeException < ServiceError
398
+
399
+ # @param [Seahorse::Client::RequestContext] context
400
+ # @param [String] message
401
+ # @param [Aws::CloudTrail::Types::OrganizationNotInAllFeaturesModeException] data
402
+ def initialize(context, message, data = Aws::EmptyStructure.new)
403
+ super(context, message, data)
404
+ end
405
+ end
406
+
407
+ class OrganizationsNotInUseException < ServiceError
408
+
409
+ # @param [Seahorse::Client::RequestContext] context
410
+ # @param [String] message
411
+ # @param [Aws::CloudTrail::Types::OrganizationsNotInUseException] data
412
+ def initialize(context, message, data = Aws::EmptyStructure.new)
413
+ super(context, message, data)
414
+ end
415
+ end
416
+
417
+ class ResourceNotFoundException < ServiceError
418
+
419
+ # @param [Seahorse::Client::RequestContext] context
420
+ # @param [String] message
421
+ # @param [Aws::CloudTrail::Types::ResourceNotFoundException] data
422
+ def initialize(context, message, data = Aws::EmptyStructure.new)
423
+ super(context, message, data)
424
+ end
425
+ end
426
+
427
+ class ResourceTypeNotSupportedException < ServiceError
428
+
429
+ # @param [Seahorse::Client::RequestContext] context
430
+ # @param [String] message
431
+ # @param [Aws::CloudTrail::Types::ResourceTypeNotSupportedException] data
432
+ def initialize(context, message, data = Aws::EmptyStructure.new)
433
+ super(context, message, data)
434
+ end
435
+ end
436
+
437
+ class S3BucketDoesNotExistException < ServiceError
438
+
439
+ # @param [Seahorse::Client::RequestContext] context
440
+ # @param [String] message
441
+ # @param [Aws::CloudTrail::Types::S3BucketDoesNotExistException] data
442
+ def initialize(context, message, data = Aws::EmptyStructure.new)
443
+ super(context, message, data)
444
+ end
445
+ end
446
+
447
+ class TagsLimitExceededException < ServiceError
448
+
449
+ # @param [Seahorse::Client::RequestContext] context
450
+ # @param [String] message
451
+ # @param [Aws::CloudTrail::Types::TagsLimitExceededException] data
452
+ def initialize(context, message, data = Aws::EmptyStructure.new)
453
+ super(context, message, data)
454
+ end
455
+ end
456
+
457
+ class TrailAlreadyExistsException < ServiceError
458
+
459
+ # @param [Seahorse::Client::RequestContext] context
460
+ # @param [String] message
461
+ # @param [Aws::CloudTrail::Types::TrailAlreadyExistsException] data
462
+ def initialize(context, message, data = Aws::EmptyStructure.new)
463
+ super(context, message, data)
464
+ end
465
+ end
466
+
467
+ class TrailNotFoundException < ServiceError
468
+
469
+ # @param [Seahorse::Client::RequestContext] context
470
+ # @param [String] message
471
+ # @param [Aws::CloudTrail::Types::TrailNotFoundException] data
472
+ def initialize(context, message, data = Aws::EmptyStructure.new)
473
+ super(context, message, data)
474
+ end
475
+ end
476
+
477
+ class TrailNotProvidedException < ServiceError
478
+
479
+ # @param [Seahorse::Client::RequestContext] context
480
+ # @param [String] message
481
+ # @param [Aws::CloudTrail::Types::TrailNotProvidedException] data
482
+ def initialize(context, message, data = Aws::EmptyStructure.new)
483
+ super(context, message, data)
484
+ end
485
+ end
486
+
487
+ class UnsupportedOperationException < ServiceError
488
+
489
+ # @param [Seahorse::Client::RequestContext] context
490
+ # @param [String] message
491
+ # @param [Aws::CloudTrail::Types::UnsupportedOperationException] data
492
+ def initialize(context, message, data = Aws::EmptyStructure.new)
493
+ super(context, message, data)
494
+ end
495
+ end
496
+
13
497
  end
14
498
  end