aws-sdk-cloudtrail 1.19.0 → 1.24.1

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: 6895c447d0feae813da5dc055dac76e59f266a08
4
- data.tar.gz: 31ecefd18da65a7489e73aab3ad2af32af118846
2
+ SHA256:
3
+ metadata.gz: 33c1b0bded8a999f5ae7ca8a87458795777814b90b36e0cebd2b91b2966ed494
4
+ data.tar.gz: e659679fb0212a0bd718a5ce655f3cee1a943d03d2c862bb1e79bf5c41a53b5d
5
5
  SHA512:
6
- metadata.gz: b6a4f7937fe8895ca01284ca5807be215fa81147ea77e22c702e32b5303d1eb437d17f8156fd6aadd88e7d8af1a5c204f2c486f2c83d11bd922e7c03f2c63662
7
- data.tar.gz: 66ec1893d9a4b30683f9fa03eed0db42d4615df816208d53baf9bad8ce8d69448bbab4e4407686c7d297650a75f99a42e42a83168c669ae5a0c2e55444c228ce
6
+ metadata.gz: e3f07e0893a68a7a9d4a5b2532eaae294c76890e98120659789c46c17b2154e2ffd34cc8bf48617a2a0c61e73ef4c1354d44edbdd95c65b2ad83eb39c8ef6cfd
7
+ data.tar.gz: 4f889f1e4dcc42daa91bad73d42e919b4fd5d880c716dbfe12e36c61e87f4c8000d0cbdce8d6c6e1067ea872d26bee6b9f07c468f4a077202c44b4dc9ffaad5e
@@ -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.19.0'
48
+ GEM_VERSION = '1.24.1'
46
49
 
47
50
  end
@@ -24,12 +24,25 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
24
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
25
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
26
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
27
+ require 'aws-sdk-core/plugins/http_checksum.rb'
27
28
  require 'aws-sdk-core/plugins/signature_v4.rb'
28
29
  require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
29
30
 
30
31
  Aws::Plugins::GlobalConfiguration.add_identifier(:cloudtrail)
31
32
 
32
33
  module Aws::CloudTrail
34
+ # An API client for CloudTrail. To construct a client, you need to configure a `:region` and `:credentials`.
35
+ #
36
+ # client = Aws::CloudTrail::Client.new(
37
+ # region: region_name,
38
+ # credentials: credentials,
39
+ # # ...
40
+ # )
41
+ #
42
+ # For details on configuring region and credentials see
43
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
44
+ #
45
+ # See {#initialize} for a full list of supported configuration options.
33
46
  class Client < Seahorse::Client::Base
34
47
 
35
48
  include Aws::ClientStubs
@@ -57,6 +70,7 @@ module Aws::CloudTrail
57
70
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
58
71
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
59
72
  add_plugin(Aws::Plugins::TransferEncoding)
73
+ add_plugin(Aws::Plugins::HttpChecksum)
60
74
  add_plugin(Aws::Plugins::SignatureV4)
61
75
  add_plugin(Aws::Plugins::Protocols::JsonRpc)
62
76
 
@@ -93,7 +107,7 @@ module Aws::CloudTrail
93
107
  # @option options [required, String] :region
94
108
  # The AWS region to connect to. The configured `:region` is
95
109
  # used to determine the service `:endpoint`. When not passed,
96
- # a default `:region` is search for in the following locations:
110
+ # a default `:region` is searched for in the following locations:
97
111
  #
98
112
  # * `Aws.config[:region]`
99
113
  # * `ENV['AWS_REGION']`
@@ -108,6 +122,12 @@ module Aws::CloudTrail
108
122
  # When set to `true`, a thread polling for endpoints will be running in
109
123
  # the background every 60 secs (default). Defaults to `false`.
110
124
  #
125
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
126
+ # Used only in `adaptive` retry mode. When true, the request will sleep
127
+ # until there is sufficent client side capacity to retry the request.
128
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
129
+ # not retry instead of sleeping.
130
+ #
111
131
  # @option options [Boolean] :client_side_monitoring (false)
112
132
  # When `true`, client-side metrics will be collected for all API requests from
113
133
  # this client.
@@ -132,6 +152,10 @@ module Aws::CloudTrail
132
152
  # When `true`, an attempt is made to coerce request parameters into
133
153
  # the required types.
134
154
  #
155
+ # @option options [Boolean] :correct_clock_skew (true)
156
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
157
+ # a clock skew correction and retry requests with skewed client clocks.
158
+ #
135
159
  # @option options [Boolean] :disable_host_prefix_injection (false)
