aws-sdk-cloudtrail 1.18.0 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d8f92efb7bb2ae7f28a9b46e951f2058480481cb
4
- data.tar.gz: e1dc43b670ac7c9e30429766a1608342f3323c30
2
+ SHA256:
3
+ metadata.gz: ed66ace83c55dc06732064964704ef247d5226550f5e29cf061d57170a52a60d
4
+ data.tar.gz: df4ae0ea6aca1d619339f07ec240c418cf4d29fc73f7a9c85dc6d3d8fa9a6d89
5
5
  SHA512:
6
- metadata.gz: 5e8c30dc48a779c151cecfc63d5d4a52f9817789daac3297bfe22c67371a5e510547566acc396c590f1922e2cfbf0867b5ab91b74a383a994d4160a6930601ae
7
- data.tar.gz: f967c1a7286796d54dbb2c69f15ce1889b5aeab97ebbae4faba828510126b656a052492d65e90bc0fd63763e113465974b8e5d912dd67f2f827f70db7b690438
6
+ metadata.gz: 63d079e2bac73448b82a8766c73c3448c9667c0a68cdd6bb7a00f6b6fc8b452ef15ef4f9639463ce2ea6de69b9e43ea898d45401d94d4052484d771e4146705c
7
+ data.tar.gz: 955e00e99d366cb9046610daa92f47d9f8a313f5a03693723ef3994db00de3d268e3d6bf64b74081cbd8c8699301d2704bf1f99faa6d1a417135f9d801aab97a
@@ -24,17 +24,20 @@ require_relative 'aws-sdk-cloudtrail/customizations'
24
24
  # methods each accept a hash of request parameters and return a response
25
25
  # structure.
26
26
  #
27
+ # cloud_trail = Aws::CloudTrail::Client.new
28
+ # resp = cloud_trail.add_tags(params)
29
+ #
27
30
  # See {Client} for more information.
28
31
  #
29
32
  # # Errors
30
33
  #
31
- # Errors returned from AWS CloudTrail all
32
- # extend {Errors::ServiceError}.
34
+ # Errors returned from AWS CloudTrail are defined in the
35
+ # {Errors} module and all extend {Errors::ServiceError}.
33
36
  #
34
37
  # begin
35
38
  # # do stuff
36
39
  # rescue Aws::CloudTrail::Errors::ServiceError
37
- # # rescues all service API errors
40
+ # # rescues all AWS CloudTrail API errors
38
41
  # end
39
42
  #
40
43
  # See {Errors} for more information.
@@ -42,6 +45,6 @@ require_relative 'aws-sdk-cloudtrail/customizations'
42
45
  # @service
43
46
  module Aws::CloudTrail
44
47
 
45
- GEM_VERSION = '1.18.0'
48
+ GEM_VERSION = '1.23.0'
46
49
 
47
50
  end
@@ -30,6 +30,18 @@ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
30
30
  Aws::Plugins::GlobalConfiguration.add_identifier(:cloudtrail)
31
31
 
32
32
  module Aws::CloudTrail
33
+ # An API client for CloudTrail. To construct a client, you need to configure a `:region` and `:credentials`.
34
+ #
35
+ # client = Aws::CloudTrail::Client.new(
36
+ # region: region_name,
37
+ # credentials: credentials,
38
+ # # ...
39
+ # )
40
+ #
41
+ # For details on configuring region and credentials see
42
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
43
+ #
44
+ # See {#initialize} for a full list of supported configuration options.
33
45
  class Client < Seahorse::Client::Base
34
46
 
35
47
  include Aws::ClientStubs
@@ -93,7 +105,7 @@ module Aws::CloudTrail
93
105
  # @option options [required, String] :region
94
106
  # The AWS region to connect to. The configured `:region` is
95
107
  # used to determine the service `:endpoint`. When not passed,
96
- # a default `:region` is search for in the following locations:
108
+ # a default `:region` is searched for in the following locations:
97
109
  #
98
110
  # * `Aws.config[:region]`
