aws-sdk-cloudtrail 1.18.0 → 1.19.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 +4 -4
- data/lib/aws-sdk-cloudtrail.rb +1 -1
- data/lib/aws-sdk-cloudtrail/client.rb +110 -22
- data/lib/aws-sdk-cloudtrail/client_api.rb +65 -0
- data/lib/aws-sdk-cloudtrail/types.rb +135 -39
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6895c447d0feae813da5dc055dac76e59f266a08
|
4
|
+
data.tar.gz: 31ecefd18da65a7489e73aab3ad2af32af118846
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6a4f7937fe8895ca01284ca5807be215fa81147ea77e22c702e32b5303d1eb437d17f8156fd6aadd88e7d8af1a5c204f2c486f2c83d11bd922e7c03f2c63662
|
7
|
+
data.tar.gz: 66ec1893d9a4b30683f9fa03eed0db42d4615df816208d53baf9bad8ce8d69448bbab4e4407686c7d297650a75f99a42e42a83168c669ae5a0c2e55444c228ce
|
data/lib/aws-sdk-cloudtrail.rb
CHANGED
@@ -264,12 +264,14 @@ module Aws::CloudTrail
|
|
264
264
|
|
265
265
|
# @!group API Operations
|
266
266
|
|
267
|
-
# Adds one or more tags to a trail, up to a limit of 50.
|
268
|
-
#
|
269
|
-
#
|
270
|
-
#
|
271
|
-
#
|
272
|
-
#
|
267
|
+
# Adds one or more tags to a trail, up to a limit of 50. Overwrites an
|
268
|
+
# existing tag's value when a new value is specified for an existing
|
269
|
+
# tag key. Tag key names must be unique for a trail; you cannot have two
|
270
|
+
# keys with the same name but different values. If you specify a key
|
271
|
+
# without a value, the tag will be created with the specified key and a
|
272
|
+
# value of null. You can tag a trail that applies to all AWS Regions
|
273
|
+
# only from the Region in which the trail was created (also known as its
|
274
|
+
# home region).
|
273
275
|
#
|
274
276
|
# @option params [required, String] :resource_id
|
275
277
|
# Specifies the ARN of the trail to which one or more tags will be
|
@@ -304,8 +306,7 @@ module Aws::CloudTrail
|
|
304
306
|
end
|
305
307
|
|
306
308
|
# Creates a trail that specifies the settings for delivery of log data
|
307
|
-
# to an Amazon S3 bucket.
|
308
|
-
# region, irrespective of the region in which they were created.
|
309
|
+
# to an Amazon S3 bucket.
|
309
310
|
#
|
310
311
|
# @option params [required, String] :name
|
311
312
|
# Specifies the name of the trail. The name must meet the following
|
@@ -329,7 +330,7 @@ module Aws::CloudTrail
|
|
329
330
|
#
|
330
331
|
#
|
331
332
|
#
|
332
|
-
# [1]:
|
333
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
|
333
334
|
#
|
334
335
|
# @option params [String] :s3_key_prefix
|
335
336
|
# Specifies the Amazon S3 key prefix that comes after the name of the
|
@@ -339,7 +340,7 @@ module Aws::CloudTrail
|
|
339
340
|
#
|
340
341
|
#
|
341
342
|
#
|
342
|
-
# [1]:
|
343
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
|
343
344
|
#
|
344
345
|
# @option params [String] :sns_topic_name
|
345
346
|
# Specifies the name of the Amazon SNS topic defined for notification of
|
@@ -351,7 +352,9 @@ module Aws::CloudTrail
|
|
351
352
|
#
|
352
353
|
# @option params [Boolean] :is_multi_region_trail
|
353
354
|
# Specifies whether the trail is created in the current region or in all
|
354
|
-
# regions. The default is false
|
355
|
+
# regions. The default is false, which creates a trail only in the
|
356
|
+
# region where you are signed in. As a best practice, consider creating
|
357
|
+
# trails that log events in all regions.
|
355
358
|
#
|
356
359
|
# @option params [Boolean] :enable_log_file_validation
|
357
360
|
# Specifies whether log file integrity validation is enabled. The
|
@@ -402,6 +405,9 @@ module Aws::CloudTrail
|
|
402
405
|
# made on behalf of an AWS account that is the master account for an
|
403
406
|
# organization in AWS Organizations.
|
404
407
|
#
|
408
|
+
# @option params [Array<Types::Tag>] :tags_list
|
409
|
+
# A list of tags.
|
410
|
+
#
|
405
411
|
# @return [Types::CreateTrailResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
406
412
|
#
|
407
413
|
# * {Types::CreateTrailResponse#name #name} => String
|
@@ -432,6 +438,12 @@ module Aws::CloudTrail
|
|
432
438
|
# cloud_watch_logs_role_arn: "String",
|
433
439
|
# kms_key_id: "String",
|
434
440
|
# is_organization_trail: false,
|
441
|
+
# tags_list: [
|
442
|
+
# {
|
443
|
+
# key: "String", # required
|
444
|
+
# value: "String",
|
445
|
+
# },
|
446
|
+
# ],
|
435
447
|
# })
|
436
448
|
#
|
437
449
|
# @example Response structure
|
@@ -486,8 +498,8 @@ module Aws::CloudTrail
|
|
486
498
|
req.send_request(options)
|
487
499
|
end
|
488
500
|
|
489
|
-
# Retrieves settings for
|
490
|
-
# for your account.
|
501
|
+
# Retrieves settings for one or more trails associated with the current
|
502
|
+
# region for your account.
|
491
503
|
#
|
492
504
|
# @option params [Array<String>] :trail_name_list
|
493
505
|
# Specifies a list of trail names, trail ARNs, or both, of the trails to
|
@@ -577,7 +589,7 @@ module Aws::CloudTrail
|
|
577
589
|
#
|
578
590
|
#
|
579
591
|
#
|
580
|
-
# [1]:
|
592
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html
|
581
593
|
#
|
582
594
|
# @option params [required, String] :trail_name
|
583
595
|
# Specifies the name of the trail or trail ARN. If you specify a trail
|
@@ -630,6 +642,49 @@ module Aws::CloudTrail
|
|
630
642
|
req.send_request(options)
|
631
643
|
end
|
632
644
|
|
645
|
+
# Returns settings information for a specified trail.
|
646
|
+
#
|
647
|
+
# @option params [required, String] :name
|
648
|
+
# The name or the Amazon Resource Name (ARN) of the trail for which you
|
649
|
+
# want to retrieve settings information.
|
650
|
+
#
|
651
|
+
# @return [Types::GetTrailResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
652
|
+
#
|
653
|
+
# * {Types::GetTrailResponse#trail #trail} => Types::Trail
|
654
|
+
#
|
655
|
+
# @example Request syntax with placeholder values
|
656
|
+
#
|
657
|
+
# resp = client.get_trail({
|
658
|
+
# name: "String", # required
|
659
|
+
# })
|
660
|
+
#
|
661
|
+
# @example Response structure
|
662
|
+
#
|
663
|
+
# resp.trail.name #=> String
|
664
|
+
# resp.trail.s3_bucket_name #=> String
|
665
|
+
# resp.trail.s3_key_prefix #=> String
|
666
|
+
# resp.trail.sns_topic_name #=> String
|
667
|
+
# resp.trail.sns_topic_arn #=> String
|
668
|
+
# resp.trail.include_global_service_events #=> Boolean
|
669
|
+
# resp.trail.is_multi_region_trail #=> Boolean
|
670
|
+
# resp.trail.home_region #=> String
|
671
|
+
# resp.trail.trail_arn #=> String
|
672
|
+
# resp.trail.log_file_validation_enabled #=> Boolean
|
673
|
+
# resp.trail.cloud_watch_logs_log_group_arn #=> String
|
674
|
+
# resp.trail.cloud_watch_logs_role_arn #=> String
|
675
|
+
# resp.trail.kms_key_id #=> String
|
676
|
+
# resp.trail.has_custom_event_selectors #=> Boolean
|
677
|
+
# resp.trail.is_organization_trail #=> Boolean
|
678
|
+
#
|
679
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail AWS API Documentation
|
680
|
+
#
|
681
|
+
# @overload get_trail(params = {})
|
682
|
+
# @param [Hash] params ({})
|
683
|
+
def get_trail(params = {}, options = {})
|
684
|
+
req = build_request(:get_trail, params)
|
685
|
+
req.send_request(options)
|
686
|
+
end
|
687
|
+
|
633
688
|
# Returns a JSON-formatted list of information about the specified
|
634
689
|
# trail. Fields include information on delivery errors, Amazon SNS and
|
635
690
|
# Amazon S3 errors, and start and stop logging times for each trail.
|
@@ -797,8 +852,40 @@ module Aws::CloudTrail
|
|
797
852
|
req.send_request(options)
|
798
853
|
end
|
799
854
|
|
800
|
-
#
|
801
|
-
#
|
855
|
+
# Lists trails that are in the current account.
|
856
|
+
#
|
857
|
+
# @option params [String] :next_token
|
858
|
+
#
|
859
|
+
# @return [Types::ListTrailsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
860
|
+
#
|
861
|
+
# * {Types::ListTrailsResponse#trails #trails} => Array<Types::TrailInfo>
|
862
|
+
# * {Types::ListTrailsResponse#next_token #next_token} => String
|
863
|
+
#
|
864
|
+
# @example Request syntax with placeholder values
|
865
|
+
#
|
866
|
+
# resp = client.list_trails({
|
867
|
+
# next_token: "String",
|
868
|
+
# })
|
869
|
+
#
|
870
|
+
# @example Response structure
|
871
|
+
#
|
872
|
+
# resp.trails #=> Array
|
873
|
+
# resp.trails[0].trail_arn #=> String
|
874
|
+
# resp.trails[0].name #=> String
|
875
|
+
# resp.trails[0].home_region #=> String
|
876
|
+
# resp.next_token #=> String
|
877
|
+
#
|
878
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails AWS API Documentation
|
879
|
+
#
|
880
|
+
# @overload list_trails(params = {})
|
881
|
+
# @param [Hash] params ({})
|
882
|
+
def list_trails(params = {}, options = {})
|
883
|
+
req = build_request(:list_trails, params)
|
884
|
+
req.send_request(options)
|
885
|
+
end
|
886
|
+
|
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
|
802
889
|
# supports the following attributes:
|
803
890
|
#
|
804
891
|
# * AWS access key
|
@@ -824,7 +911,7 @@ module Aws::CloudTrail
|
|
824
911
|
# The rate of lookup requests is limited to one per second per account.
|
825
912
|
# If this limit is exceeded, a throttling error occurs.
|
826
913
|
#
|
827
|
-
#
|
914
|
+
# Events that occurred during the selected time range will not be
|
828
915
|
# available for lookup if CloudTrail logging was not enabled when the
|
829
916
|
# events occurred.
|
830
917
|
#
|
@@ -940,7 +1027,7 @@ module Aws::CloudTrail
|
|
940
1027
|
#
|
941
1028
|
#
|
942
1029
|
#
|
943
|
-
# [1]:
|
1030
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html
|
944
1031
|
# [2]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html
|
945
1032
|
#
|
946
1033
|
# @option params [required, String] :trail_name
|
@@ -1140,7 +1227,7 @@ module Aws::CloudTrail
|
|
1140
1227
|
#
|
1141
1228
|
#
|
1142
1229
|
#
|
1143
|
-
# [1]:
|
1230
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
|
1144
1231
|
#
|
1145
1232
|
# @option params [String] :s3_key_prefix
|
1146
1233
|
# Specifies the Amazon S3 key prefix that comes after the name of the
|
@@ -1150,7 +1237,7 @@ module Aws::CloudTrail
|
|
1150
1237
|
#
|
1151
1238
|
#
|
1152
1239
|
#
|
1153
|
-
# [1]:
|
1240
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
|
1154
1241
|
#
|
1155
1242
|
# @option params [String] :sns_topic_name
|
1156
1243
|
# Specifies the name of the Amazon SNS topic defined for notification of
|
@@ -1167,7 +1254,8 @@ module Aws::CloudTrail
|
|
1167
1254
|
# (replications of the trail) will be created in the other regions. If
|
1168
1255
|
# the trail exists in all regions and this value is set to false, the
|
1169
1256
|
# trail will remain in the region where it was created, and its shadow
|
1170
|
-
# trails in other regions will be deleted.
|
1257
|
+
# trails in other regions will be deleted. As a best practice, consider
|
1258
|
+
# using trails that log events in all regions.
|
1171
1259
|
#
|
1172
1260
|
# @option params [Boolean] :enable_log_file_validation
|
1173
1261
|
# Specifies whether log file validation is enabled. The default is
|
@@ -1293,7 +1381,7 @@ module Aws::CloudTrail
|
|
1293
1381
|
params: params,
|
1294
1382
|
config: config)
|
1295
1383
|
context[:gem_name] = 'aws-sdk-cloudtrail'
|
1296
|
-
context[:gem_version] = '1.
|
1384
|
+
context[:gem_version] = '1.19.0'
|
1297
1385
|
Seahorse::Client::Request.new(handlers, context)
|
1298
1386
|
end
|
1299
1387
|
|
@@ -34,6 +34,8 @@ module Aws::CloudTrail
|
|
34
34
|
EventsList = Shapes::ListShape.new(name: 'EventsList')
|
35
35
|
GetEventSelectorsRequest = Shapes::StructureShape.new(name: 'GetEventSelectorsRequest')
|
36
36
|
GetEventSelectorsResponse = Shapes::StructureShape.new(name: 'GetEventSelectorsResponse')
|
37
|
+
GetTrailRequest = Shapes::StructureShape.new(name: 'GetTrailRequest')
|
38
|
+
GetTrailResponse = Shapes::StructureShape.new(name: 'GetTrailResponse')
|
37
39
|
GetTrailStatusRequest = Shapes::StructureShape.new(name: 'GetTrailStatusRequest')
|
38
40
|
GetTrailStatusResponse = Shapes::StructureShape.new(name: 'GetTrailStatusResponse')
|
39
41
|
InsufficientDependencyServiceAccessPermissionException = Shapes::StructureShape.new(name: 'InsufficientDependencyServiceAccessPermissionException')
|
@@ -63,6 +65,8 @@ module Aws::CloudTrail
|
|
63
65
|
ListPublicKeysResponse = Shapes::StructureShape.new(name: 'ListPublicKeysResponse')
|
64
66
|
ListTagsRequest = Shapes::StructureShape.new(name: 'ListTagsRequest')
|
65
67
|
ListTagsResponse = Shapes::StructureShape.new(name: 'ListTagsResponse')
|
68
|
+
ListTrailsRequest = Shapes::StructureShape.new(name: 'ListTrailsRequest')
|
69
|
+
ListTrailsResponse = Shapes::StructureShape.new(name: 'ListTrailsResponse')
|
66
70
|
LookupAttribute = Shapes::StructureShape.new(name: 'LookupAttribute')
|
67
71
|
LookupAttributeKey = Shapes::StringShape.new(name: 'LookupAttributeKey')
|
68
72
|
LookupAttributesList = Shapes::ListShape.new(name: 'LookupAttributesList')
|
@@ -100,10 +104,12 @@ module Aws::CloudTrail
|
|
100
104
|
TagsList = Shapes::ListShape.new(name: 'TagsList')
|
101
105
|
Trail = Shapes::StructureShape.new(name: 'Trail')
|
102
106
|
TrailAlreadyExistsException = Shapes::StructureShape.new(name: 'TrailAlreadyExistsException')
|
107
|
+
TrailInfo = Shapes::StructureShape.new(name: 'TrailInfo')
|
103
108
|
TrailList = Shapes::ListShape.new(name: 'TrailList')
|
104
109
|
TrailNameList = Shapes::ListShape.new(name: 'TrailNameList')
|
105
110
|
TrailNotFoundException = Shapes::StructureShape.new(name: 'TrailNotFoundException')
|
106
111
|
TrailNotProvidedException = Shapes::StructureShape.new(name: 'TrailNotProvidedException')
|
112
|
+
Trails = Shapes::ListShape.new(name: 'Trails')
|
107
113
|
UnsupportedOperationException = Shapes::StructureShape.new(name: 'UnsupportedOperationException')
|
108
114
|
UpdateTrailRequest = Shapes::StructureShape.new(name: 'UpdateTrailRequest')
|
109
115
|
UpdateTrailResponse = Shapes::StructureShape.new(name: 'UpdateTrailResponse')
|
@@ -125,6 +131,7 @@ module Aws::CloudTrail
|
|
125
131
|
CreateTrailRequest.add_member(:cloud_watch_logs_role_arn, Shapes::ShapeRef.new(shape: String, location_name: "CloudWatchLogsRoleArn"))
|
126
132
|
CreateTrailRequest.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: String, location_name: "KmsKeyId"))
|
127
133
|
CreateTrailRequest.add_member(:is_organization_trail, Shapes::ShapeRef.new(shape: Boolean, location_name: "IsOrganizationTrail"))
|
134
|
+
CreateTrailRequest.add_member(:tags_list, Shapes::ShapeRef.new(shape: TagsList, location_name: "TagsList"))
|
128
135
|
CreateTrailRequest.struct_class = Types::CreateTrailRequest
|
129
136
|
|
130
137
|
CreateTrailResponse.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "Name"))
|
@@ -189,6 +196,12 @@ module Aws::CloudTrail
|
|
189
196
|
GetEventSelectorsResponse.add_member(:event_selectors, Shapes::ShapeRef.new(shape: EventSelectors, location_name: "EventSelectors"))
|
190
197
|
GetEventSelectorsResponse.struct_class = Types::GetEventSelectorsResponse
|
191
198
|
|
199
|
+
GetTrailRequest.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Name"))
|
200
|
+
GetTrailRequest.struct_class = Types::GetTrailRequest
|
201
|
+
|
202
|
+
GetTrailResponse.add_member(:trail, Shapes::ShapeRef.new(shape: Trail, location_name: "Trail"))
|
203
|
+
GetTrailResponse.struct_class = Types::GetTrailResponse
|
204
|
+
|
192
205
|
GetTrailStatusRequest.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Name"))
|
193
206
|
GetTrailStatusRequest.struct_class = Types::GetTrailStatusRequest
|
194
207
|
|
@@ -228,6 +241,13 @@ module Aws::CloudTrail
|
|
228
241
|
ListTagsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
229
242
|
ListTagsResponse.struct_class = Types::ListTagsResponse
|
230
243
|
|
244
|
+
ListTrailsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
245
|
+
ListTrailsRequest.struct_class = Types::ListTrailsRequest
|
246
|
+
|
247
|
+
ListTrailsResponse.add_member(:trails, Shapes::ShapeRef.new(shape: Trails, location_name: "Trails"))
|
248
|
+
ListTrailsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
249
|
+
ListTrailsResponse.struct_class = Types::ListTrailsResponse
|
250
|
+
|
231
251
|
LookupAttribute.add_member(:attribute_key, Shapes::ShapeRef.new(shape: LookupAttributeKey, required: true, location_name: "AttributeKey"))
|
232
252
|
LookupAttribute.add_member(:attribute_value, Shapes::ShapeRef.new(shape: String, required: true, location_name: "AttributeValue"))
|
233
253
|
LookupAttribute.struct_class = Types::LookupAttribute
|
@@ -314,10 +334,17 @@ module Aws::CloudTrail
|
|
314
334
|
Trail.add_member(:is_organization_trail, Shapes::ShapeRef.new(shape: Boolean, location_name: "IsOrganizationTrail"))
|
315
335
|
Trail.struct_class = Types::Trail
|
316
336
|
|
337
|
+
TrailInfo.add_member(:trail_arn, Shapes::ShapeRef.new(shape: String, location_name: "TrailARN"))
|
338
|
+
TrailInfo.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "Name"))
|
339
|
+
TrailInfo.add_member(:home_region, Shapes::ShapeRef.new(shape: String, location_name: "HomeRegion"))
|
340
|
+
TrailInfo.struct_class = Types::TrailInfo
|
341
|
+
|
317
342
|
TrailList.member = Shapes::ShapeRef.new(shape: Trail)
|
318
343
|
|
319
344
|
TrailNameList.member = Shapes::ShapeRef.new(shape: String)
|
320
345
|
|
346
|
+
Trails.member = Shapes::ShapeRef.new(shape: TrailInfo)
|
347
|
+
|
321
348
|
UpdateTrailRequest.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Name"))
|
322
349
|
UpdateTrailRequest.add_member(:s3_bucket_name, Shapes::ShapeRef.new(shape: String, location_name: "S3BucketName"))
|
323
350
|
UpdateTrailRequest.add_member(:s3_key_prefix, Shapes::ShapeRef.new(shape: String, location_name: "S3KeyPrefix"))
|
@@ -407,6 +434,7 @@ module Aws::CloudTrail
|
|
407
434
|
o.errors << Shapes::ShapeRef.new(shape: InvalidCloudWatchLogsLogGroupArnException)
|
408
435
|
o.errors << Shapes::ShapeRef.new(shape: InvalidCloudWatchLogsRoleArnException)
|
409
436
|
o.errors << Shapes::ShapeRef.new(shape: CloudWatchLogsDeliveryUnavailableException)
|
437
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidTagParameterException)
|
410
438
|
o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
|
411
439
|
o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
|
412
440
|
o.errors << Shapes::ShapeRef.new(shape: CloudTrailAccessNotEnabledException)
|
@@ -453,6 +481,18 @@ module Aws::CloudTrail
|
|
453
481
|
o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
|
454
482
|
end)
|
455
483
|
|
484
|
+
api.add_operation(:get_trail, Seahorse::Model::Operation.new.tap do |o|
|
485
|
+
o.name = "GetTrail"
|
486
|
+
o.http_method = "POST"
|
487
|
+
o.http_request_uri = "/"
|
488
|
+
o.input = Shapes::ShapeRef.new(shape: GetTrailRequest)
|
489
|
+
o.output = Shapes::ShapeRef.new(shape: GetTrailResponse)
|
490
|
+
o.errors << Shapes::ShapeRef.new(shape: TrailNotFoundException)
|
491
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidTrailNameException)
|
492
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
|
493
|
+
o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
|
494
|
+
end)
|
495
|
+
|
456
496
|
api.add_operation(:get_trail_status, Seahorse::Model::Operation.new.tap do |o|
|
457
497
|
o.name = "GetTrailStatus"
|
458
498
|
o.http_method = "POST"
|
@@ -473,6 +513,11 @@ module Aws::CloudTrail
|
|
473
513
|
o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
|
474
514
|
o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
|
475
515
|
o.errors << Shapes::ShapeRef.new(shape: InvalidTokenException)
|
516
|
+
o[:pager] = Aws::Pager.new(
|
517
|
+
tokens: {
|
518
|
+
"next_token" => "next_token"
|
519
|
+
}
|
520
|
+
)
|
476
521
|
end)
|
477
522
|
|
478
523
|
api.add_operation(:list_tags, Seahorse::Model::Operation.new.tap do |o|
|
@@ -488,6 +533,26 @@ module Aws::CloudTrail
|
|
488
533
|
o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
|
489
534
|
o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
|
490
535
|
o.errors << Shapes::ShapeRef.new(shape: InvalidTokenException)
|
536
|
+
o[:pager] = Aws::Pager.new(
|
537
|
+
tokens: {
|
538
|
+
"next_token" => "next_token"
|
539
|
+
}
|
540
|
+
)
|
541
|
+
end)
|
542
|
+
|
543
|
+
api.add_operation(:list_trails, Seahorse::Model::Operation.new.tap do |o|
|
544
|
+
o.name = "ListTrails"
|
545
|
+
o.http_method = "POST"
|
546
|
+
o.http_request_uri = "/"
|
547
|
+
o.input = Shapes::ShapeRef.new(shape: ListTrailsRequest)
|
548
|
+
o.output = Shapes::ShapeRef.new(shape: ListTrailsResponse)
|
549
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
|
550
|
+
o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
|
551
|
+
o[:pager] = Aws::Pager.new(
|
552
|
+
tokens: {
|
553
|
+
"next_token" => "next_token"
|
554
|
+
}
|
555
|
+
)
|
491
556
|
end)
|
492
557
|
|
493
558
|
api.add_operation(:lookup_events, Seahorse::Model::Operation.new.tap do |o|
|
@@ -66,6 +66,12 @@ module Aws::CloudTrail
|
|
66
66
|
# cloud_watch_logs_role_arn: "String",
|
67
67
|
# kms_key_id: "String",
|
68
68
|
# is_organization_trail: false,
|
69
|
+
# tags_list: [
|
70
|
+
# {
|
71
|
+
# key: "String", # required
|
72
|
+
# value: "String",
|
73
|
+
# },
|
74
|
+
# ],
|
69
75
|
# }
|
70
76
|
#
|
71
77
|
# @!attribute [rw] name
|
@@ -91,7 +97,7 @@ module Aws::CloudTrail
|
|
91
97
|
#
|
92
98
|
#
|
93
99
|
#
|
94
|
-
# [1]:
|
100
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
|
95
101
|
# @return [String]
|
96
102
|
#
|
97
103
|
# @!attribute [rw] s3_key_prefix
|
@@ -102,7 +108,7 @@ module Aws::CloudTrail
|
|
102
108
|
#
|
103
109
|
#
|
104
110
|
#
|
105
|
-
# [1]:
|
111
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
|
106
112
|
# @return [String]
|
107
113
|
#
|
108
114
|
# @!attribute [rw] sns_topic_name
|
@@ -117,7 +123,9 @@ module Aws::CloudTrail
|
|
117
123
|
#
|
118
124
|
# @!attribute [rw] is_multi_region_trail
|
119
125
|
# Specifies whether the trail is created in the current region or in
|
120
|
-
# all regions. The default is false
|
126
|
+
# all regions. The default is false, which creates a trail only in the
|
127
|
+
# region where you are signed in. As a best practice, consider
|
128
|
+
# creating trails that log events in all regions.
|
121
129
|
# @return [Boolean]
|
122
130
|
#
|
123
131
|
# @!attribute [rw] enable_log_file_validation
|
@@ -174,6 +182,10 @@ module Aws::CloudTrail
|
|
174
182
|
# organization in AWS Organizations.
|
175
183
|
# @return [Boolean]
|
176
184
|
#
|
185
|
+
# @!attribute [rw] tags_list
|
186
|
+
# A list of tags.
|
187
|
+
# @return [Array<Types::Tag>]
|
188
|
+
#
|
177
189
|
# @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrailRequest AWS API Documentation
|
178
190
|
#
|
179
191
|
class CreateTrailRequest < Struct.new(
|
@@ -187,7 +199,8 @@ module Aws::CloudTrail
|
|
187
199
|
:cloud_watch_logs_log_group_arn,
|
188
200
|
:cloud_watch_logs_role_arn,
|
189
201
|
:kms_key_id,
|
190
|
-
:is_organization_trail
|
202
|
+
:is_organization_trail,
|
203
|
+
:tags_list)
|
191
204
|
include Aws::Structure
|
192
205
|
end
|
193
206
|
|
@@ -210,11 +223,11 @@ module Aws::CloudTrail
|
|
210
223
|
#
|
211
224
|
#
|
212
225
|
#
|
213
|
-
# [1]:
|
226
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
|
214
227
|
# @return [String]
|
215
228
|
#
|
216
229
|
# @!attribute [rw] sns_topic_name
|
217
|
-
# This field is
|
230
|
+
# This field is no longer in use. Use SnsTopicARN.
|
218
231
|
# @return [String]
|
219
232
|
#
|
220
233
|
# @!attribute [rw] sns_topic_arn
|
@@ -300,7 +313,7 @@ module Aws::CloudTrail
|
|
300
313
|
#
|
301
314
|
# The following example demonstrates how logging works when you
|
302
315
|
# configure logging of all data events for an S3 bucket named
|
303
|
-
# `bucket-1`. In this example, the CloudTrail user
|
316
|
+
# `bucket-1`. In this example, the CloudTrail user specified an empty
|
304
317
|
# prefix, and the option to log both `Read` and `Write` data events.
|
305
318
|
#
|
306
319
|
# 1. A user uploads an image file to `bucket-1`.
|
@@ -364,11 +377,6 @@ module Aws::CloudTrail
|
|
364
377
|
#
|
365
378
|
# </note>
|
366
379
|
#
|
367
|
-
# * To log data events for all objects in all S3 buckets that include
|
368
|
-
# *my-bucket* in their names, specify the prefix as
|
369
|
-
# `aws:s3:::my-bucket`. The trail logs data events for all objects
|
370
|
-
# in all buckets whose name contains a match for *my-bucket*.
|
371
|
-
#
|
372
380
|
# * To log data events for all objects in an S3 bucket, specify the
|
373
381
|
# bucket and an empty object prefix such as
|
374
382
|
# `arn:aws:s3:::bucket-1/`. The trail logs data events for all
|
@@ -388,11 +396,11 @@ module Aws::CloudTrail
|
|
388
396
|
#
|
389
397
|
# </note>
|
390
398
|
#
|
391
|
-
# * To log data
|
399
|
+
# * To log data events for a specific Lambda function, specify the
|
392
400
|
# function ARN.
|
393
401
|
#
|
394
|
-
# <note markdown="1"> Lambda function ARNs are exact.
|
395
|
-
#
|
402
|
+
# <note markdown="1"> Lambda function ARNs are exact. For example, if you specify a
|
403
|
+
# function ARN
|
396
404
|
# *arn:aws:lambda:us-west-2:111111111111:function:helloworld*, data
|
397
405
|
# events will only be logged for
|
398
406
|
# *arn:aws:lambda:us-west-2:111111111111:function:helloworld*. They
|
@@ -608,7 +616,7 @@ module Aws::CloudTrail
|
|
608
616
|
#
|
609
617
|
#
|
610
618
|
#
|
611
|
-
# [1]:
|
619
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-management-events
|
612
620
|
# @return [Boolean]
|
613
621
|
#
|
614
622
|
# @!attribute [rw] data_resources
|
@@ -624,7 +632,7 @@ module Aws::CloudTrail
|
|
624
632
|
#
|
625
633
|
#
|
626
634
|
#
|
627
|
-
# [1]:
|
635
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-data-events
|
628
636
|
# [2]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html
|
629
637
|
# @return [Array<Types::DataResource>]
|
630
638
|
#
|
@@ -688,6 +696,36 @@ module Aws::CloudTrail
|
|
688
696
|
include Aws::Structure
|
689
697
|
end
|
690
698
|
|
699
|
+
# @note When making an API call, you may pass GetTrailRequest
|
700
|
+
# data as a hash:
|
701
|
+
#
|
702
|
+
# {
|
703
|
+
# name: "String", # required
|
704
|
+
# }
|
705
|
+
#
|
706
|
+
# @!attribute [rw] name
|
707
|
+
# The name or the Amazon Resource Name (ARN) of the trail for which
|
708
|
+
# you want to retrieve settings information.
|
709
|
+
# @return [String]
|
710
|
+
#
|
711
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailRequest AWS API Documentation
|
712
|
+
#
|
713
|
+
class GetTrailRequest < Struct.new(
|
714
|
+
:name)
|
715
|
+
include Aws::Structure
|
716
|
+
end
|
717
|
+
|
718
|
+
# @!attribute [rw] trail
|
719
|
+
# The settings for a trail.
|
720
|
+
# @return [Types::Trail]
|
721
|
+
#
|
722
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailResponse AWS API Documentation
|
723
|
+
#
|
724
|
+
class GetTrailResponse < Struct.new(
|
725
|
+
:trail)
|
726
|
+
include Aws::Structure
|
727
|
+
end
|
728
|
+
|
691
729
|
# The name of a trail about which you want the current status.
|
692
730
|
#
|
693
731
|
# @note When making an API call, you may pass GetTrailStatusRequest
|
@@ -736,7 +774,7 @@ module Aws::CloudTrail
|
|
736
774
|
#
|
737
775
|
#
|
738
776
|
#
|
739
|
-
# [1]:
|
777
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
|
740
778
|
# @return [String]
|
741
779
|
#
|
742
780
|
# @!attribute [rw] latest_notification_error
|
@@ -746,7 +784,7 @@ module Aws::CloudTrail
|
|
746
784
|
#
|
747
785
|
#
|
748
786
|
#
|
749
|
-
# [1]:
|
787
|
+
# [1]: https://docs.aws.amazon.com/sns/latest/dg/welcome.html
|
750
788
|
# @return [String]
|
751
789
|
#
|
752
790
|
# @!attribute [rw] latest_delivery_time
|
@@ -801,31 +839,31 @@ module Aws::CloudTrail
|
|
801
839
|
#
|
802
840
|
#
|
803
841
|
#
|
804
|
-
# [1]:
|
842
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
|
805
843
|
# @return [String]
|
806
844
|
#
|
807
845
|
# @!attribute [rw] latest_delivery_attempt_time
|
808
|
-
# This field is
|
846
|
+
# This field is no longer in use.
|
809
847
|
# @return [String]
|
810
848
|
#
|
811
849
|
# @!attribute [rw] latest_notification_attempt_time
|
812
|
-
# This field is
|
850
|
+
# This field is no longer in use.
|
813
851
|
# @return [String]
|
814
852
|
#
|
815
853
|
# @!attribute [rw] latest_notification_attempt_succeeded
|
816
|
-
# This field is
|
854
|
+
# This field is no longer in use.
|
817
855
|
# @return [String]
|
818
856
|
#
|
819
857
|
# @!attribute [rw] latest_delivery_attempt_succeeded
|
820
|
-
# This field is
|
858
|
+
# This field is no longer in use.
|
821
859
|
# @return [String]
|
822
860
|
#
|
823
861
|
# @!attribute [rw] time_logging_started
|
824
|
-
# This field is
|
862
|
+
# This field is no longer in use.
|
825
863
|
# @return [String]
|
826
864
|
#
|
827
865
|
# @!attribute [rw] time_logging_stopped
|
828
|
-
# This field is
|
866
|
+
# This field is no longer in use.
|
829
867
|
# @return [String]
|
830
868
|
#
|
831
869
|
# @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatusResponse AWS API Documentation
|
@@ -958,6 +996,39 @@ module Aws::CloudTrail
|
|
958
996
|
include Aws::Structure
|
959
997
|
end
|
960
998
|
|
999
|
+
# @note When making an API call, you may pass ListTrailsRequest
|
1000
|
+
# data as a hash:
|
1001
|
+
#
|
1002
|
+
# {
|
1003
|
+
# next_token: "String",
|
1004
|
+
# }
|
1005
|
+
#
|
1006
|
+
# @!attribute [rw] next_token
|
1007
|
+
# @return [String]
|
1008
|
+
#
|
1009
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrailsRequest AWS API Documentation
|
1010
|
+
#
|
1011
|
+
class ListTrailsRequest < Struct.new(
|
1012
|
+
:next_token)
|
1013
|
+
include Aws::Structure
|
1014
|
+
end
|
1015
|
+
|
1016
|
+
# @!attribute [rw] trails
|
1017
|
+
# Returns the name, ARN, and home region of trails in the current
|
1018
|
+
# account.
|
1019
|
+
# @return [Array<Types::TrailInfo>]
|
1020
|
+
#
|
1021
|
+
# @!attribute [rw] next_token
|
1022
|
+
# @return [String]
|
1023
|
+
#
|
1024
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrailsResponse AWS API Documentation
|
1025
|
+
#
|
1026
|
+
class ListTrailsResponse < Struct.new(
|
1027
|
+
:trails,
|
1028
|
+
:next_token)
|
1029
|
+
include Aws::Structure
|
1030
|
+
end
|
1031
|
+
|
961
1032
|
# Specifies an attribute and value that filter the events returned.
|
962
1033
|
#
|
963
1034
|
# @note When making an API call, you may pass LookupAttribute
|
@@ -1216,13 +1287,13 @@ module Aws::CloudTrail
|
|
1216
1287
|
# The type of a resource referenced by the event returned. When the
|
1217
1288
|
# resource type cannot be determined, null is returned. Some examples
|
1218
1289
|
# of resource types are: **Instance** for EC2, **Trail** for
|
1219
|
-
# CloudTrail, **DBInstance** for RDS, and **AccessKey** for IAM.
|
1220
|
-
#
|
1221
|
-
#
|
1290
|
+
# CloudTrail, **DBInstance** for RDS, and **AccessKey** for IAM. To
|
1291
|
+
# learn more about how to look up and filter events by the resource
|
1292
|
+
# types supported for a service, see [Filtering CloudTrail Events][1].
|
1222
1293
|
#
|
1223
1294
|
#
|
1224
1295
|
#
|
1225
|
-
# [1]:
|
1296
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events-console.html#filtering-cloudtrail-events
|
1226
1297
|
# @return [String]
|
1227
1298
|
#
|
1228
1299
|
# @!attribute [rw] resource_name
|
@@ -1364,7 +1435,7 @@ module Aws::CloudTrail
|
|
1364
1435
|
#
|
1365
1436
|
#
|
1366
1437
|
#
|
1367
|
-
# [1]:
|
1438
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
|
1368
1439
|
# @return [String]
|
1369
1440
|
#
|
1370
1441
|
# @!attribute [rw] s3_key_prefix
|
@@ -1375,11 +1446,11 @@ module Aws::CloudTrail
|
|
1375
1446
|
#
|
1376
1447
|
#
|
1377
1448
|
#
|
1378
|
-
# [1]:
|
1449
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
|
1379
1450
|
# @return [String]
|
1380
1451
|
#
|
1381
1452
|
# @!attribute [rw] sns_topic_name
|
1382
|
-
# This field is
|
1453
|
+
# This field is no longer in use. Use SnsTopicARN.
|
1383
1454
|
# @return [String]
|
1384
1455
|
#
|
1385
1456
|
# @!attribute [rw] sns_topic_arn
|
@@ -1396,7 +1467,7 @@ module Aws::CloudTrail
|
|
1396
1467
|
# @return [Boolean]
|
1397
1468
|
#
|
1398
1469
|
# @!attribute [rw] is_multi_region_trail
|
1399
|
-
# Specifies whether the trail
|
1470
|
+
# Specifies whether the trail exists only in one region or exists in
|
1400
1471
|
# all regions.
|
1401
1472
|
# @return [Boolean]
|
1402
1473
|
#
|
@@ -1461,6 +1532,30 @@ module Aws::CloudTrail
|
|
1461
1532
|
include Aws::Structure
|
1462
1533
|
end
|
1463
1534
|
|
1535
|
+
# Information about a CloudTrail trail, including the trail's name,
|
1536
|
+
# home region, and Amazon Resource Name (ARN).
|
1537
|
+
#
|
1538
|
+
# @!attribute [rw] trail_arn
|
1539
|
+
# The ARN of a trail.
|
1540
|
+
# @return [String]
|
1541
|
+
#
|
1542
|
+
# @!attribute [rw] name
|
1543
|
+
# The name of a trail.
|
1544
|
+
# @return [String]
|
1545
|
+
#
|
1546
|
+
# @!attribute [rw] home_region
|
1547
|
+
# The AWS region in which a trail was created.
|
1548
|
+
# @return [String]
|
1549
|
+
#
|
1550
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/TrailInfo AWS API Documentation
|
1551
|
+
#
|
1552
|
+
class TrailInfo < Struct.new(
|
1553
|
+
:trail_arn,
|
1554
|
+
:name,
|
1555
|
+
:home_region)
|
1556
|
+
include Aws::Structure
|
1557
|
+
end
|
1558
|
+
|
1464
1559
|
# Specifies settings to update for the trail.
|
1465
1560
|
#
|
1466
1561
|
# @note When making an API call, you may pass UpdateTrailRequest
|
@@ -1507,7 +1602,7 @@ module Aws::CloudTrail
|
|
1507
1602
|
#
|
1508
1603
|
#
|
1509
1604
|
#
|
1510
|
-
# [1]:
|
1605
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
|
1511
1606
|
# @return [String]
|
1512
1607
|
#
|
1513
1608
|
# @!attribute [rw] s3_key_prefix
|
@@ -1518,7 +1613,7 @@ module Aws::CloudTrail
|
|
1518
1613
|
#
|
1519
1614
|
#
|
1520
1615
|
#
|
1521
|
-
# [1]:
|
1616
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
|
1522
1617
|
# @return [String]
|
1523
1618
|
#
|
1524
1619
|
# @!attribute [rw] sns_topic_name
|
@@ -1538,7 +1633,8 @@ module Aws::CloudTrail
|
|
1538
1633
|
# (replications of the trail) will be created in the other regions. If
|
1539
1634
|
# the trail exists in all regions and this value is set to false, the
|
1540
1635
|
# trail will remain in the region where it was created, and its shadow
|
1541
|
-
# trails in other regions will be deleted.
|
1636
|
+
# trails in other regions will be deleted. As a best practice,
|
1637
|
+
# consider using trails that log events in all regions.
|
1542
1638
|
# @return [Boolean]
|
1543
1639
|
#
|
1544
1640
|
# @!attribute [rw] enable_log_file_validation
|
@@ -1636,11 +1732,11 @@ module Aws::CloudTrail
|
|
1636
1732
|
#
|
1637
1733
|
#
|
1638
1734
|
#
|
1639
|
-
# [1]:
|
1735
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
|
1640
1736
|
# @return [String]
|
1641
1737
|
#
|
1642
1738
|
# @!attribute [rw] sns_topic_name
|
1643
|
-
# This field is
|
1739
|
+
# This field is no longer in use. Use SnsTopicARN.
|
1644
1740
|
# @return [String]
|
1645
1741
|
#
|
1646
1742
|
# @!attribute [rw] sns_topic_arn
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-cloudtrail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|