136
160
  # Set to true to disable SDK automatically adding host prefix
137
161
  # to default service endpoint when available.
@@ -139,7 +163,7 @@ module Aws::CloudTrail
139
163
  # @option options [String] :endpoint
140
164
  # The client endpoint is normally constructed from the `:region`
141
165
  # option. You should only configure an `:endpoint` when connecting
142
- # to test endpoints. This should be avalid HTTP(S) URI.
166
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
143
167
  #
144
168
  # @option options [Integer] :endpoint_cache_max_entries (1000)
145
169
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -154,7 +178,7 @@ module Aws::CloudTrail
154
178
  # requests fetching endpoints information. Defaults to 60 sec.
155
179
  #
156
180
  # @option options [Boolean] :endpoint_discovery (false)
157
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
181
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
158
182
  #
159
183
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
160
184
  # The log formatter.
@@ -166,15 +190,29 @@ module Aws::CloudTrail
166
190
  # The Logger instance to send log messages to. If this option
167
191
  # is not set, logging will be disabled.
168
192
  #
193
+ # @option options [Integer] :max_attempts (3)
194
+ # An integer representing the maximum number attempts that will be made for
195
+ # a single request, including the initial attempt. For example,
196
+ # setting this value to 5 will result in a request being retried up to
197
+ # 4 times. Used in `standard` and `adaptive` retry modes.
198
+ #
169
199
  # @option options [String] :profile ("default")
170
200
  # Used when loading credentials from the shared credentials file
171
201
  # at HOME/.aws/credentials. When not specified, 'default' is used.
172
202
  #
203
+ # @option options [Proc] :retry_backoff
204
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
205
+ # This option is only used in the `legacy` retry mode.
206
+ #
173
207
  # @option options [Float] :retry_base_delay (0.3)
174
- # The base delay in seconds used by the default backoff function.
208
+ # The base delay in seconds used by the default backoff function. This option
209
+ # is only used in the `legacy` retry mode.
175
210
  #
176
211
  # @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.
212
+ # A delay randomiser function used by the default backoff function.
213
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
214
+ # otherwise a Proc that takes and returns a number. This option is only used
215
+ # in the `legacy` retry mode.
178
216
  #
179
217
  # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
180
218
  #
@@ -182,11 +220,30 @@ module Aws::CloudTrail
182
220
  # The maximum number of times to retry failed requests. Only
183
221
  # ~ 500 level server errors and certain ~ 400 level client errors
184
222
  # are retried. Generally, these are throttling errors, data
185
- # checksum errors, networking errors, timeout errors and auth
186
- # errors from expired credentials.
223
+ # checksum errors, networking errors, timeout errors, auth errors,
224
+ # endpoint discovery, and errors from expired credentials.
225
+ # This option is only used in the `legacy` retry mode.
187
226
  #
188
227
  # @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.
228
+ # The maximum number of seconds to delay between retries (0 for no limit)
229
+ # used by the default backoff function. This option is only used in the
230
+ # `legacy` retry mode.
231
+ #
232
+ # @option options [String] :retry_mode ("legacy")
233
+ # Specifies which retry algorithm to use. Values are:
234
+ #
235
+ # * `legacy` - The pre-existing retry behavior. This is default value if
236
+ # no retry mode is provided.
237
+ #
238
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
239
+ # This includes support for retry quotas, which limit the number of
240
+ # unsuccessful retries a client can make.
241
+ #
242
+ # * `adaptive` - An experimental retry mode that includes all the
243
+ # functionality of `standard` mode along with automatic client side
244
+ # throttling. This is a provisional mode that may change behavior
245
+ # in the future.
246
+ #
190
247
  #
191
248
  # @option options [String] :secret_access_key
192
249
  #
@@ -219,16 +276,15 @@ module Aws::CloudTrail
219
276
  # requests through. Formatted like 'http://proxy.com:123'.
220
277
  #
221
278
  # @option options [Float] :http_open_timeout (15) The number of
222
- # seconds to wait when opening a HTTP session before rasing a
279
+ # seconds to wait when opening a HTTP session before raising a
223
280
  # `Timeout::Error`.
224
281
  #
225
282
  # @option options [Integer] :http_read_timeout (60) The default
226
283
  # 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}.
284
+ # safely be set per-request on the session.
229
285
  #
230
286
  # @option options [Float] :http_idle_timeout (5) The number of
231
- # seconds a connection is allowed to sit idble before it is
287
+ # seconds a connection is allowed to sit idle before it is
232
288
  # considered stale. Stale connections are closed and removed
233
289
  # from the pool before making a request.