99
111
  # * `ENV['AWS_REGION']`
@@ -108,6 +120,12 @@ module Aws::CloudTrail
108
120
  # When set to `true`, a thread polling for endpoints will be running in
109
121
  # the background every 60 secs (default). Defaults to `false`.
110
122
  #
123
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
124
+ # Used only in `adaptive` retry mode. When true, the request will sleep
125
+ # until there is sufficent client side capacity to retry the request.
126
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
127
+ # not retry instead of sleeping.
128
+ #
111
129
  # @option options [Boolean] :client_side_monitoring (false)
112
130
  # When `true`, client-side metrics will be collected for all API requests from
113
131
  # this client.
@@ -132,6 +150,10 @@ module Aws::CloudTrail
132
150
  # When `true`, an attempt is made to coerce request parameters into
133
151
  # the required types.
134
152
  #
153
+ # @option options [Boolean] :correct_clock_skew (true)
154
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
155
+ # a clock skew correction and retry requests with skewed client clocks.
156
+ #
135
157
  # @option options [Boolean] :disable_host_prefix_injection (false)
136
158
  # Set to true to disable SDK automatically adding host prefix
137
159
  # to default service endpoint when available.
@@ -139,7 +161,7 @@ module Aws::CloudTrail
139
161
  # @option options [String] :endpoint
140
162
  # The client endpoint is normally constructed from the `:region`
141
163
  # option. You should only configure an `:endpoint` when connecting
142
- # to test endpoints. This should be avalid HTTP(S) URI.
164
+ # to test endpoints. This should be a valid HTTP(S) URI.
143
165
  #
144
166
  # @option options [Integer] :endpoint_cache_max_entries (1000)
145
167
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -154,7 +176,7 @@ module Aws::CloudTrail
154
176
  # requests fetching endpoints information. Defaults to 60 sec.
155
177
  #
156
178
  # @option options [Boolean] :endpoint_discovery (false)
157
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
179
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
158
180
  #
159
181
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
160
182
  # The log formatter.
@@ -166,15 +188,29 @@ module Aws::CloudTrail
166
188
  # The Logger instance to send log messages to. If this option
167
189
  # is not set, logging will be disabled.
168
190
  #
191
+ # @option options [Integer] :max_attempts (3)
192
+ # An integer representing the maximum number attempts that will be made for
193
+ # a single request, including the initial attempt. For example,
194
+ # setting this value to 5 will result in a request being retried up to
195
+ # 4 times. Used in `standard` and `adaptive` retry modes.
196
+ #
169
197
  # @option options [String] :profile ("default")
170
198
  # Used when loading credentials from the shared credentials file
171
199
  # at HOME/.aws/credentials. When not specified, 'default' is used.
172
200
  #
201
+ # @option options [Proc] :retry_backoff
202
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
203
+ # This option is only used in the `legacy` retry mode.
204
+ #
173
205
  # @option options [Float] :retry_base_delay (0.3)
174
- # The base delay in seconds used by the default backoff function.
206
+ # The base delay in seconds used by the default backoff function. This option
207
+ # is only used in the `legacy` retry mode.
175
208
  #
176
209
  # @option options [Symbol] :retry_jitter (:none)
177
- # A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
210
+ # A delay randomiser function used by the default backoff function.
211
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
212
+ # otherwise a Proc that takes and returns a number. This option is only used
213
+ # in the `legacy` retry mode.
178
214
  #
179
215
  # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
180
216
  #
@@ -182,11 +218,30 @@ module Aws::CloudTrail
182
218
  # The maximum number of times to retry failed requests. Only
183
219
  # ~ 500 level server errors and certain ~ 400 level client errors
184
220
  # are retried. Generally, these are throttling errors, data
185
- # checksum errors, networking errors, timeout errors and auth
186
- # errors from expired credentials.
221
+ # checksum errors, networking errors, timeout errors, auth errors,
222
+ # endpoint discovery, and errors from expired credentials.
223
+ # This option is only used in the `legacy` retry mode.
187
224
  #
