aws-sdk-cloudtrail 1.0.0.rc1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d31a62a1e412dbbfcacdea26d4663befd1c2d3db
4
+ data.tar.gz: bf1e7d871ced7c0f06cead28446daff9ba3c9255
5
+ SHA512:
6
+ metadata.gz: 3e3aec4e0b328980e50742548f50e8ccceb8306843af3f7ae2ca45b36de65e93c9c93784f36ee5002baee0382efc698d2ce33bc2813dbe015b32127ae019b0a4
7
+ data.tar.gz: 15112b32f13be71584d874fbcec51c8feed9c81c6d29fc982342c4bf86095a5503341064ee511c76560dc65e2f81bb713de20e079aca15204440cbd030d59533
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-cloudtrail/types'
12
+ require_relative 'aws-sdk-cloudtrail/client_api'
13
+ require_relative 'aws-sdk-cloudtrail/client'
14
+ require_relative 'aws-sdk-cloudtrail/errors'
15
+ require_relative 'aws-sdk-cloudtrail/resource'
16
+ require_relative 'aws-sdk-cloudtrail/customizations'
17
+
18
+ # This module provides support for AWS CloudTrail. This module is available in the
19
+ # `aws-sdk-cloudtrail` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from AWS CloudTrail all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::CloudTrail::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::CloudTrail
44
+
45
+ GEM_VERSION = '1.0.0.rc1'
46
+
47
+ end
@@ -0,0 +1,1026 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/signature_v4.rb'
22
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:cloudtrail)
25
+
26
+ module Aws
27
+ module CloudTrail
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :cloudtrail
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::SignatureV4)
50
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
51
+
52
+ # @option options [required, Aws::CredentialProvider] :credentials
53
+ # Your AWS credentials. This can be an instance of any one of the
54
+ # following classes:
55
+ #
56
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
57
+ # credentials.
58
+ #
59
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
60
+ # from an EC2 IMDS on an EC2 instance.
61
+ #
62
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
63
+ # shared file, such as `~/.aws/config`.
64
+ #
65
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
66
+ #
67
+ # When `:credentials` are not configured directly, the following
68
+ # locations will be searched for credentials:
69
+ #
70
+ # * `Aws.config[:credentials]`
71
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
72
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
73
+ # * `~/.aws/credentials`
74
+ # * `~/.aws/config`
75
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
76
+ # very aggressive. Construct and pass an instance of
77
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
78
+ # timeouts.
79
+ # @option options [required, String] :region
80
+ # The AWS region to connect to. The configured `:region` is
81
+ # used to determine the service `:endpoint`. When not passed,
82
+ # a default `:region` is search for in the following locations:
83
+ #
84
+ # * `Aws.config[:region]`
85
+ # * `ENV['AWS_REGION']`
86
+ # * `ENV['AMAZON_REGION']`
87
+ # * `ENV['AWS_DEFAULT_REGION']`
88
+ # * `~/.aws/credentials`
89
+ # * `~/.aws/config`
90
+ # @option options [String] :access_key_id
91
+ # @option options [Boolean] :convert_params (true)
92
+ # When `true`, an attempt is made to coerce request parameters into
93
+ # the required types.
94
+ # @option options [String] :endpoint
95
+ # The client endpoint is normally constructed from the `:region`
96
+ # option. You should only configure an `:endpoint` when connecting
97
+ # to test endpoints. This should be avalid HTTP(S) URI.
98
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
99
+ # The log formatter.
100
+ # @option options [Symbol] :log_level (:info)
101
+ # The log level to send messages to the `:logger` at.
102
+ # @option options [Logger] :logger
103
+ # The Logger instance to send log messages to. If this option
104
+ # is not set, logging will be disabled.
105
+ # @option options [String] :profile ("default")
106
+ # Used when loading credentials from the shared credentials file
107
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
108
+ # @option options [Integer] :retry_limit (3)
109
+ # The maximum number of times to retry failed requests. Only
110
+ # ~ 500 level server errors and certain ~ 400 level client errors
111
+ # are retried. Generally, these are throttling errors, data
112
+ # checksum errors, networking errors, timeout errors and auth
113
+ # errors from expired credentials.
114
+ # @option options [String] :secret_access_key
115
+ # @option options [String] :session_token
116
+ # @option options [Boolean] :simple_json (false)
117
+ # Disables request parameter conversion, validation, and formatting.
118
+ # Also disable response data type conversions. This option is useful
119
+ # when you want to ensure the highest level of performance by
120
+ # avoiding overhead of walking request parameters and response data
121
+ # structures.
122
+ #
123
+ # When `:simple_json` is enabled, the request parameters hash must
124
+ # be formatted exactly as the DynamoDB API expects.
125
+ # @option options [Boolean] :stub_responses (false)
126
+ # Causes the client to return stubbed responses. By default
127
+ # fake responses are generated and returned. You can specify
128
+ # the response data to return or errors to raise by calling
129
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
130
+ #
131
+ # ** Please note ** When response stubbing is enabled, no HTTP
132
+ # requests are made, and retries are disabled.
133
+ # @option options [Boolean] :validate_params (true)
134
+ # When `true`, request parameters are validated before
135
+ # sending the request.
136
+ def initialize(*args)
137
+ super
138
+ end
139
+
140
+ # @!group API Operations
141
+
142
+ # Adds one or more tags to a trail, up to a limit of 50. Tags must be
143
+ # unique per trail. Overwrites an existing tag's value when a new value
144
+ # is specified for an existing tag key. If you specify a key without a
145
+ # value, the tag will be created with the specified key and a value of
146
+ # null. You can tag a trail that applies to all regions only from the
147
+ # region in which the trail was created (that is, from its home region).
148
+ # @option params [required, String] :resource_id
149
+ # Specifies the ARN of the trail to which one or more tags will be
150
+ # added. The format of a trail ARN is:
151
+ #
152
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
153
+ # @option params [Array<Types::Tag>] :tags_list
154
+ # Contains a list of CloudTrail tags, up to a limit of 50
155
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
156
+ #
157
+ # @example Request syntax with placeholder values
158
+ # resp = client.add_tags({
159
+ # resource_id: "String", # required
160
+ # tags_list: [
161
+ # {
162
+ # key: "String", # required
163
+ # value: "String",
164
+ # },
165
+ # ],
166
+ # })
167
+ # @overload add_tags(params = {})
168
+ # @param [Hash] params ({})
169
+ def add_tags(params = {}, options = {})
170
+ req = build_request(:add_tags, params)
171
+ req.send_request(options)
172
+ end
173
+
174
+ # Creates a trail that specifies the settings for delivery of log data
175
+ # to an Amazon S3 bucket. A maximum of five trails can exist in a
176
+ # region, irrespective of the region in which they were created.
177
+ # @option params [required, String] :name
178
+ # Specifies the name of the trail. The name must meet the following
179
+ # requirements:
180
+ #
181
+ # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
182
+ # underscores (\_), or dashes (-)
183
+ #
184
+ # * Start with a letter or number, and end with a letter or number
185
+ #
186
+ # * Be between 3 and 128 characters
187
+ #
188
+ # * Have no adjacent periods, underscores or dashes. Names like
189
+ # `my-_namespace` and `my--namespace` are invalid.
190
+ #
191
+ # * Not be in IP address format (for example, 192.168.5.4)
192
+ # @option params [required, String] :s3_bucket_name
193
+ # Specifies the name of the Amazon S3 bucket designated for publishing
194
+ # log files. See [Amazon S3 Bucket Naming Requirements][1].
195
+ #
196
+ #
197
+ #
198
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
199
+ # @option params [String] :s3_key_prefix
200
+ # Specifies the Amazon S3 key prefix that comes after the name of the
201
+ # bucket you have designated for log file delivery. For more
202
+ # information, see [Finding Your CloudTrail Log Files][1]. The maximum
203
+ # length is 200 characters.
204
+ #
205
+ #
206
+ #
207
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
208
+ # @option params [String] :sns_topic_name
209
+ # Specifies the name of the Amazon SNS topic defined for notification of
210
+ # log file delivery. The maximum length is 256 characters.
211
+ # @option params [Boolean] :include_global_service_events
212
+ # Specifies whether the trail is publishing events from global services
213
+ # such as IAM to the log files.
214
+ # @option params [Boolean] :is_multi_region_trail
215
+ # Specifies whether the trail is created in the current region or in all
216
+ # regions. The default is false.
217
+ # @option params [Boolean] :enable_log_file_validation
218
+ # Specifies whether log file integrity validation is enabled. The
219
+ # default is false.
220
+ #
221
+ # <note markdown="1"> When you disable log file integrity validation, the chain of digest
222
+ # files is broken after one hour. CloudTrail will not create digest
223
+ # files for log files that were delivered during a period in which log
224
+ # file integrity validation was disabled. For example, if you enable log
225
+ # file integrity validation at noon on January 1, disable it at noon on
226
+ # January 2, and re-enable it at noon on January 10, digest files will
227
+ # not be created for the log files delivered from noon on January 2 to
228
+ # noon on January 10. The same applies whenever you stop CloudTrail
229
+ # logging or delete a trail.
230
+ #
231
+ # </note>
232
+ # @option params [String] :cloud_watch_logs_log_group_arn
233
+ # Specifies a log group name using an Amazon Resource Name (ARN), a
234
+ # unique identifier that represents the log group to which CloudTrail
235
+ # logs will be delivered. Not required unless you specify
236
+ # CloudWatchLogsRoleArn.
237
+ # @option params [String] :cloud_watch_logs_role_arn
238
+ # Specifies the role for the CloudWatch Logs endpoint to assume to write
239
+ # to a user's log group.
240
+ # @option params [String] :kms_key_id
241
+ # Specifies the KMS key ID to use to encrypt the logs delivered by
242
+ # CloudTrail. The value can be a an alias name prefixed by "alias/", a
243
+ # fully specified ARN to an alias, a fully specified ARN to a key, or a
244
+ # globally unique identifier.
245
+ #
246
+ # Examples:
247
+ #
248
+ # * alias/MyAliasName
249
+ #
250
+ # * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
251
+ #
252
+ # * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
253
+ #
254
+ # * 12345678-1234-1234-1234-123456789012
255
+ # @return [Types::CreateTrailResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
256
+ #
257
+ # * {Types::CreateTrailResponse#name #Name} => String
258
+ # * {Types::CreateTrailResponse#s3_bucket_name #S3BucketName} => String
259
+ # * {Types::CreateTrailResponse#s3_key_prefix #S3KeyPrefix} => String
260
+ # * {Types::CreateTrailResponse#sns_topic_name #SnsTopicName} => String
261
+ # * {Types::CreateTrailResponse#sns_topic_arn #SnsTopicARN} => String
262
+ # * {Types::CreateTrailResponse#include_global_service_events #IncludeGlobalServiceEvents} => Boolean
263
+ # * {Types::CreateTrailResponse#is_multi_region_trail #IsMultiRegionTrail} => Boolean
264
+ # * {Types::CreateTrailResponse#trail_arn #TrailARN} => String
265
+ # * {Types::CreateTrailResponse#log_file_validation_enabled #LogFileValidationEnabled} => Boolean
266
+ # * {Types::CreateTrailResponse#cloud_watch_logs_log_group_arn #CloudWatchLogsLogGroupArn} => String
267
+ # * {Types::CreateTrailResponse#cloud_watch_logs_role_arn #CloudWatchLogsRoleArn} => String
268
+ # * {Types::CreateTrailResponse#kms_key_id #KmsKeyId} => String
269
+ #
270
+ # @example Request syntax with placeholder values
271
+ # resp = client.create_trail({
272
+ # name: "String", # required
273
+ # s3_bucket_name: "String", # required
274
+ # s3_key_prefix: "String",
275
+ # sns_topic_name: "String",
276
+ # include_global_service_events: false,
277
+ # is_multi_region_trail: false,
278
+ # enable_log_file_validation: false,
279
+ # cloud_watch_logs_log_group_arn: "String",
280
+ # cloud_watch_logs_role_arn: "String",
281
+ # kms_key_id: "String",
282
+ # })
283
+ #
284
+ # @example Response structure
285
+ # resp.name #=> String
286
+ # resp.s3_bucket_name #=> String
287
+ # resp.s3_key_prefix #=> String
288
+ # resp.sns_topic_name #=> String
289
+ # resp.sns_topic_arn #=> String
290
+ # resp.include_global_service_events #=> Boolean
291
+ # resp.is_multi_region_trail #=> Boolean
292
+ # resp.trail_arn #=> String
293
+ # resp.log_file_validation_enabled #=> Boolean
294
+ # resp.cloud_watch_logs_log_group_arn #=> String
295
+ # resp.cloud_watch_logs_role_arn #=> String
296
+ # resp.kms_key_id #=> String
297
+ # @overload create_trail(params = {})
298
+ # @param [Hash] params ({})
299
+ def create_trail(params = {}, options = {})
300
+ req = build_request(:create_trail, params)
301
+ req.send_request(options)
302
+ end
303
+
304
+ # Deletes a trail. This operation must be called from the region in
305
+ # which the trail was created. `DeleteTrail` cannot be called on the
306
+ # shadow trails (replicated trails in other regions) of a trail that is
307
+ # enabled in all regions.
308
+ # @option params [required, String] :name
309
+ # Specifies the name or the CloudTrail ARN of the trail to be deleted.
310
+ # The format of a trail ARN is:
311
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
312
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
313
+ #
314
+ # @example Request syntax with placeholder values
315
+ # resp = client.delete_trail({
316
+ # name: "String", # required
317
+ # })
318
+ # @overload delete_trail(params = {})
319
+ # @param [Hash] params ({})
320
+ def delete_trail(params = {}, options = {})
321
+ req = build_request(:delete_trail, params)
322
+ req.send_request(options)
323
+ end
324
+
325
+ # Retrieves settings for the trail associated with the current region
326
+ # for your account.
327
+ # @option params [Array<String>] :trail_name_list
328
+ # Specifies a list of trail names, trail ARNs, or both, of the trails to
329
+ # describe. The format of a trail ARN is:
330
+ #
331
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
332
+ #
333
+ # If an empty list is specified, information for the trail in the
334
+ # current region is returned.
335
+ #
336
+ # * If an empty list is specified and `IncludeShadowTrails` is false,
337
+ # then information for all trails in the current region is returned.
338
+ #
339
+ # * If an empty list is specified and IncludeShadowTrails is null or
340
+ # true, then information for all trails in the current region and any
341
+ # associated shadow trails in other regions is returned.
342
+ #
343
+ # <note markdown="1"> If one or more trail names are specified, information is returned only
344
+ # if the names match the names of trails belonging only to the current
345
+ # region. To return information about a trail in another region, you
346
+ # must specify its trail ARN.
347
+ #
348
+ # </note>
349
+ # @option params [Boolean] :include_shadow_trails
350
+ # Specifies whether to include shadow trails in the response. A shadow
351
+ # trail is the replication in a region of a trail that was created in a
352
+ # different region. The default is true.
353
+ # @return [Types::DescribeTrailsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
354
+ #
355
+ # * {Types::DescribeTrailsResponse#trail_list #trailList} => Array&lt;Types::Trail&gt;
356
+ #
357
+ # @example Request syntax with placeholder values
358
+ # resp = client.describe_trails({
359
+ # trail_name_list: ["String"],
360
+ # include_shadow_trails: false,
361
+ # })
362
+ #
363
+ # @example Response structure
364
+ # resp.trail_list #=> Array
365
+ # resp.trail_list[0].name #=> String
366
+ # resp.trail_list[0].s3_bucket_name #=> String
367
+ # resp.trail_list[0].s3_key_prefix #=> String
368
+ # resp.trail_list[0].sns_topic_name #=> String
369
+ # resp.trail_list[0].sns_topic_arn #=> String
370
+ # resp.trail_list[0].include_global_service_events #=> Boolean
371
+ # resp.trail_list[0].is_multi_region_trail #=> Boolean
372
+ # resp.trail_list[0].home_region #=> String
373
+ # resp.trail_list[0].trail_arn #=> String
374
+ # resp.trail_list[0].log_file_validation_enabled #=> Boolean
375
+ # resp.trail_list[0].cloud_watch_logs_log_group_arn #=> String
376
+ # resp.trail_list[0].cloud_watch_logs_role_arn #=> String
377
+ # resp.trail_list[0].kms_key_id #=> String
378
+ # resp.trail_list[0].has_custom_event_selectors #=> Boolean
379
+ # @overload describe_trails(params = {})
380
+ # @param [Hash] params ({})
381
+ def describe_trails(params = {}, options = {})
382
+ req = build_request(:describe_trails, params)
383
+ req.send_request(options)
384
+ end
385
+
386
+ # Describes the settings for the event selectors that you configured for
387
+ # your trail. The information returned for your event selectors includes
388
+ # the following:
389
+ #
390
+ # * The S3 objects that you are logging for data events.
391
+ #
392
+ # * If your event selector includes management events.
393
+ #
394
+ # * If your event selector includes read-only events, write-only events,
395
+ # or all.
396
+ #
397
+ # For more information, see [Configuring Event Selectors for Trails][1]
398
+ # in the *AWS CloudTrail User Guide*.
399
+ #
400
+ #
401
+ #
402
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-event-selectors-for-a-trail.html
403
+ # @option params [String] :trail_name
404
+ # Specifies the name of the trail or trail ARN. If you specify a trail
405
+ # name, the string must meet the following requirements:
406
+ #
407
+ # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
408
+ # underscores (\_), or dashes (-)
409
+ #
410
+ # * Start with a letter or number, and end with a letter or number
411
+ #
412
+ # * Be between 3 and 128 characters
413
+ #
414
+ # * Have no adjacent periods, underscores or dashes. Names like
415
+ # `my-_namespace` and `my--namespace` are invalid.
416
+ #
417
+ # * Not be in IP address format (for example, 192.168.5.4)
418
+ #
419
+ # If you specify a trail ARN, it must be in the format:
420
+ #
421
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
422
+ # @return [Types::GetEventSelectorsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
423
+ #
424
+ # * {Types::GetEventSelectorsResponse#trail_arn #TrailARN} => String
425
+ # * {Types::GetEventSelectorsResponse#event_selectors #EventSelectors} => Array&lt;Types::EventSelector&gt;
426
+ #
427
+ # @example Request syntax with placeholder values
428
+ # resp = client.get_event_selectors({
429
+ # trail_name: "String",
430
+ # })
431
+ #
432
+ # @example Response structure
433
+ # resp.trail_arn #=> String
434
+ # resp.event_selectors #=> Array
435
+ # resp.event_selectors[0].read_write_type #=> String, one of "ReadOnly", "WriteOnly", "All"
436
+ # resp.event_selectors[0].include_management_events #=> Boolean
437
+ # resp.event_selectors[0].data_resources #=> Array
438
+ # resp.event_selectors[0].data_resources[0].type #=> String
439
+ # resp.event_selectors[0].data_resources[0].values #=> Array
440
+ # resp.event_selectors[0].data_resources[0].values[0] #=> String
441
+ # @overload get_event_selectors(params = {})
442
+ # @param [Hash] params ({})
443
+ def get_event_selectors(params = {}, options = {})
444
+ req = build_request(:get_event_selectors, params)
445
+ req.send_request(options)
446
+ end
447
+
448
+ # Returns a JSON-formatted list of information about the specified
449
+ # trail. Fields include information on delivery errors, Amazon SNS and
450
+ # Amazon S3 errors, and start and stop logging times for each trail.
451
+ # This operation returns trail status from a single region. To return
452
+ # trail status from all regions, you must call the operation on each
453
+ # region.
454
+ # @option params [required, String] :name
455
+ # Specifies the name or the CloudTrail ARN of the trail for which you
456
+ # are requesting status. To get the status of a shadow trail (a
457
+ # replication of the trail in another region), you must specify its ARN.
458
+ # The format of a trail ARN is:
459
+ #
460
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
461
+ # @return [Types::GetTrailStatusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
462
+ #
463
+ # * {Types::GetTrailStatusResponse#is_logging #IsLogging} => Boolean
464
+ # * {Types::GetTrailStatusResponse#latest_delivery_error #LatestDeliveryError} => String
465
+ # * {Types::GetTrailStatusResponse#latest_notification_error #LatestNotificationError} => String
466
+ # * {Types::GetTrailStatusResponse#latest_delivery_time #LatestDeliveryTime} => Time
467
+ # * {Types::GetTrailStatusResponse#latest_notification_time #LatestNotificationTime} => Time
468
+ # * {Types::GetTrailStatusResponse#start_logging_time #StartLoggingTime} => Time
469
+ # * {Types::GetTrailStatusResponse#stop_logging_time #StopLoggingTime} => Time
470
+ # * {Types::GetTrailStatusResponse#latest_cloud_watch_logs_delivery_error #LatestCloudWatchLogsDeliveryError} => String
471
+ # * {Types::GetTrailStatusResponse#latest_cloud_watch_logs_delivery_time #LatestCloudWatchLogsDeliveryTime} => Time
472
+ # * {Types::GetTrailStatusResponse#latest_digest_delivery_time #LatestDigestDeliveryTime} => Time
473
+ # * {Types::GetTrailStatusResponse#latest_digest_delivery_error #LatestDigestDeliveryError} => String
474
+ # * {Types::GetTrailStatusResponse#latest_delivery_attempt_time #LatestDeliveryAttemptTime} => String
475
+ # * {Types::GetTrailStatusResponse#latest_notification_attempt_time #LatestNotificationAttemptTime} => String
476
+ # * {Types::GetTrailStatusResponse#latest_notification_attempt_succeeded #LatestNotificationAttemptSucceeded} => String
477
+ # * {Types::GetTrailStatusResponse#latest_delivery_attempt_succeeded #LatestDeliveryAttemptSucceeded} => String
478
+ # * {Types::GetTrailStatusResponse#time_logging_started #TimeLoggingStarted} => String
479
+ # * {Types::GetTrailStatusResponse#time_logging_stopped #TimeLoggingStopped} => String
480
+ #
481
+ # @example Request syntax with placeholder values
482
+ # resp = client.get_trail_status({
483
+ # name: "String", # required
484
+ # })
485
+ #
486
+ # @example Response structure
487
+ # resp.is_logging #=> Boolean
488
+ # resp.latest_delivery_error #=> String
489
+ # resp.latest_notification_error #=> String
490
+ # resp.latest_delivery_time #=> Time
491
+ # resp.latest_notification_time #=> Time
492
+ # resp.start_logging_time #=> Time
493
+ # resp.stop_logging_time #=> Time
494
+ # resp.latest_cloud_watch_logs_delivery_error #=> String
495
+ # resp.latest_cloud_watch_logs_delivery_time #=> Time
496
+ # resp.latest_digest_delivery_time #=> Time
497
+ # resp.latest_digest_delivery_error #=> String
498
+ # resp.latest_delivery_attempt_time #=> String
499
+ # resp.latest_notification_attempt_time #=> String
500
+ # resp.latest_notification_attempt_succeeded #=> String
501
+ # resp.latest_delivery_attempt_succeeded #=> String
502
+ # resp.time_logging_started #=> String
503
+ # resp.time_logging_stopped #=> String
504
+ # @overload get_trail_status(params = {})
505
+ # @param [Hash] params ({})
506
+ def get_trail_status(params = {}, options = {})
507
+ req = build_request(:get_trail_status, params)
508
+ req.send_request(options)
509
+ end
510
+
511
+ # Returns all public keys whose private keys were used to sign the
512
+ # digest files within the specified time range. The public key is needed
513
+ # to validate digest files that were signed with its corresponding
514
+ # private key.
515
+ #
516
+ # <note markdown="1"> CloudTrail uses different private/public key pairs per region. Each
517
+ # digest file is signed with a private key unique to its region.
518
+ # Therefore, when you validate a digest file from a particular region,
519
+ # you must look in the same region for its corresponding public key.
520
+ #
521
+ # </note>
522
+ # @option params [Time,DateTime,Date,Integer,String] :start_time
523
+ # Optionally specifies, in UTC, the start of the time range to look up
524
+ # public keys for CloudTrail digest files. If not specified, the current
525
+ # time is used, and the current public key is returned.
526
+ # @option params [Time,DateTime,Date,Integer,String] :end_time
527
+ # Optionally specifies, in UTC, the end of the time range to look up
528
+ # public keys for CloudTrail digest files. If not specified, the current
529
+ # time is used.
530
+ # @option params [String] :next_token
531
+ # Reserved for future use.
532
+ # @return [Types::ListPublicKeysResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
533
+ #
534
+ # * {Types::ListPublicKeysResponse#public_key_list #PublicKeyList} => Array&lt;Types::PublicKey&gt;
535
+ # * {Types::ListPublicKeysResponse#next_token #NextToken} => String
536
+ #
537
+ # @example Request syntax with placeholder values
538
+ # resp = client.list_public_keys({
539
+ # start_time: Time.now,
540
+ # end_time: Time.now,
541
+ # next_token: "String",
542
+ # })
543
+ #
544
+ # @example Response structure
545
+ # resp.public_key_list #=> Array
546
+ # resp.public_key_list[0].value #=> String
547
+ # resp.public_key_list[0].validity_start_time #=> Time
548
+ # resp.public_key_list[0].validity_end_time #=> Time
549
+ # resp.public_key_list[0].fingerprint #=> String
550
+ # resp.next_token #=> String
551
+ # @overload list_public_keys(params = {})
552
+ # @param [Hash] params ({})
553
+ def list_public_keys(params = {}, options = {})
554
+ req = build_request(:list_public_keys, params)
555
+ req.send_request(options)
556
+ end
557
+
558
+ # Lists the tags for the trail in the current region.
559
+ # @option params [required, Array<String>] :resource_id_list
560
+ # Specifies a list of trail ARNs whose tags will be listed. The list has
561
+ # a limit of 20 ARNs. The format of a trail ARN is:
562
+ #
563
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
564
+ # @option params [String] :next_token
565
+ # Reserved for future use.
566
+ # @return [Types::ListTagsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
567
+ #
568
+ # * {Types::ListTagsResponse#resource_tag_list #ResourceTagList} => Array&lt;Types::ResourceTag&gt;
569
+ # * {Types::ListTagsResponse#next_token #NextToken} => String
570
+ #
571
+ # @example Request syntax with placeholder values
572
+ # resp = client.list_tags({
573
+ # resource_id_list: ["String"], # required
574
+ # next_token: "String",
575
+ # })
576
+ #
577
+ # @example Response structure
578
+ # resp.resource_tag_list #=> Array
579
+ # resp.resource_tag_list[0].resource_id #=> String
580
+ # resp.resource_tag_list[0].tags_list #=> Array
581
+ # resp.resource_tag_list[0].tags_list[0].key #=> String
582
+ # resp.resource_tag_list[0].tags_list[0].value #=> String
583
+ # resp.next_token #=> String
584
+ # @overload list_tags(params = {})
585
+ # @param [Hash] params ({})
586
+ def list_tags(params = {}, options = {})
587
+ req = build_request(:list_tags, params)
588
+ req.send_request(options)
589
+ end
590
+
591
+ # Looks up API activity events captured by CloudTrail that create,
592
+ # update, or delete resources in your account. Events for a region can
593
+ # be looked up for the times in which you had CloudTrail turned on in
594
+ # that region during the last seven days. Lookup supports the following
595
+ # attributes:
596
+ #
597
+ # * Event ID
598
+ #
599
+ # * Event name
600
+ #
601
+ # * Resource name
602
+ #
603
+ # * Resource type
604
+ #
605
+ # * User name
606
+ #
607
+ # All attributes are optional. The default number of results returned is
608
+ # 10, with a maximum of 50 possible. The response includes a token that
609
+ # you can use to get the next page of results.
610
+ #
611
+ # The rate of lookup requests is limited to one per second per account.
612
+ # If this limit is exceeded, a throttling error occurs.
613
+ #
614
+ # Events that occurred during the selected time range will not be
615
+ # available for lookup if CloudTrail logging was not enabled when the
616
+ # events occurred.
617
+ # @option params [Array<Types::LookupAttribute>] :lookup_attributes
618
+ # Contains a list of lookup attributes. Currently the list can contain
619
+ # only one item.
620
+ # @option params [Time,DateTime,Date,Integer,String] :start_time
621
+ # Specifies that only events that occur after or at the specified time
622
+ # are returned. If the specified start time is after the specified end
623
+ # time, an error is returned.
624
+ # @option params [Time,DateTime,Date,Integer,String] :end_time
625
+ # Specifies that only events that occur before or at the specified time
626
+ # are returned. If the specified end time is before the specified start
627
+ # time, an error is returned.
628
+ # @option params [Integer] :max_results
629
+ # The number of events to return. Possible values are 1 through 50. The
630
+ # default is 10.
631
+ # @option params [String] :next_token
632
+ # The token to use to get the next page of results after a previous API
633
+ # call. This token must be passed in with the same parameters that were
634
+ # specified in the the original call. For example, if the original call
635
+ # specified an AttributeKey of 'Username' with a value of 'root',
636
+ # the call with NextToken should include those same parameters.
637
+ # @return [Types::LookupEventsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
638
+ #
639
+ # * {Types::LookupEventsResponse#events #Events} => Array&lt;Types::Event&gt;
640
+ # * {Types::LookupEventsResponse#next_token #NextToken} => String
641
+ #
642
+ # @example Request syntax with placeholder values
643
+ # resp = client.lookup_events({
644
+ # lookup_attributes: [
645
+ # {
646
+ # attribute_key: "EventId", # required, accepts EventId, EventName, Username, ResourceType, ResourceName, EventSource
647
+ # attribute_value: "String", # required
648
+ # },
649
+ # ],
650
+ # start_time: Time.now,
651
+ # end_time: Time.now,
652
+ # max_results: 1,
653
+ # next_token: "NextToken",
654
+ # })
655
+ #
656
+ # @example Response structure
657
+ # resp.events #=> Array
658
+ # resp.events[0].event_id #=> String
659
+ # resp.events[0].event_name #=> String
660
+ # resp.events[0].event_time #=> Time
661
+ # resp.events[0].event_source #=> String
662
+ # resp.events[0].username #=> String
663
+ # resp.events[0].resources #=> Array
664
+ # resp.events[0].resources[0].resource_type #=> String
665
+ # resp.events[0].resources[0].resource_name #=> String
666
+ # resp.events[0].cloud_trail_event #=> String
667
+ # resp.next_token #=> String
668
+ # @overload lookup_events(params = {})
669
+ # @param [Hash] params ({})
670
+ def lookup_events(params = {}, options = {})
671
+ req = build_request(:lookup_events, params)
672
+ req.send_request(options)
673
+ end
674
+
675
+ # Configures an event selector for your trail. Use event selectors to
676
+ # specify the type of events that you want your trail to log. When an
677
+ # event occurs in your account, CloudTrail evaluates the event selectors
678
+ # in all trails. For each trail, if the event matches any event
679
+ # selector, the trail processes and logs the event. If the event
680
+ # doesn't match any event selector, the trail doesn't log the event.
681
+ #
682
+ # Example
683
+ #
684
+ # 1. You create an event selector for a trail and specify that you want
685
+ # write-only events.
686
+ #
687
+ # 2. The EC2 `GetConsoleOutput` and `RunInstances` API operations occur
688
+ # in your account.
689
+ #
690
+ # 3. CloudTrail evaluates whether the events match your event
691
+ # selectors.
692
+ #
693
+ # 4. The `RunInstances` is a write-only event and it matches your event
694
+ # selector. The trail logs the event.
695
+ #
696
+ # 5. The `GetConsoleOutput` is a read-only event but it doesn't match
697
+ # your event selector. The trail doesn't log the event.
698
+ #
699
+ # The `PutEventSelectors` operation must be called from the region in
700
+ # which the trail was created; otherwise, an
701
+ # `InvalidHomeRegionException` is thrown.
702
+ #
703
+ # You can configure up to five event selectors for each trail. For more
704
+ # information, see [Configuring Event Selectors for Trails][1] in the
705
+ # *AWS CloudTrail User Guide*.
706
+ #
707
+ #
708
+ #
709
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-event-selectors-for-a-trail.html
710
+ # @option params [String] :trail_name
711
+ # Specifies the name of the trail or trail ARN. If you specify a trail
712
+ # name, the string must meet the following requirements:
713
+ #
714
+ # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
715
+ # underscores (\_), or dashes (-)
716
+ #
717
+ # * Start with a letter or number, and end with a letter or number
718
+ #
719
+ # * Be between 3 and 128 characters
720
+ #
721
+ # * Have no adjacent periods, underscores or dashes. Names like
722
+ # `my-_namespace` and `my--namespace` are invalid.
723
+ #
724
+ # * Not be in IP address format (for example, 192.168.5.4)
725
+ #
726
+ # If you specify a trail ARN, it must be in the format:
727
+ #
728
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
729
+ # @option params [Array<Types::EventSelector>] :event_selectors
730
+ # Specifies the settings for your event selectors. You can configure up
731
+ # to five event selectors for a trail.
732
+ # @return [Types::PutEventSelectorsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
733
+ #
734
+ # * {Types::PutEventSelectorsResponse#trail_arn #TrailARN} => String
735
+ # * {Types::PutEventSelectorsResponse#event_selectors #EventSelectors} => Array&lt;Types::EventSelector&gt;
736
+ #
737
+ # @example Request syntax with placeholder values
738
+ # resp = client.put_event_selectors({
739
+ # trail_name: "String",
740
+ # event_selectors: [
741
+ # {
742
+ # read_write_type: "ReadOnly", # accepts ReadOnly, WriteOnly, All
743
+ # include_management_events: false,
744
+ # data_resources: [
745
+ # {
746
+ # type: "String",
747
+ # values: ["String"],
748
+ # },
749
+ # ],
750
+ # },
751
+ # ],
752
+ # })
753
+ #
754
+ # @example Response structure
755
+ # resp.trail_arn #=> String
756
+ # resp.event_selectors #=> Array
757
+ # resp.event_selectors[0].read_write_type #=> String, one of "ReadOnly", "WriteOnly", "All"
758
+ # resp.event_selectors[0].include_management_events #=> Boolean
759
+ # resp.event_selectors[0].data_resources #=> Array
760
+ # resp.event_selectors[0].data_resources[0].type #=> String
761
+ # resp.event_selectors[0].data_resources[0].values #=> Array
762
+ # resp.event_selectors[0].data_resources[0].values[0] #=> String
763
+ # @overload put_event_selectors(params = {})
764
+ # @param [Hash] params ({})
765
+ def put_event_selectors(params = {}, options = {})
766
+ req = build_request(:put_event_selectors, params)
767
+ req.send_request(options)
768
+ end
769
+
770
+ # Removes the specified tags from a trail.
771
+ # @option params [required, String] :resource_id
772
+ # Specifies the ARN of the trail from which tags should be removed. The
773
+ # format of a trail ARN is:
774
+ #
775
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
776
+ # @option params [Array<Types::Tag>] :tags_list
777
+ # Specifies a list of tags to be removed.
778
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
779
+ #
780
+ # @example Request syntax with placeholder values
781
+ # resp = client.remove_tags({
782
+ # resource_id: "String", # required
783
+ # tags_list: [
784
+ # {
785
+ # key: "String", # required
786
+ # value: "String",
787
+ # },
788
+ # ],
789
+ # })
790
+ # @overload remove_tags(params = {})
791
+ # @param [Hash] params ({})
792
+ def remove_tags(params = {}, options = {})
793
+ req = build_request(:remove_tags, params)
794
+ req.send_request(options)
795
+ end
796
+
797
+ # Starts the recording of AWS API calls and log file delivery for a
798
+ # trail. For a trail that is enabled in all regions, this operation must
799
+ # be called from the region in which the trail was created. This
800
+ # operation cannot be called on the shadow trails (replicated trails in
801
+ # other regions) of a trail that is enabled in all regions.
802
+ # @option params [required, String] :name
803
+ # Specifies the name or the CloudTrail ARN of the trail for which
804
+ # CloudTrail logs AWS API calls. The format of a trail ARN is:
805
+ #
806
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
807
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
808
+ #
809
+ # @example Request syntax with placeholder values
810
+ # resp = client.start_logging({
811
+ # name: "String", # required
812
+ # })
813
+ # @overload start_logging(params = {})
814
+ # @param [Hash] params ({})
815
+ def start_logging(params = {}, options = {})
816
+ req = build_request(:start_logging, params)
817
+ req.send_request(options)
818
+ end
819
+
820
+ # Suspends the recording of AWS API calls and log file delivery for the
821
+ # specified trail. Under most circumstances, there is no need to use
822
+ # this action. You can update a trail without stopping it first. This
823
+ # action is the only way to stop recording. For a trail enabled in all
824
+ # regions, this operation must be called from the region in which the
825
+ # trail was created, or an `InvalidHomeRegionException` will occur. This
826
+ # operation cannot be called on the shadow trails (replicated trails in
827
+ # other regions) of a trail enabled in all regions.
828
+ # @option params [required, String] :name
829
+ # Specifies the name or the CloudTrail ARN of the trail for which
830
+ # CloudTrail will stop logging AWS API calls. The format of a trail ARN
831
+ # is:
832
+ #
833
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
834
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
835
+ #
836
+ # @example Request syntax with placeholder values
837
+ # resp = client.stop_logging({
838
+ # name: "String", # required
839
+ # })
840
+ # @overload stop_logging(params = {})
841
+ # @param [Hash] params ({})
842
+ def stop_logging(params = {}, options = {})
843
+ req = build_request(:stop_logging, params)
844
+ req.send_request(options)
845
+ end
846
+
847
+ # Updates the settings that specify delivery of log files. Changes to a
848
+ # trail do not require stopping the CloudTrail service. Use this action
849
+ # to designate an existing bucket for log delivery. If the existing
850
+ # bucket has previously been a target for CloudTrail log files, an IAM
851
+ # policy exists for the bucket. `UpdateTrail` must be called from the
852
+ # region in which the trail was created; otherwise, an
853
+ # `InvalidHomeRegionException` is thrown.
854
+ # @option params [required, String] :name
855
+ # Specifies the name of the trail or trail ARN. If `Name` is a trail
856
+ # name, the string must meet the following requirements:
857
+ #
858
+ # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
859
+ # underscores (\_), or dashes (-)
860
+ #
861
+ # * Start with a letter or number, and end with a letter or number
862
+ #
863
+ # * Be between 3 and 128 characters
864
+ #
865
+ # * Have no adjacent periods, underscores or dashes. Names like
866
+ # `my-_namespace` and `my--namespace` are invalid.
867
+ #
868
+ # * Not be in IP address format (for example, 192.168.5.4)
869
+ #
870
+ # If `Name` is a trail ARN, it must be in the format:
871
+ #
872
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
873
+ # @option params [String] :s3_bucket_name
874
+ # Specifies the name of the Amazon S3 bucket designated for publishing
875
+ # log files. See [Amazon S3 Bucket Naming Requirements][1].
876
+ #
877
+ #
878
+ #
879
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
880
+ # @option params [String] :s3_key_prefix
881
+ # Specifies the Amazon S3 key prefix that comes after the name of the
882
+ # bucket you have designated for log file delivery. For more
883
+ # information, see [Finding Your CloudTrail Log Files][1]. The maximum
884
+ # length is 200 characters.
885
+ #
886
+ #
887
+ #
888
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
889
+ # @option params [String] :sns_topic_name
890
+ # Specifies the name of the Amazon SNS topic defined for notification of
891
+ # log file delivery. The maximum length is 256 characters.
892
+ # @option params [Boolean] :include_global_service_events
893
+ # Specifies whether the trail is publishing events from global services
894
+ # such as IAM to the log files.
895
+ # @option params [Boolean] :is_multi_region_trail
896
+ # Specifies whether the trail applies only to the current region or to
897
+ # all regions. The default is false. If the trail exists only in the
898
+ # current region and this value is set to true, shadow trails
899
+ # (replications of the trail) will be created in the other regions. If
900
+ # the trail exists in all regions and this value is set to false, the
901
+ # trail will remain in the region where it was created, and its shadow
902
+ # trails in other regions will be deleted.
903
+ # @option params [Boolean] :enable_log_file_validation
904
+ # Specifies whether log file validation is enabled. The default is
905
+ # false.
906
+ #
907
+ # <note markdown="1"> When you disable log file integrity validation, the chain of digest
908
+ # files is broken after one hour. CloudTrail will not create digest
909
+ # files for log files that were delivered during a period in which log
910
+ # file integrity validation was disabled. For example, if you enable log
911
+ # file integrity validation at noon on January 1, disable it at noon on
912
+ # January 2, and re-enable it at noon on January 10, digest files will
913
+ # not be created for the log files delivered from noon on January 2 to
914
+ # noon on January 10. The same applies whenever you stop CloudTrail
915
+ # logging or delete a trail.
916
+ #
917
+ # </note>
918
+ # @option params [String] :cloud_watch_logs_log_group_arn
919
+ # Specifies a log group name using an Amazon Resource Name (ARN), a
920
+ # unique identifier that represents the log group to which CloudTrail
921
+ # logs will be delivered. Not required unless you specify
922
+ # CloudWatchLogsRoleArn.
923
+ # @option params [String] :cloud_watch_logs_role_arn
924
+ # Specifies the role for the CloudWatch Logs endpoint to assume to write
925
+ # to a user's log group.
926
+ # @option params [String] :kms_key_id
927
+ # Specifies the KMS key ID to use to encrypt the logs delivered by
928
+ # CloudTrail. The value can be a an alias name prefixed by "alias/", a
929
+ # fully specified ARN to an alias, a fully specified ARN to a key, or a
930
+ # globally unique identifier.
931
+ #
932
+ # Examples:
933
+ #
934
+ # * alias/MyAliasName
935
+ #
936
+ # * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
937
+ #
938
+ # * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
939
+ #
940
+ # * 12345678-1234-1234-1234-123456789012
941
+ # @return [Types::UpdateTrailResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
942
+ #
943
+ # * {Types::UpdateTrailResponse#name #Name} => String
944
+ # * {Types::UpdateTrailResponse#s3_bucket_name #S3BucketName} => String
945
+ # * {Types::UpdateTrailResponse#s3_key_prefix #S3KeyPrefix} => String
946
+ # * {Types::UpdateTrailResponse#sns_topic_name #SnsTopicName} => String
947
+ # * {Types::UpdateTrailResponse#sns_topic_arn #SnsTopicARN} => String
948
+ # * {Types::UpdateTrailResponse#include_global_service_events #IncludeGlobalServiceEvents} => Boolean
949
+ # * {Types::UpdateTrailResponse#is_multi_region_trail #IsMultiRegionTrail} => Boolean
950
+ # * {Types::UpdateTrailResponse#trail_arn #TrailARN} => String
951
+ # * {Types::UpdateTrailResponse#log_file_validation_enabled #LogFileValidationEnabled} => Boolean
952
+ # * {Types::UpdateTrailResponse#cloud_watch_logs_log_group_arn #CloudWatchLogsLogGroupArn} => String
953
+ # * {Types::UpdateTrailResponse#cloud_watch_logs_role_arn #CloudWatchLogsRoleArn} => String
954
+ # * {Types::UpdateTrailResponse#kms_key_id #KmsKeyId} => String
955
+ #
956
+ # @example Request syntax with placeholder values
957
+ # resp = client.update_trail({
958
+ # name: "String", # required
959
+ # s3_bucket_name: "String",
960
+ # s3_key_prefix: "String",
961
+ # sns_topic_name: "String",
962
+ # include_global_service_events: false,
963
+ # is_multi_region_trail: false,
964
+ # enable_log_file_validation: false,
965
+ # cloud_watch_logs_log_group_arn: "String",
966
+ # cloud_watch_logs_role_arn: "String",
967
+ # kms_key_id: "String",
968
+ # })
969
+ #
970
+ # @example Response structure
971
+ # resp.name #=> String
972
+ # resp.s3_bucket_name #=> String
973
+ # resp.s3_key_prefix #=> String
974
+ # resp.sns_topic_name #=> String
975
+ # resp.sns_topic_arn #=> String
976
+ # resp.include_global_service_events #=> Boolean
977
+ # resp.is_multi_region_trail #=> Boolean
978
+ # resp.trail_arn #=> String
979
+ # resp.log_file_validation_enabled #=> Boolean
980
+ # resp.cloud_watch_logs_log_group_arn #=> String
981
+ # resp.cloud_watch_logs_role_arn #=> String
982
+ # resp.kms_key_id #=> String
983
+ # @overload update_trail(params = {})
984
+ # @param [Hash] params ({})
985
+ def update_trail(params = {}, options = {})
986
+ req = build_request(:update_trail, params)
987
+ req.send_request(options)
988
+ end
989
+
990
+ # @!endgroup
991
+
992
+ # @param params ({})
993
+ # @api private
994
+ def build_request(operation_name, params = {})
995
+ handlers = @handlers.for(operation_name)
996
+ context = Seahorse::Client::RequestContext.new(
997
+ operation_name: operation_name,
998
+ operation: config.api.operation(operation_name),
999
+ client: self,
1000
+ params: params,
1001
+ config: config)
1002
+ context[:gem_name] = 'aws-sdk-cloudtrail'
1003
+ context[:gem_version] = '1.0.0.rc1'
1004
+ Seahorse::Client::Request.new(handlers, context)
1005
+ end
1006
+
1007
+ # @api private
1008
+ # @deprecated
1009
+ def waiter_names
1010
+ []
1011
+ end
1012
+
1013
+ class << self
1014
+
1015
+ # @api private
1016
+ attr_reader :identifier
1017
+
1018
+ # @api private
1019
+ def errors_module
1020
+ Errors
1021
+ end
1022
+
1023
+ end
1024
+ end
1025
+ end
1026
+ end