234
290
  #
@@ -237,7 +293,7 @@ module Aws::CloudTrail
237
293
  # request body. This option has no effect unless the request has
238
294
  # "Expect" header set to "100-continue". Defaults to `nil` which
239
295
  # disables this behaviour. This value can safely be set per
240
- # request on the session yeidled by {#session_for}.
296
+ # request on the session.
241
297
  #
242
298
  # @option options [Boolean] :http_wire_trace (false) When `true`,
243
299
  # HTTP debug output will be sent to the `:logger`.
@@ -560,6 +616,7 @@ module Aws::CloudTrail
560
616
  # resp.trail_list[0].cloud_watch_logs_role_arn #=> String
561
617
  # resp.trail_list[0].kms_key_id #=> String
562
618
  # resp.trail_list[0].has_custom_event_selectors #=> Boolean
619
+ # resp.trail_list[0].has_insight_selectors #=> Boolean
563
620
  # resp.trail_list[0].is_organization_trail #=> Boolean
564
621
  #
565
622
  # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails AWS API Documentation
@@ -632,6 +689,8 @@ module Aws::CloudTrail
632
689
  # resp.event_selectors[0].data_resources[0].type #=> String
633
690
  # resp.event_selectors[0].data_resources[0].values #=> Array
634
691
  # resp.event_selectors[0].data_resources[0].values[0] #=> String
692
+ # resp.event_selectors[0].exclude_management_event_sources #=> Array
693
+ # resp.event_selectors[0].exclude_management_event_sources[0] #=> String
635
694
  #
636
695
  # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors AWS API Documentation
637
696
  #
@@ -642,6 +701,66 @@ module Aws::CloudTrail
642
701
  req.send_request(options)
643
702
  end
644
703
 
704
+ # Describes the settings for the Insights event selectors that you
705
+ # configured for your trail. `GetInsightSelectors` shows if CloudTrail
706
+ # Insights event logging is enabled on the trail, and if it is, which
707
+ # insight types are enabled. If you run `GetInsightSelectors` on a trail
708
+ # that does not have Insights events enabled, the operation throws the
709
+ # exception `InsightNotEnabledException`
710
+ #
711
+ # For more information, see [Logging CloudTrail Insights Events for
712
+ # Trails ][1] in the *AWS CloudTrail User Guide*.
713
+ #
714
+ #
715
+ #
716
+ # [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html
717
+ #
718
+ # @option params [required, String] :trail_name
719
+ # Specifies the name of the trail or trail ARN. If you specify a trail
720
+ # name, the string must meet the following requirements:
721
+ #
722
+ # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
723
+ # underscores (\_), or dashes (-)
724
+ #
725
+ # * Start with a letter or number, and end with a letter or number
726
+ #
727
+ # * Be between 3 and 128 characters
728
+ #
729
+ # * Have no adjacent periods, underscores or dashes. Names like
730
+ # `my-_namespace` and `my--namespace` are not valid.
731
+ #
732
+ # * Not be in IP address format (for example, 192.168.5.4)
733
+ #
734
+ # If you specify a trail ARN, it must be in the format:
735
+ #
736
+ # `arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail`
737
+ #
738
+ # @return [Types::GetInsightSelectorsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
739
+ #
740
+ # * {Types::GetInsightSelectorsResponse#trail_arn #trail_arn} => String
741
+ # * {Types::GetInsightSelectorsResponse#insight_selectors #insight_selectors} => Array&lt;Types::InsightSelector&gt;
742
+ #
743
+ # @example Request syntax with placeholder values
744
+ #
745
+ # resp = client.get_insight_selectors({
746
+ # trail_name: "String", # required
747
+ # })
748
+ #
749
+ # @example Response structure
750
+ #
751
+ # resp.trail_arn #=> String
752
+ # resp.insight_selectors #=> Array
753
+ # resp.insight_selectors[0].insight_type #=> String, one of "ApiCallRateInsight"
754
+ #
755
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors AWS API Documentation
756
+ #
757
+ # @overload get_insight_selectors(params = {})
758
+ # @param [Hash] params ({})
759
+ def get_insight_selectors(params = {}, options = {})
760
+ req = build_request(:get_insight_selectors, params)
761
+ req.send_request(options)
762
+ end
763
+
645
764
  # Returns settings information for a specified trail.
646
765
  #
647
766
  # @option params [required, String] :name
@@ -674,6 +793,7 @@ module Aws::CloudTrail
674
793
  # resp.trail.cloud_watch_logs_role_arn #=> String
675
794
  # resp.trail.kms_key_id #=> String