188
225
  # @option options [Integer] :retry_max_delay (0)
189
- # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
226
+ # The maximum number of seconds to delay between retries (0 for no limit)
227
+ # used by the default backoff function. This option is only used in the
228
+ # `legacy` retry mode.
229
+ #
230
+ # @option options [String] :retry_mode ("legacy")
231
+ # Specifies which retry algorithm to use. Values are:
232
+ #
233
+ # * `legacy` - The pre-existing retry behavior. This is default value if
234
+ # no retry mode is provided.
235
+ #
236
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
237
+ # This includes support for retry quotas, which limit the number of
238
+ # unsuccessful retries a client can make.
239
+ #
240
+ # * `adaptive` - An experimental retry mode that includes all the
241
+ # functionality of `standard` mode along with automatic client side
242
+ # throttling. This is a provisional mode that may change behavior
243
+ # in the future.
244
+ #
190
245
  #
191
246
  # @option options [String] :secret_access_key
192
247
  #
@@ -219,16 +274,15 @@ module Aws::CloudTrail
219
274
  # requests through. Formatted like 'http://proxy.com:123'.
220
275
  #
221
276
  # @option options [Float] :http_open_timeout (15) The number of
222
- # seconds to wait when opening a HTTP session before rasing a
277
+ # seconds to wait when opening a HTTP session before raising a
223
278
  # `Timeout::Error`.
224
279
  #
225
280
  # @option options [Integer] :http_read_timeout (60) The default
226
281
  # number of seconds to wait for response data. This value can
227
- # safely be set
228
- # per-request on the session yeidled by {#session_for}.
282
+ # safely be set per-request on the session.
229
283
  #
230
284
  # @option options [Float] :http_idle_timeout (5) The number of
231
- # seconds a connection is allowed to sit idble before it is
285
+ # seconds a connection is allowed to sit idle before it is
232
286
  # considered stale. Stale connections are closed and removed
233
287
  # from the pool before making a request.
234
288
  #
@@ -237,7 +291,7 @@ module Aws::CloudTrail
237
291
  # request body. This option has no effect unless the request has
238
292
  # "Expect" header set to "100-continue". Defaults to `nil` which
239
293
  # disables this behaviour. This value can safely be set per
240
- # request on the session yeidled by {#session_for}.
294
+ # request on the session.
241
295
  #
242
296
  # @option options [Boolean] :http_wire_trace (false) When `true`,
243
297
  # HTTP debug output will be sent to the `:logger`.
@@ -264,12 +318,14 @@ module Aws::CloudTrail
264
318
 
265
319
  # @!group API Operations
266
320
 
267
- # Adds one or more tags to a trail, up to a limit of 50. Tags must be
268
- # unique per trail. Overwrites an existing tag's value when a new value
269
- # is specified for an existing tag key. If you specify a key without a
270
- # value, the tag will be created with the specified key and a value of
271
- # null. You can tag a trail that applies to all regions only from the
272
- # region in which the trail was created (that is, from its home region).
321
+ # Adds one or more tags to a trail, up to a limit of 50. Overwrites an
322
+ # existing tag's value when a new value is specified for an existing
323
+ # tag key. Tag key names must be unique for a trail; you cannot have two
324
+ # keys with the same name but different values. If you specify a key
325
+ # without a value, the tag will be created with the specified key and a
326
+ # value of null. You can tag a trail that applies to all AWS Regions
327
+ # only from the Region in which the trail was created (also known as its
328
+ # home region).
273
329
  #
274
330
  # @option params [required, String] :resource_id
275
331
  # Specifies the ARN of the trail to which one or more tags will be
@@ -304,8 +360,7 @@ module Aws::CloudTrail
304
360
  end
305
361
 
306
362
  # Creates a trail that specifies the settings for delivery of log data
307
- # to an Amazon S3 bucket. A maximum of five trails can exist in a
308
- # region, irrespective of the region in which they were created.
363
+ # to an Amazon S3 bucket.
309
364
  #
310
365
  # @option params [required, String] :name
311
366
  # Specifies the name of the trail. The name must meet the following
@@ -329,7 +384,7 @@ module Aws::CloudTrail
329
384
  #
330
385
  #
331
386
  #
332
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
387
+ # [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
333
388
  #
334
389
  # @option params [String] :s3_key_prefix
335
390
  # Specifies the Amazon S3 key prefix that comes after the name of the
@@ -339,7 +394,7 @@ module Aws::CloudTrail
339
394
  #
340
395
  #
341
396
  #
342
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
397
+ # [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
343
398
  #
344
399
  # @option params [String] :sns_topic_name
345
400
  # Specifies the name of the Amazon SNS topic defined for notification of
@@ -351,7 +406,9 @@ module Aws::CloudTrail
351
406
  #
352
407
  # @option params [Boolean] :is_multi_region_trail
353
408
  # Specifies whether the trail is created in the current region or in all
354
- # regions. The default is false.
409
+ # regions. The default is false, which creates a trail only in the
410
+ # region where you are signed in. As a best practice, consider creating
411
+ # trails that log events in all regions.
355
412
  #
356
413
  # @option params [Boolean] :enable_log_file_validation
357
414
  # Specifies whether log file integrity validation is enabled. The
@@ -402,6 +459,9 @@ module Aws::CloudTrail
402
459
  # made on behalf of an AWS account that is the master account for an
403
460
  # organization in AWS Organizations.
404
461
  #
462
+ # @option params [Array<Types::Tag>] :tags_list
463
+ # A list of tags.
464
+ #
405
465
  # @return [Types::CreateTrailResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
406
466
  #
407
467
  # * {Types::CreateTrailResponse#name #name} => String
@@ -432,6 +492,12 @@ module Aws::CloudTrail
432
492
  # cloud_watch_logs_role_arn: "String",
433
493
  # kms_key_id: "String",
434
494
  # is_organization_trail: false,
495
+ # tags_list: [
496
+ # {
497
+ # key: "String", # required
498
+ # value: "String",
499
+ # },
500
+ # ],
435
501
  # })
436
502
  #
437
503
  # @example Response structure
@@ -486,8 +552,8 @@ module Aws::CloudTrail
486
552
  req.send_request(options)
487
553
  end
488
554
 
489
- # Retrieves settings for the trail associated with the current region
490
- # for your account.
555
+ # Retrieves settings for one or more trails associated with the current
556
+ # region for your account.
491
557
  #
492
558
  # @option params [Array<String>] :trail_name_list
493
559
  # Specifies a list of trail names, trail ARNs, or both, of the trails to
@@ -548,6 +614,7 @@ module Aws::CloudTrail
548
614
  # resp.trail_list[0].cloud_watch_logs_role_arn #=> String
549
615
  # resp.trail_list[0].kms_key_id #=> String
550
616
  # resp.trail_list[0].has_custom_event_selectors #=> Boolean
617
+ # resp.trail_list[0].has_insight_selectors #=> Boolean
551
618
  # resp.trail_list[0].is_organization_trail #=> Boolean
552
619
  #
553
620
  # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails AWS API Documentation
@@ -577,7 +644,7 @@ module Aws::CloudTrail
577
644
  #
578
645
  #
579
646
  #
580
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html
647
+ # [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html
581
648
  #
582
649
  # @option params [required, String] :trail_name
583
650
  # Specifies the name of the trail or trail ARN. If you specify a trail
@@ -620,6 +687,8 @@ module Aws::CloudTrail
620
687
  # resp.event_selectors[0].data_resources[0].type #=> String
621
688
  # resp.event_selectors[0].data_resources[0].values #=> Array
622
689
  # resp.event_selectors[0].data_resources[0].values[0] #=> String
690
+ # resp.event_selectors[0].exclude_management_event_sources #=> Array
691
+ # resp.event_selectors[0].exclude_management_event_sources[0] #=> String
623
692
  #