676
795
  # resp.trail.has_custom_event_selectors #=> Boolean
796
+ # resp.trail.has_insight_selectors #=> Boolean
677
797
  # resp.trail.is_organization_trail #=> Boolean
678
798
  #
679
799
  # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail AWS API Documentation
@@ -785,6 +905,8 @@ module Aws::CloudTrail
785
905
  # * {Types::ListPublicKeysResponse#public_key_list #public_key_list} => Array&lt;Types::PublicKey&gt;
786
906
  # * {Types::ListPublicKeysResponse#next_token #next_token} => String
787
907
  #
908
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
909
+ #
788
910
  # @example Request syntax with placeholder values
789
911
  #
790
912
  # resp = client.list_public_keys({
@@ -827,6 +949,8 @@ module Aws::CloudTrail
827
949
  # * {Types::ListTagsResponse#resource_tag_list #resource_tag_list} => Array&lt;Types::ResourceTag&gt;
828
950
  # * {Types::ListTagsResponse#next_token #next_token} => String
829
951
  #
952
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
953
+ #
830
954
  # @example Request syntax with placeholder values
831
955
  #
832
956
  # resp = client.list_tags({
@@ -855,12 +979,19 @@ module Aws::CloudTrail
855
979
  # Lists trails that are in the current account.
856
980
  #
857
981
  # @option params [String] :next_token
982
+ # The token to use to get the next page of results after a previous API
983
+ # call. This token must be passed in with the same parameters that were
984
+ # specified in the the original call. For example, if the original call
985
+ # specified an AttributeKey of 'Username' with a value of 'root',
986
+ # the call with NextToken should include those same parameters.
858
987
  #
859
988
  # @return [Types::ListTrailsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
860
989
  #
861
990
  # * {Types::ListTrailsResponse#trails #trails} => Array&lt;Types::TrailInfo&gt;
862
991
  # * {Types::ListTrailsResponse#next_token #next_token} => String
863
992
  #
993
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
994
+ #
864
995
  # @example Request syntax with placeholder values
865
996
  #
866
997
  # resp = client.list_trails({
@@ -884,9 +1015,10 @@ module Aws::CloudTrail
884
1015
  req.send_request(options)
885
1016
  end
886
1017
 
887
- # Looks up [management events][1] captured by CloudTrail. You can look
888
- # up events that occurred in a region within the last 90 days. Lookup
889
- # supports the following attributes:
1018
+ # Looks up [management events][1] or [CloudTrail Insights events][2]
1019
+ # that are captured by CloudTrail. You can look up events that occurred
1020
+ # in a region within the last 90 days. Lookup supports the following
1021
+ # attributes for management events:
890
1022
  #
891
1023
  # * AWS access key
892
1024
  #
@@ -904,20 +1036,25 @@ module Aws::CloudTrail
904
1036
  #
905
1037
  # * User name
906
1038
  #
1039
+ # Lookup supports the following attributes for Insights events:
1040
+ #
1041
+ # * Event ID
1042
+ #
1043
+ # * Event name
1044
+ #
1045
+ # * Event source
1046
+ #
907
1047
  # All attributes are optional. The default number of results returned is
908
1048
  # 50, with a maximum of 50 possible. The response includes a token that
909
1049
  # you can use to get the next page of results.
910
1050
  #
911
- # The rate of lookup requests is limited to one per second per account.
1051
+ # The rate of lookup requests is limited to two per second per account.
912
1052
  # If this limit is exceeded, a throttling error occurs.
913
1053
  #
914
- # Events that occurred during the selected time range will not be
915
- # available for lookup if CloudTrail logging was not enabled when the
916
- # events occurred.
917
- #
918
1054
  #
919
1055
  #
920
1056
  # [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events
1057
+ # [2]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events
921
1058
  #
922
1059
  # @option params [Array<Types::LookupAttribute>] :lookup_attributes
923
1060
  # Contains a list of lookup attributes. Currently the list can contain
@@ -933,6 +1070,12 @@ module Aws::CloudTrail
933
1070
  # are returned. If the specified end time is before the specified start
934
1071
  # time, an error is returned.
935
1072
  #
1073
+ # @option params [String] :event_category
1074
+ # Specifies the event category. If you do not specify an event category,
1075
+ # events of the category are not returned in the response. For example,
1076
+ # if you do not specify `insight` as the value of `EventCategory`, no
1077
+ # Insights events are returned.
1078
+ #
936
1079
  # @option params [Integer] :max_results
937
1080
  # The number of events to return. Possible values are 1 through 50. The
938
1081
  # default is 50.