624
693
  # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors AWS API Documentation
625
694
  #
@@ -630,6 +699,110 @@ module Aws::CloudTrail
630
699
  req.send_request(options)
631
700
  end
632
701
 
702
+ # Describes the settings for the Insights event selectors that you
703
+ # configured for your trail. `GetInsightSelectors` shows if CloudTrail
704
+ # Insights event logging is enabled on the trail, and if it is, which
705
+ # insight types are enabled. If you run `GetInsightSelectors` on a trail
706
+ # that does not have Insights events enabled, the operation throws the
707
+ # exception `InsightNotEnabledException`
708
+ #
709
+ # For more information, see [Logging CloudTrail Insights Events for
710
+ # Trails ][1] in the *AWS CloudTrail User Guide*.
711
+ #
712
+ #
713
+ #
714
+ # [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html
715
+ #
716
+ # @option params [required, String] :trail_name
717
+ # Specifies the name of the trail or trail ARN. If you specify a trail
718
+ # name, the string must meet the following requirements:
719
+ #
720
+ # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
721
+ # underscores (\_), or dashes (-)
722
+ #
723
+ # * Start with a letter or number, and end with a letter or number
724
+ #
725
+ # * Be between 3 and 128 characters
726
+ #
727
+ # * Have no adjacent periods, underscores or dashes. Names like
728
+ # `my-_namespace` and `my--namespace` are not valid.
729
+ #
730
+ # * Not be in IP address format (for example, 192.168.5.4)
731
+ #
732
+ # If you specify a trail ARN, it must be in the format:
733
+ #
734
+ # `arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail`
735
+ #
736
+ # @return [Types::GetInsightSelectorsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
737
+ #
738
+ # * {Types::GetInsightSelectorsResponse#trail_arn #trail_arn} => String
739
+ # * {Types::GetInsightSelectorsResponse#insight_selectors #insight_selectors} => Array&lt;Types::InsightSelector&gt;
740
+ #
741
+ # @example Request syntax with placeholder values
742
+ #
743
+ # resp = client.get_insight_selectors({
744
+ # trail_name: "String", # required
745
+ # })
746
+ #
747
+ # @example Response structure
748
+ #
749
+ # resp.trail_arn #=> String
750
+ # resp.insight_selectors #=> Array
751
+ # resp.insight_selectors[0].insight_type #=> String, one of "ApiCallRateInsight"
752
+ #
753
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors AWS API Documentation
754
+ #
755
+ # @overload get_insight_selectors(params = {})
756
+ # @param [Hash] params ({})
757
+ def get_insight_selectors(params = {}, options = {})
758
+ req = build_request(:get_insight_selectors, params)
759
+ req.send_request(options)
760
+ end
761
+
762
+ # Returns settings information for a specified trail.
763
+ #
764
+ # @option params [required, String] :name
765
+ # The name or the Amazon Resource Name (ARN) of the trail for which you
766
+ # want to retrieve settings information.
767
+ #
768
+ # @return [Types::GetTrailResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
769
+ #
770
+ # * {Types::GetTrailResponse#trail #trail} => Types::Trail
771
+ #
772
+ # @example Request syntax with placeholder values
773
+ #
774
+ # resp = client.get_trail({
775
+ # name: "String", # required
776
+ # })
777
+ #
778
+ # @example Response structure
779
+ #
780
+ # resp.trail.name #=> String
781
+ # resp.trail.s3_bucket_name #=> String
782
+ # resp.trail.s3_key_prefix #=> String
783
+ # resp.trail.sns_topic_name #=> String
784
+ # resp.trail.sns_topic_arn #=> String
785
+ # resp.trail.include_global_service_events #=> Boolean
786
+ # resp.trail.is_multi_region_trail #=> Boolean
787
+ # resp.trail.home_region #=> String
788
+ # resp.trail.trail_arn #=> String
789
+ # resp.trail.log_file_validation_enabled #=> Boolean
790
+ # resp.trail.cloud_watch_logs_log_group_arn #=> String
791
+ # resp.trail.cloud_watch_logs_role_arn #=> String
792
+ # resp.trail.kms_key_id #=> String
793
+ # resp.trail.has_custom_event_selectors #=> Boolean
794
+ # resp.trail.has_insight_selectors #=> Boolean
795
+ # resp.trail.is_organization_trail #=> Boolean
796
+ #
797
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail AWS API Documentation
798
+ #
799
+ # @overload get_trail(params = {})
800
+ # @param [Hash] params ({})
801
+ def get_trail(params = {}, options = {})
802
+ req = build_request(:get_trail, params)
803
+ req.send_request(options)
804
+ end
805
+
633
806
  # Returns a JSON-formatted list of information about the specified
634
807
  # trail. Fields include information on delivery errors, Amazon SNS and
635
808
  # Amazon S3 errors, and start and stop logging times for each trail.
@@ -730,6 +903,8 @@ module Aws::CloudTrail
730
903
  # * {Types::ListPublicKeysResponse#public_key_list #public_key_list} => Array&lt;Types::PublicKey&gt;
731
904
  # * {Types::ListPublicKeysResponse#next_token #next_token} => String
732
905
  #
906
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
907
+ #
733
908
  # @example Request syntax with placeholder values
734
909
  #
735
910
  # resp = client.list_public_keys({
@@ -772,6 +947,8 @@ module Aws::CloudTrail
772
947
  # * {Types::ListTagsResponse#resource_tag_list #resource_tag_list} => Array&lt;Types::ResourceTag&gt;
773
948
  # * {Types::ListTagsResponse#next_token #next_token} => String
774
949
  #
950
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
951
+ #
775
952
  # @example Request syntax with placeholder values
776
953
  #
777
954
  # resp = client.list_tags({
@@ -797,9 +974,49 @@ module Aws::CloudTrail
797
974
  req.send_request(options)
798
975
  end
799
976
 
800
- # Looks up [management events][1] captured by CloudTrail. Events for a
801
- # region can be looked up in that region during the last 90 days. Lookup
802
- # supports the following attributes:
977
+ # Lists trails that are in the current account.
978
+ #
979
+ # @option params [String] :next_token
980
+ # The token to use to get the next page of results after a previous API
981
+ # call. This token must be passed in with the same parameters that were
982
+ # specified in the the original call. For example, if the original call
983
+ # specified an AttributeKey of 'Username' with a value of 'root',
984
+ # the call with NextToken should include those same parameters.
985
+ #
986
+ # @return [Types::ListTrailsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
987
+ #
988
+ # * {Types::ListTrailsResponse#trails #trails} => Array&lt;Types::TrailInfo&gt;
989
+ # * {Types::ListTrailsResponse#next_token #next_token} => String
990
+ #
991
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
992
+ #
993
+ # @example Request syntax with placeholder values
994
+ #
995
+ # resp = client.list_trails({
996
+ # next_token: "String",
997
+ # })
998
+ #
999
+ # @example Response structure
1000
+ #
1001
+ # resp.trails #=> Array
1002
+ # resp.trails[0].trail_arn #=> String
1003
+ # resp.trails[0].name #=> String
1004
+ # resp.trails[0].home_region #=> String
1005
+ # resp.next_token #=> String
1006
+ #
1007
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails AWS API Documentation
1008
+ #
1009
+ # @overload list_trails(params = {})
1010
+ # @param [Hash] params ({})
1011
+ def list_trails(params = {}, options = {})
1012
+ req = build_request(:list_trails, params)
1013
+ req.send_request(options)
1014
+ end
1015
+
1016
+ # Looks up [management events][1] or [CloudTrail Insights events][2]
1017
+ # that are captured by CloudTrail. You can look up events that occurred
1018
+ # in a region within the last 90 days. Lookup supports the following
1019
+ # attributes for management events:
803
1020
  #
804
1021
  # * AWS access key
805
1022
  #