@@ -949,6 +1092,8 @@ module Aws::CloudTrail
949
1092
  # * {Types::LookupEventsResponse#events #events} => Array&lt;Types::Event&gt;
950
1093
  # * {Types::LookupEventsResponse#next_token #next_token} => String
951
1094
  #
1095
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1096
+ #
952
1097
  # @example Request syntax with placeholder values
953
1098
  #
954
1099
  # resp = client.lookup_events({
@@ -960,6 +1105,7 @@ module Aws::CloudTrail
960
1105
  # ],
961
1106
  # start_time: Time.now,
962
1107
  # end_time: Time.now,
1108
+ # event_category: "insight", # accepts insight
963
1109
  # max_results: 1,
964
1110
  # next_token: "NextToken",
965
1111
  # })
@@ -1073,6 +1219,7 @@ module Aws::CloudTrail
1073
1219
  # values: ["String"],
1074
1220
  # },
1075
1221
  # ],
1222
+ # exclude_management_event_sources: ["String"],
1076
1223
  # },
1077
1224
  # ],
1078
1225
  # })
@@ -1087,6 +1234,8 @@ module Aws::CloudTrail
1087
1234
  # resp.event_selectors[0].data_resources[0].type #=> String
1088
1235
  # resp.event_selectors[0].data_resources[0].values #=> Array
1089
1236
  # resp.event_selectors[0].data_resources[0].values[0] #=> String
1237
+ # resp.event_selectors[0].exclude_management_event_sources #=> Array
1238
+ # resp.event_selectors[0].exclude_management_event_sources[0] #=> String
1090
1239
  #
1091
1240
  # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors AWS API Documentation
1092
1241
  #
@@ -1097,6 +1246,52 @@ module Aws::CloudTrail
1097
1246
  req.send_request(options)
1098
1247
  end
1099
1248
 
1249
+ # Lets you enable Insights event logging by specifying the Insights
1250
+ # selectors that you want to enable on an existing trail. You also use
1251
+ # `PutInsightSelectors` to turn off Insights event logging, by passing
1252
+ # an empty list of insight types. In this release, only
1253
+ # `ApiCallRateInsight` is supported as an Insights selector.
1254
+ #
1255
+ # @option params [required, String] :trail_name
1256
+ # The name of the CloudTrail trail for which you want to change or add
1257
+ # Insights selectors.
1258
+ #
1259
+ # @option params [required, Array<Types::InsightSelector>] :insight_selectors
1260
+ # A JSON string that contains the insight types you want to log on a
1261
+ # trail. In this release, only `ApiCallRateInsight` is supported as an
1262
+ # insight type.
1263
+ #
1264
+ # @return [Types::PutInsightSelectorsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1265
+ #
1266
+ # * {Types::PutInsightSelectorsResponse#trail_arn #trail_arn} => String
1267
+ # * {Types::PutInsightSelectorsResponse#insight_selectors #insight_selectors} => Array&lt;Types::InsightSelector&gt;
1268
+ #
1269
+ # @example Request syntax with placeholder values
1270
+ #
1271
+ # resp = client.put_insight_selectors({
1272
+ # trail_name: "String", # required
1273
+ # insight_selectors: [ # required
1274
+ # {
1275
+ # insight_type: "ApiCallRateInsight", # accepts ApiCallRateInsight
1276
+ # },
1277
+ # ],
1278
+ # })
1279
+ #
1280
+ # @example Response structure
1281
+ #
1282
+ # resp.trail_arn #=> String
1283
+ # resp.insight_selectors #=> Array
1284
+ # resp.insight_selectors[0].insight_type #=> String, one of "ApiCallRateInsight"
1285
+ #
1286
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors AWS API Documentation
1287
+ #
1288
+ # @overload put_insight_selectors(params = {})
1289
+ # @param [Hash] params ({})
1290
+ def put_insight_selectors(params = {}, options = {})
1291
+ req = build_request(:put_insight_selectors, params)
1292
+ req.send_request(options)
1293
+ end
1294
+
1100
1295
  # Removes the specified tags from a trail.
1101
1296
  #
1102
1297
  # @option params [required, String] :resource_id
@@ -1381,7 +1576,7 @@ module Aws::CloudTrail
1381
1576
  params: params,
1382
1577
  config: config)
1383
1578
  context[:gem_name] = 'aws-sdk-cloudtrail'
1384
- context[:gem_version] = '1.19.0'
1579
+ context[:gem_version] = '1.24.1'
1385
1580
  Seahorse::Client::Request.new(handlers, context)
1386
1581
  end
1387
1582