@@ -817,20 +1034,25 @@ module Aws::CloudTrail
817
1034
  #
818
1035
  # * User name
819
1036
  #
1037
+ # Lookup supports the following attributes for Insights events:
1038
+ #
1039
+ # * Event ID
1040
+ #
1041
+ # * Event name
1042
+ #
1043
+ # * Event source
1044
+ #
820
1045
  # All attributes are optional. The default number of results returned is
821
1046
  # 50, with a maximum of 50 possible. The response includes a token that
822
1047
  # you can use to get the next page of results.
823
1048
  #
824
- # The rate of lookup requests is limited to one per second per account.
1049
+ # The rate of lookup requests is limited to two per second per account.
825
1050
  # If this limit is exceeded, a throttling error occurs.
826
1051
  #
827
- # Events that occurred during the selected time range will not be
828
- # available for lookup if CloudTrail logging was not enabled when the
829
- # events occurred.
830
- #
831
1052
  #
832
1053
  #
833
1054
  # [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events
1055
+ # [2]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events
834
1056
  #
835
1057
  # @option params [Array<Types::LookupAttribute>] :lookup_attributes
836
1058
  # Contains a list of lookup attributes. Currently the list can contain
@@ -846,6 +1068,12 @@ module Aws::CloudTrail
846
1068
  # are returned. If the specified end time is before the specified start
847
1069
  # time, an error is returned.
848
1070
  #
1071
+ # @option params [String] :event_category
1072
+ # Specifies the event category. If you do not specify an event category,
1073
+ # events of the category are not returned in the response. For example,
1074
+ # if you do not specify `insight` as the value of `EventCategory`, no
1075
+ # Insights events are returned.
1076
+ #
849
1077
  # @option params [Integer] :max_results
850
1078
  # The number of events to return. Possible values are 1 through 50. The
851
1079
  # default is 50.
@@ -862,6 +1090,8 @@ module Aws::CloudTrail
862
1090
  # * {Types::LookupEventsResponse#events #events} => Array&lt;Types::Event&gt;
863
1091
  # * {Types::LookupEventsResponse#next_token #next_token} => String
864
1092
  #
1093
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1094
+ #
865
1095
  # @example Request syntax with placeholder values
866
1096
  #
867
1097
  # resp = client.lookup_events({
@@ -873,6 +1103,7 @@ module Aws::CloudTrail
873
1103
  # ],
874
1104
  # start_time: Time.now,
875
1105
  # end_time: Time.now,
1106
+ # event_category: "insight", # accepts insight
876
1107
  # max_results: 1,
877
1108
  # next_token: "NextToken",
878
1109
  # })
@@ -940,7 +1171,7 @@ module Aws::CloudTrail
940
1171
  #
941
1172
  #
942
1173
  #
943
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html
1174
+ # [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html
944
1175
  # [2]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html
945
1176
  #
946
1177
  # @option params [required, String] :trail_name
@@ -986,6 +1217,7 @@ module Aws::CloudTrail
986
1217
  # values: ["String"],
987
1218
  # },
988
1219
  # ],
1220
+ # exclude_management_event_sources: ["String"],
989
1221
  # },
990
1222
  # ],
991
1223
  # })
@@ -1000,6 +1232,8 @@ module Aws::CloudTrail
1000
1232
  # resp.event_selectors[0].data_resources[0].type #=> String
1001
1233
  # resp.event_selectors[0].data_resources[0].values #=> Array
1002
1234
  # resp.event_selectors[0].data_resources[0].values[0] #=> String
1235
+ # resp.event_selectors[0].exclude_management_event_sources #=> Array
1236
+ # resp.event_selectors[0].exclude_management_event_sources[0] #=> String
1003
1237
  #
1004
1238
  # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors AWS API Documentation
1005
1239
  #
@@ -1010,6 +1244,52 @@ module Aws::CloudTrail
1010
1244
  req.send_request(options)
1011
1245
  end
1012
1246
 
1247
+ # Lets you enable Insights event logging by specifying the Insights
1248
+ # selectors that you want to enable on an existing trail. You also use
1249
+ # `PutInsightSelectors` to turn off Insights event logging, by passing
1250
+ # an empty list of insight types. In this release, only
1251
+ # `ApiCallRateInsight` is supported as an Insights selector.
1252
+ #
1253
+ # @option params [required, String] :trail_name
1254
+ # The name of the CloudTrail trail for which you want to change or add
1255
+ # Insights selectors.
1256
+ #
1257
+ # @option params [required, Array<Types::InsightSelector>] :insight_selectors
1258
+ # A JSON string that contains the insight types you want to log on a
1259
+ # trail. In this release, only `ApiCallRateInsight` is supported as an
1260
+ # insight type.
1261
+ #
1262
+ # @return [Types::PutInsightSelectorsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1263
+ #
1264
+ # * {Types::PutInsightSelectorsResponse#trail_arn #trail_arn} => String
1265
+ # * {Types::PutInsightSelectorsResponse#insight_selectors #insight_selectors} => Array&lt;Types::InsightSelector&gt;
1266
+ #
1267
+ # @example Request syntax with placeholder values
1268
+ #
1269
+ # resp = client.put_insight_selectors({
1270
+ # trail_name: "String", # required
1271
+ # insight_selectors: [ # required
1272
+ # {
1273
+ # insight_type: "ApiCallRateInsight", # accepts ApiCallRateInsight
1274
+ # },
1275
+ # ],
1276
+ # })
1277
+ #
1278
+ # @example Response structure
1279
+ #
1280
+ # resp.trail_arn #=> String
1281
+ # resp.insight_selectors #=> Array
1282
+ # resp.insight_selectors[0].insight_type #=> String, one of "ApiCallRateInsight"
1283
+ #
1284
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors AWS API Documentation
1285
+ #
1286
+ # @overload put_insight_selectors(params = {})
1287
+ # @param [Hash] params ({})
1288
+ def put_insight_selectors(params = {}, options = {})
1289
+ req = build_request(:put_insight_selectors, params)
1290
+ req.send_request(options)
1291
+ end
1292
+
1013
1293
  # Removes the specified tags from a trail.
1014
1294
  #
1015
1295
  # @option params [required, String] :resource_id
@@ -1140,7 +1420,7 @@ module Aws::CloudTrail
1140
1420
  #
1141
1421
  #
1142
1422
  #
1143
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
1423
+ # [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
1144
1424
  #
1145
1425
  # @option params [String] :s3_key_prefix
1146
1426
  # Specifies the Amazon S3 key prefix that comes after the name of the
@@ -1150,7 +1430,7 @@ module Aws::CloudTrail
1150
1430
  #
1151
1431
  #
1152
1432
  #
1153
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
1433
+ # [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
1154
1434
  #
1155
1435
  # @option params [String] :sns_topic_name
1156
1436
  # Specifies the name of the Amazon SNS topic defined for notification of
@@ -1167,7 +1447,8 @@ module Aws::CloudTrail
1167
1447
  # (replications of the trail) will be created in the other regions. If
1168
1448
  # the trail exists in all regions and this value is set to false, the
1169
1449
  # trail will remain in the region where it was created, and its shadow
1170
- # trails in other regions will be deleted.
1450
+ # trails in other regions will be deleted. As a best practice, consider
1451
+ # using trails that log events in all regions.
1171
1452
  #
1172
1453
  # @option params [Boolean] :enable_log_file_validation
1173
1454
  # Specifies whether log file validation is enabled. The default is
@@ -1293,7 +1574,7 @@ module Aws::CloudTrail
1293
1574
  params: params,
1294
1575
  config: config)
1295
1576
  context[:gem_name] = 'aws-sdk-cloudtrail'
1296
- context[:gem_version] = '1.18.0'
1577
+ context[:gem_version] = '1.23.0'
1297
1578
  Seahorse::Client::Request.new(handlers, context)
1298
1579
  end
1299
1580