aws-sdk-cloudtrail 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,23 +1,14 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module CloudTrail
10
- module Errors
8
+ module Aws::CloudTrail
9
+ module Errors
11
10
 
12
- extend Aws::Errors::DynamicErrors
11
+ extend Aws::Errors::DynamicErrors
13
12
 
14
- # Raised when calling #load or #data on a resource class that can not be
15
- # loaded. This can happen when:
16
- #
17
- # * A resource class has identifiers, but no data attributes.
18
- # * Resource data is only available when making an API call that
19
- # enumerates all resources of that type.
20
- class ResourceNotLoadable < RuntimeError; end
21
- end
22
13
  end
23
14
  end
@@ -1,25 +1,23 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module CloudTrail
10
- class Resource
8
+ module Aws::CloudTrail
9
+ class Resource
11
10
 
12
- # @param options ({})
13
- # @option options [Client] :client
14
- def initialize(options = {})
15
- @client = options[:client] || Client.new(options)
16
- end
17
-
18
- # @return [Client]
19
- def client
20
- @client
21
- end
11
+ # @param options ({})
12
+ # @option options [Client] :client
13
+ def initialize(options = {})
14
+ @client = options[:client] || Client.new(options)
15
+ end
22
16
 
17
+ # @return [Client]
18
+ def client
19
+ @client
23
20
  end
21
+
24
22
  end
25
23
  end
@@ -1,1431 +1,1512 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module CloudTrail
10
- module Types
8
+ module Aws::CloudTrail
9
+ module Types
11
10
 
12
- # Specifies the tags to add to a trail.
13
- # @note When making an API call, pass AddTagsRequest
14
- # data as a hash:
15
- #
16
- # {
17
- # resource_id: "String", # required
18
- # tags_list: [
19
- # {
20
- # key: "String", # required
21
- # value: "String",
22
- # },
23
- # ],
24
- # }
25
- # @!attribute [rw] resource_id
26
- # Specifies the ARN of the trail to which one or more tags will be
27
- # added. The format of a trail ARN is:
28
- #
29
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
30
- # @return [String]
31
- #
32
- # @!attribute [rw] tags_list
33
- # Contains a list of CloudTrail tags, up to a limit of 50
34
- # @return [Array<Types::Tag>]
35
- class AddTagsRequest < Struct.new(
36
- :resource_id,
37
- :tags_list)
38
- include Aws::Structure
39
- end
40
-
41
- # Returns the objects or data listed below if successful. Otherwise,
42
- # returns an error.
43
- class AddTagsResponse < Aws::EmptyStructure; end
11
+ # Specifies the tags to add to a trail.
12
+ #
13
+ # @note When making an API call, you may pass AddTagsRequest
14
+ # data as a hash:
15
+ #
16
+ # {
17
+ # resource_id: "String", # required
18
+ # tags_list: [
19
+ # {
20
+ # key: "String", # required
21
+ # value: "String",
22
+ # },
23
+ # ],
24
+ # }
25
+ #
26
+ # @!attribute [rw] resource_id
27
+ # Specifies the ARN of the trail to which one or more tags will be
28
+ # added. The format of a trail ARN is:
29
+ #
30
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
31
+ # @return [String]
32
+ #
33
+ # @!attribute [rw] tags_list
34
+ # Contains a list of CloudTrail tags, up to a limit of 50
35
+ # @return [Array<Types::Tag>]
36
+ #
37
+ class AddTagsRequest < Struct.new(
38
+ :resource_id,
39
+ :tags_list)
40
+ include Aws::Structure
41
+ end
44
42
 
45
- # Specifies the settings for each trail.
46
- # @note When making an API call, pass CreateTrailRequest
47
- # data as a hash:
48
- #
49
- # {
50
- # name: "String", # required
51
- # s3_bucket_name: "String", # required
52
- # s3_key_prefix: "String",
53
- # sns_topic_name: "String",
54
- # include_global_service_events: false,
55
- # is_multi_region_trail: false,
56
- # enable_log_file_validation: false,
57
- # cloud_watch_logs_log_group_arn: "String",
58
- # cloud_watch_logs_role_arn: "String",
59
- # kms_key_id: "String",
60
- # }
61
- # @!attribute [rw] name
62
- # Specifies the name of the trail. The name must meet the following
63
- # requirements:
64
- #
65
- # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
66
- # underscores (\_), or dashes (-)
67
- #
68
- # * Start with a letter or number, and end with a letter or number
69
- #
70
- # * Be between 3 and 128 characters
71
- #
72
- # * Have no adjacent periods, underscores or dashes. Names like
73
- # `my-_namespace` and `my--namespace` are invalid.
74
- #
75
- # * Not be in IP address format (for example, 192.168.5.4)
76
- # @return [String]
77
- #
78
- # @!attribute [rw] s3_bucket_name
79
- # Specifies the name of the Amazon S3 bucket designated for publishing
80
- # log files. See [Amazon S3 Bucket Naming Requirements][1].
81
- #
82
- #
83
- #
84
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
85
- # @return [String]
86
- #
87
- # @!attribute [rw] s3_key_prefix
88
- # Specifies the Amazon S3 key prefix that comes after the name of the
89
- # bucket you have designated for log file delivery. For more
90
- # information, see [Finding Your CloudTrail Log Files][1]. The maximum
91
- # length is 200 characters.
92
- #
93
- #
94
- #
95
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
96
- # @return [String]
97
- #
98
- # @!attribute [rw] sns_topic_name
99
- # Specifies the name of the Amazon SNS topic defined for notification
100
- # of log file delivery. The maximum length is 256 characters.
101
- # @return [String]
102
- #
103
- # @!attribute [rw] include_global_service_events
104
- # Specifies whether the trail is publishing events from global
105
- # services such as IAM to the log files.
106
- # @return [Boolean]
107
- #
108
- # @!attribute [rw] is_multi_region_trail
109
- # Specifies whether the trail is created in the current region or in
110
- # all regions. The default is false.
111
- # @return [Boolean]
112
- #
113
- # @!attribute [rw] enable_log_file_validation
114
- # Specifies whether log file integrity validation is enabled. The
115
- # default is false.
116
- #
117
- # <note markdown="1"> When you disable log file integrity validation, the chain of digest
118
- # files is broken after one hour. CloudTrail will not create digest
119
- # files for log files that were delivered during a period in which log
120
- # file integrity validation was disabled. For example, if you enable
121
- # log file integrity validation at noon on January 1, disable it at
122
- # noon on January 2, and re-enable it at noon on January 10, digest
123
- # files will not be created for the log files delivered from noon on
124
- # January 2 to noon on January 10. The same applies whenever you stop
125
- # CloudTrail logging or delete a trail.
126
- #
127
- # </note>
128
- # @return [Boolean]
129
- #
130
- # @!attribute [rw] cloud_watch_logs_log_group_arn
131
- # Specifies a log group name using an Amazon Resource Name (ARN), a
132
- # unique identifier that represents the log group to which CloudTrail
133
- # logs will be delivered. Not required unless you specify
134
- # CloudWatchLogsRoleArn.
135
- # @return [String]
136
- #
137
- # @!attribute [rw] cloud_watch_logs_role_arn
138
- # Specifies the role for the CloudWatch Logs endpoint to assume to
139
- # write to a user's log group.
140
- # @return [String]
141
- #
142
- # @!attribute [rw] kms_key_id
143
- # Specifies the KMS key ID to use to encrypt the logs delivered by
144
- # CloudTrail. The value can be a an alias name prefixed by "alias/",
145
- # a fully specified ARN to an alias, a fully specified ARN to a key,
146
- # or a globally unique identifier.
147
- #
148
- # Examples:
149
- #
150
- # * alias/MyAliasName
151
- #
152
- # * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
153
- #
154
- # * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
155
- #
156
- # * 12345678-1234-1234-1234-123456789012
157
- # @return [String]
158
- class CreateTrailRequest < Struct.new(
159
- :name,
160
- :s3_bucket_name,
161
- :s3_key_prefix,
162
- :sns_topic_name,
163
- :include_global_service_events,
164
- :is_multi_region_trail,
165
- :enable_log_file_validation,
166
- :cloud_watch_logs_log_group_arn,
167
- :cloud_watch_logs_role_arn,
168
- :kms_key_id)
169
- include Aws::Structure
170
- end
43
+ # Returns the objects or data listed below if successful. Otherwise,
44
+ # returns an error.
45
+ #
46
+ class AddTagsResponse < Aws::EmptyStructure; end
171
47
 
172
- # Returns the objects or data listed below if successful. Otherwise,
173
- # returns an error.
174
- # @!attribute [rw] name
175
- # Specifies the name of the trail.
176
- # @return [String]
177
- #
178
- # @!attribute [rw] s3_bucket_name
179
- # Specifies the name of the Amazon S3 bucket designated for publishing
180
- # log files.
181
- # @return [String]
182
- #
183
- # @!attribute [rw] s3_key_prefix
184
- # Specifies the Amazon S3 key prefix that comes after the name of the
185
- # bucket you have designated for log file delivery. For more
186
- # information, see [Finding Your CloudTrail Log Files][1].
187
- #
188
- #
189
- #
190
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
191
- # @return [String]
192
- #
193
- # @!attribute [rw] sns_topic_name
194
- # This field is deprecated. Use SnsTopicARN.
195
- # @return [String]
196
- #
197
- # @!attribute [rw] sns_topic_arn
198
- # Specifies the ARN of the Amazon SNS topic that CloudTrail uses to
199
- # send notifications when log files are delivered. The format of a
200
- # topic ARN is:
201
- #
202
- # `arn:aws:sns:us-east-1:123456789012:MyTopic`
203
- # @return [String]
204
- #
205
- # @!attribute [rw] include_global_service_events
206
- # Specifies whether the trail is publishing events from global
207
- # services such as IAM to the log files.
208
- # @return [Boolean]
209
- #
210
- # @!attribute [rw] is_multi_region_trail
211
- # Specifies whether the trail exists in one region or in all regions.
212
- # @return [Boolean]
213
- #
214
- # @!attribute [rw] trail_arn
215
- # Specifies the ARN of the trail that was created. The format of a
216
- # trail ARN is:
217
- #
218
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
219
- # @return [String]
220
- #
221
- # @!attribute [rw] log_file_validation_enabled
222
- # Specifies whether log file integrity validation is enabled.
223
- # @return [Boolean]
224
- #
225
- # @!attribute [rw] cloud_watch_logs_log_group_arn
226
- # Specifies the Amazon Resource Name (ARN) of the log group to which
227
- # CloudTrail logs will be delivered.
228
- # @return [String]
229
- #
230
- # @!attribute [rw] cloud_watch_logs_role_arn
231
- # Specifies the role for the CloudWatch Logs endpoint to assume to
232
- # write to a user's log group.
233
- # @return [String]
234
- #
235
- # @!attribute [rw] kms_key_id
236
- # Specifies the KMS key ID that encrypts the logs delivered by
237
- # CloudTrail. The value is a fully specified ARN to a KMS key in the
238
- # format:
239
- #
240
- # `arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012`
241
- # @return [String]
242
- class CreateTrailResponse < Struct.new(
243
- :name,
244
- :s3_bucket_name,
245
- :s3_key_prefix,
246
- :sns_topic_name,
247
- :sns_topic_arn,
248
- :include_global_service_events,
249
- :is_multi_region_trail,
250
- :trail_arn,
251
- :log_file_validation_enabled,
252
- :cloud_watch_logs_log_group_arn,
253
- :cloud_watch_logs_role_arn,
254
- :kms_key_id)
255
- include Aws::Structure
256
- end
48
+ # Specifies the settings for each trail.
49
+ #
50
+ # @note When making an API call, you may pass CreateTrailRequest
51
+ # data as a hash:
52
+ #
53
+ # {
54
+ # name: "String", # required
55
+ # s3_bucket_name: "String", # required
56
+ # s3_key_prefix: "String",
57
+ # sns_topic_name: "String",
58
+ # include_global_service_events: false,
59
+ # is_multi_region_trail: false,
60
+ # enable_log_file_validation: false,
61
+ # cloud_watch_logs_log_group_arn: "String",
62
+ # cloud_watch_logs_role_arn: "String",
63
+ # kms_key_id: "String",
64
+ # }
65
+ #
66
+ # @!attribute [rw] name
67
+ # Specifies the name of the trail. The name must meet the following
68
+ # requirements:
69
+ #
70
+ # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
71
+ # underscores (\_), or dashes (-)
72
+ #
73
+ # * Start with a letter or number, and end with a letter or number
74
+ #
75
+ # * Be between 3 and 128 characters
76
+ #
77
+ # * Have no adjacent periods, underscores or dashes. Names like
78
+ # `my-_namespace` and `my--namespace` are invalid.
79
+ #
80
+ # * Not be in IP address format (for example, 192.168.5.4)
81
+ # @return [String]
82
+ #
83
+ # @!attribute [rw] s3_bucket_name
84
+ # Specifies the name of the Amazon S3 bucket designated for publishing
85
+ # log files. See [Amazon S3 Bucket Naming Requirements][1].
86
+ #
87
+ #
88
+ #
89
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
90
+ # @return [String]
91
+ #
92
+ # @!attribute [rw] s3_key_prefix
93
+ # Specifies the Amazon S3 key prefix that comes after the name of the
94
+ # bucket you have designated for log file delivery. For more
95
+ # information, see [Finding Your CloudTrail Log Files][1]. The maximum
96
+ # length is 200 characters.
97
+ #
98
+ #
99
+ #
100
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
101
+ # @return [String]
102
+ #
103
+ # @!attribute [rw] sns_topic_name
104
+ # Specifies the name of the Amazon SNS topic defined for notification
105
+ # of log file delivery. The maximum length is 256 characters.
106
+ # @return [String]
107
+ #
108
+ # @!attribute [rw] include_global_service_events
109
+ # Specifies whether the trail is publishing events from global
110
+ # services such as IAM to the log files.
111
+ # @return [Boolean]
112
+ #
113
+ # @!attribute [rw] is_multi_region_trail
114
+ # Specifies whether the trail is created in the current region or in
115
+ # all regions. The default is false.
116
+ # @return [Boolean]
117
+ #
118
+ # @!attribute [rw] enable_log_file_validation
119
+ # Specifies whether log file integrity validation is enabled. The
120
+ # default is false.
121
+ #
122
+ # <note markdown="1"> When you disable log file integrity validation, the chain of digest
123
+ # files is broken after one hour. CloudTrail will not create digest
124
+ # files for log files that were delivered during a period in which log
125
+ # file integrity validation was disabled. For example, if you enable
126
+ # log file integrity validation at noon on January 1, disable it at
127
+ # noon on January 2, and re-enable it at noon on January 10, digest
128
+ # files will not be created for the log files delivered from noon on
129
+ # January 2 to noon on January 10. The same applies whenever you stop
130
+ # CloudTrail logging or delete a trail.
131
+ #
132
+ # </note>
133
+ # @return [Boolean]
134
+ #
135
+ # @!attribute [rw] cloud_watch_logs_log_group_arn
136
+ # Specifies a log group name using an Amazon Resource Name (ARN), a
137
+ # unique identifier that represents the log group to which CloudTrail
138
+ # logs will be delivered. Not required unless you specify
139
+ # CloudWatchLogsRoleArn.
140
+ # @return [String]
141
+ #
142
+ # @!attribute [rw] cloud_watch_logs_role_arn
143
+ # Specifies the role for the CloudWatch Logs endpoint to assume to
144
+ # write to a user's log group.
145
+ # @return [String]
146
+ #
147
+ # @!attribute [rw] kms_key_id
148
+ # Specifies the KMS key ID to use to encrypt the logs delivered by
149
+ # CloudTrail. The value can be a an alias name prefixed by "alias/",
150
+ # a fully specified ARN to an alias, a fully specified ARN to a key,
151
+ # or a globally unique identifier.
152
+ #
153
+ # Examples:
154
+ #
155
+ # * alias/MyAliasName
156
+ #
157
+ # * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
158
+ #
159
+ # * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
160
+ #
161
+ # * 12345678-1234-1234-1234-123456789012
162
+ # @return [String]
163
+ #
164
+ class CreateTrailRequest < Struct.new(
165
+ :name,
166
+ :s3_bucket_name,
167
+ :s3_key_prefix,
168
+ :sns_topic_name,
169
+ :include_global_service_events,
170
+ :is_multi_region_trail,
171
+ :enable_log_file_validation,
172
+ :cloud_watch_logs_log_group_arn,
173
+ :cloud_watch_logs_role_arn,
174
+ :kms_key_id)
175
+ include Aws::Structure
176
+ end
257
177
 
258
- # The Amazon S3 objects that you specify in your event selectors for
259
- # your trail to log data events. Data events are object level API
260
- # operations that access S3 objects, such as `GetObject`,
261
- # `DeleteObject`, and `PutObject`. You can specify up to 50 S3 buckets
262
- # and object prefixes for an event selector.
263
- #
264
- # Example
265
- #
266
- # 1. You create an event selector for a trail and specify an S3 bucket
267
- # and an empty prefix, such as `arn:aws:s3:::bucket-1/`.
268
- #
269
- # 2. You upload an image file to `bucket-1`.
270
- #
271
- # 3. The `PutObject` API operation occurs on an object in the S3 bucket
272
- # that you specified in the event selector. The trail processes and
273
- # logs the event.
274
- #
275
- # 4. You upload another image file to a different S3 bucket named
276
- # `arn:aws:s3:::bucket-2`.
277
- #
278
- # 5. The event occurs on an object in an S3 bucket that you didn't
279
- # specify in the event selector. The trail doesn’t log the event.
280
- # @note When making an API call, pass DataResource
281
- # data as a hash:
282
- #
283
- # {
284
- # type: "String",
285
- # values: ["String"],
286
- # }
287
- # @!attribute [rw] type
288
- # The resource type in which you want to log data events. You can
289
- # specify only the following value: `AWS::S3::Object`.
290
- # @return [String]
291
- #
292
- # @!attribute [rw] values
293
- # A list of ARN-like strings for the specified S3 objects.
294
- #
295
- # To log data events for all objects in an S3 bucket, specify the
296
- # bucket and an empty object prefix such as `arn:aws:s3:::bucket-1/`.
297
- # The trail logs data events for all objects in this S3 bucket.
298
- #
299
- # To log data events for specific objects, specify the S3 bucket and
300
- # object prefix such as `arn:aws:s3:::bucket-1/example-images`. The
301
- # trail logs data events for objects in this S3 bucket that match the
302
- # prefix.
303
- # @return [Array<String>]
304
- class DataResource < Struct.new(
305
- :type,
306
- :values)
307
- include Aws::Structure
308
- end
178
+ # Returns the objects or data listed below if successful. Otherwise,
179
+ # returns an error.
180
+ #
181
+ # @!attribute [rw] name
182
+ # Specifies the name of the trail.
183
+ # @return [String]
184
+ #
185
+ # @!attribute [rw] s3_bucket_name
186
+ # Specifies the name of the Amazon S3 bucket designated for publishing
187
+ # log files.
188
+ # @return [String]
189
+ #
190
+ # @!attribute [rw] s3_key_prefix
191
+ # Specifies the Amazon S3 key prefix that comes after the name of the
192
+ # bucket you have designated for log file delivery. For more
193
+ # information, see [Finding Your CloudTrail Log Files][1].
194
+ #
195
+ #
196
+ #
197
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
198
+ # @return [String]
199
+ #
200
+ # @!attribute [rw] sns_topic_name
201
+ # This field is deprecated. Use SnsTopicARN.
202
+ # @return [String]
203
+ #
204
+ # @!attribute [rw] sns_topic_arn
205
+ # Specifies the ARN of the Amazon SNS topic that CloudTrail uses to
206
+ # send notifications when log files are delivered. The format of a
207
+ # topic ARN is:
208
+ #
209
+ # `arn:aws:sns:us-east-1:123456789012:MyTopic`
210
+ # @return [String]
211
+ #
212
+ # @!attribute [rw] include_global_service_events
213
+ # Specifies whether the trail is publishing events from global
214
+ # services such as IAM to the log files.
215
+ # @return [Boolean]
216
+ #
217
+ # @!attribute [rw] is_multi_region_trail
218
+ # Specifies whether the trail exists in one region or in all regions.
219
+ # @return [Boolean]
220
+ #
221
+ # @!attribute [rw] trail_arn
222
+ # Specifies the ARN of the trail that was created. The format of a
223
+ # trail ARN is:
224
+ #
225
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
226
+ # @return [String]
227
+ #
228
+ # @!attribute [rw] log_file_validation_enabled
229
+ # Specifies whether log file integrity validation is enabled.
230
+ # @return [Boolean]
231
+ #
232
+ # @!attribute [rw] cloud_watch_logs_log_group_arn
233
+ # Specifies the Amazon Resource Name (ARN) of the log group to which
234
+ # CloudTrail logs will be delivered.
235
+ # @return [String]
236
+ #
237
+ # @!attribute [rw] cloud_watch_logs_role_arn
238
+ # Specifies the role for the CloudWatch Logs endpoint to assume to
239
+ # write to a user's log group.
240
+ # @return [String]
241
+ #
242
+ # @!attribute [rw] kms_key_id
243
+ # Specifies the KMS key ID that encrypts the logs delivered by
244
+ # CloudTrail. The value is a fully specified ARN to a KMS key in the
245
+ # format:
246
+ #
247
+ # `arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012`
248
+ # @return [String]
249
+ #
250
+ class CreateTrailResponse < Struct.new(
251
+ :name,
252
+ :s3_bucket_name,
253
+ :s3_key_prefix,
254
+ :sns_topic_name,
255
+ :sns_topic_arn,
256
+ :include_global_service_events,
257
+ :is_multi_region_trail,
258
+ :trail_arn,
259
+ :log_file_validation_enabled,
260
+ :cloud_watch_logs_log_group_arn,
261
+ :cloud_watch_logs_role_arn,
262
+ :kms_key_id)
263
+ include Aws::Structure
264
+ end
309
265
 
310
- # The request that specifies the name of a trail to delete.
311
- # @note When making an API call, pass DeleteTrailRequest
312
- # data as a hash:
313
- #
314
- # {
315
- # name: "String", # required
316
- # }
317
- # @!attribute [rw] name
318
- # Specifies the name or the CloudTrail ARN of the trail to be deleted.
319
- # The format of a trail ARN is:
320
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
321
- # @return [String]
322
- class DeleteTrailRequest < Struct.new(
323
- :name)
324
- include Aws::Structure
325
- end
266
+ # The Amazon S3 objects that you specify in your event selectors for
267
+ # your trail to log data events. Data events are object level API
268
+ # operations that access S3 objects, such as `GetObject`,
269
+ # `DeleteObject`, and `PutObject`. You can specify up to 50 S3 buckets
270
+ # and object prefixes for an event selector.
271
+ #
272
+ # Example
273
+ #
274
+ # 1. You create an event selector for a trail and specify an S3 bucket
275
+ # and an empty prefix, such as `arn:aws:s3:::bucket-1/`.
276
+ #
277
+ # 2. You upload an image file to `bucket-1`.
278
+ #
279
+ # 3. The `PutObject` API operation occurs on an object in the S3 bucket
280
+ # that you specified in the event selector. The trail processes and
281
+ # logs the event.
282
+ #
283
+ # 4. You upload another image file to a different S3 bucket named
284
+ # `arn:aws:s3:::bucket-2`.
285
+ #
286
+ # 5. The event occurs on an object in an S3 bucket that you didn't
287
+ # specify in the event selector. The trail doesn’t log the event.
288
+ #
289
+ # @note When making an API call, you may pass DataResource
290
+ # data as a hash:
291
+ #
292
+ # {
293
+ # type: "String",
294
+ # values: ["String"],
295
+ # }
296
+ #
297
+ # @!attribute [rw] type
298
+ # The resource type in which you want to log data events. You can
299
+ # specify only the following value: `AWS::S3::Object`.
300
+ # @return [String]
301
+ #
302
+ # @!attribute [rw] values
303
+ # A list of ARN-like strings for the specified S3 objects.
304
+ #
305
+ # To log data events for all objects in an S3 bucket, specify the
306
+ # bucket and an empty object prefix such as `arn:aws:s3:::bucket-1/`.
307
+ # The trail logs data events for all objects in this S3 bucket.
308
+ #
309
+ # To log data events for specific objects, specify the S3 bucket and
310
+ # object prefix such as `arn:aws:s3:::bucket-1/example-images`. The
311
+ # trail logs data events for objects in this S3 bucket that match the
312
+ # prefix.
313
+ # @return [Array<String>]
314
+ #
315
+ class DataResource < Struct.new(
316
+ :type,
317
+ :values)
318
+ include Aws::Structure
319
+ end
326
320
 
327
- # Returns the objects or data listed below if successful. Otherwise,
328
- # returns an error.
329
- class DeleteTrailResponse < Aws::EmptyStructure; end
321
+ # The request that specifies the name of a trail to delete.
322
+ #
323
+ # @note When making an API call, you may pass DeleteTrailRequest
324
+ # data as a hash:
325
+ #
326
+ # {
327
+ # name: "String", # required
328
+ # }
329
+ #
330
+ # @!attribute [rw] name
331
+ # Specifies the name or the CloudTrail ARN of the trail to be deleted.
332
+ # The format of a trail ARN is:
333
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
334
+ # @return [String]
335
+ #
336
+ class DeleteTrailRequest < Struct.new(
337
+ :name)
338
+ include Aws::Structure
339
+ end
330
340
 
331
- # Returns information about the trail.
332
- # @note When making an API call, pass DescribeTrailsRequest
333
- # data as a hash:
334
- #
335
- # {
336
- # trail_name_list: ["String"],
337
- # include_shadow_trails: false,
338
- # }
339
- # @!attribute [rw] trail_name_list
340
- # Specifies a list of trail names, trail ARNs, or both, of the trails
341
- # to describe. The format of a trail ARN is:
342
- #
343
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
344
- #
345
- # If an empty list is specified, information for the trail in the
346
- # current region is returned.
347
- #
348
- # * If an empty list is specified and `IncludeShadowTrails` is false,
349
- # then information for all trails in the current region is returned.
350
- #
351
- # * If an empty list is specified and IncludeShadowTrails is null or
352
- # true, then information for all trails in the current region and
353
- # any associated shadow trails in other regions is returned.
354
- #
355
- # <note markdown="1"> If one or more trail names are specified, information is returned
356
- # only if the names match the names of trails belonging only to the
357
- # current region. To return information about a trail in another
358
- # region, you must specify its trail ARN.
359
- #
360
- # </note>
361
- # @return [Array<String>]
362
- #
363
- # @!attribute [rw] include_shadow_trails
364
- # Specifies whether to include shadow trails in the response. A shadow
365
- # trail is the replication in a region of a trail that was created in
366
- # a different region. The default is true.
367
- # @return [Boolean]
368
- class DescribeTrailsRequest < Struct.new(
369
- :trail_name_list,
370
- :include_shadow_trails)
371
- include Aws::Structure
372
- end
341
+ # Returns the objects or data listed below if successful. Otherwise,
342
+ # returns an error.
343
+ #
344
+ class DeleteTrailResponse < Aws::EmptyStructure; end
373
345
 
374
- # Returns the objects or data listed below if successful. Otherwise,
375
- # returns an error.
376
- # @!attribute [rw] trail_list
377
- # The list of trail objects.
378
- # @return [Array<Types::Trail>]
379
- class DescribeTrailsResponse < Struct.new(
380
- :trail_list)
381
- include Aws::Structure
382
- end
346
+ # Returns information about the trail.
347
+ #
348
+ # @note When making an API call, you may pass DescribeTrailsRequest
349
+ # data as a hash:
350
+ #
351
+ # {
352
+ # trail_name_list: ["String"],
353
+ # include_shadow_trails: false,
354
+ # }
355
+ #
356
+ # @!attribute [rw] trail_name_list
357
+ # Specifies a list of trail names, trail ARNs, or both, of the trails
358
+ # to describe. The format of a trail ARN is:
359
+ #
360
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
361
+ #
362
+ # If an empty list is specified, information for the trail in the
363
+ # current region is returned.
364
+ #
365
+ # * If an empty list is specified and `IncludeShadowTrails` is false,
366
+ # then information for all trails in the current region is returned.
367
+ #
368
+ # * If an empty list is specified and IncludeShadowTrails is null or
369
+ # true, then information for all trails in the current region and
370
+ # any associated shadow trails in other regions is returned.
371
+ #
372
+ # <note markdown="1"> If one or more trail names are specified, information is returned
373
+ # only if the names match the names of trails belonging only to the
374
+ # current region. To return information about a trail in another
375
+ # region, you must specify its trail ARN.
376
+ #
377
+ # </note>
378
+ # @return [Array<String>]
379
+ #
380
+ # @!attribute [rw] include_shadow_trails
381
+ # Specifies whether to include shadow trails in the response. A shadow
382
+ # trail is the replication in a region of a trail that was created in
383
+ # a different region. The default is true.
384
+ # @return [Boolean]
385
+ #
386
+ class DescribeTrailsRequest < Struct.new(
387
+ :trail_name_list,
388
+ :include_shadow_trails)
389
+ include Aws::Structure
390
+ end
383
391
 
384
- # Contains information about an event that was returned by a lookup
385
- # request. The result includes a representation of a CloudTrail event.
386
- # @!attribute [rw] event_id
387
- # The CloudTrail ID of the event returned.
388
- # @return [String]
389
- #
390
- # @!attribute [rw] event_name
391
- # The name of the event returned.
392
- # @return [String]
393
- #
394
- # @!attribute [rw] event_time
395
- # The date and time of the event returned.
396
- # @return [Time]
397
- #
398
- # @!attribute [rw] event_source
399
- # The AWS service that the request was made to.
400
- # @return [String]
401
- #
402
- # @!attribute [rw] username
403
- # A user name or role name of the requester that called the API in the
404
- # event returned.
405
- # @return [String]
406
- #
407
- # @!attribute [rw] resources
408
- # A list of resources referenced by the event returned.
409
- # @return [Array<Types::Resource>]
410
- #
411
- # @!attribute [rw] cloud_trail_event
412
- # A JSON string that contains a representation of the event returned.
413
- # @return [String]
414
- class Event < Struct.new(
415
- :event_id,
416
- :event_name,
417
- :event_time,
418
- :event_source,
419
- :username,
420
- :resources,
421
- :cloud_trail_event)
422
- include Aws::Structure
423
- end
392
+ # Returns the objects or data listed below if successful. Otherwise,
393
+ # returns an error.
394
+ #
395
+ # @!attribute [rw] trail_list
396
+ # The list of trail objects.
397
+ # @return [Array<Types::Trail>]
398
+ #
399
+ class DescribeTrailsResponse < Struct.new(
400
+ :trail_list)
401
+ include Aws::Structure
402
+ end
424
403
 
425
- # Use event selectors to specify the types of events that you want your
426
- # trail to log. When an event occurs in your account, CloudTrail
427
- # evaluates the event selector for all trails. For each trail, if the
428
- # event matches any event selector, the trail processes and logs the
429
- # event. If the event doesn't match any event selector, the trail
430
- # doesn't log the event.
431
- #
432
- # You can configure up to five event selectors for a trail.
433
- # @note When making an API call, pass EventSelector
434
- # data as a hash:
435
- #
436
- # {
437
- # read_write_type: "ReadOnly", # accepts ReadOnly, WriteOnly, All
438
- # include_management_events: false,
439
- # data_resources: [
440
- # {
441
- # type: "String",
442
- # values: ["String"],
443
- # },
444
- # ],
445
- # }
446
- # @!attribute [rw] read_write_type
447
- # Specify if you want your trail to log read-only events, write-only
448
- # events, or all. For example, the EC2 `GetConsoleOutput` is a
449
- # read-only API operation and `RunInstances` is a write-only API
450
- # operation.
451
- #
452
- # By default, the value is `All`.
453
- # @return [String]
454
- #
455
- # @!attribute [rw] include_management_events
456
- # Specify if you want your event selector to include management events
457
- # for your trail.
458
- #
459
- # For more information, see [Management Events][1] in the *AWS
460
- # CloudTrail User Guide*.
461
- #
462
- # By default, the value is `true`.
463
- #
464
- #
465
- #
466
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-event-selectors-for-a-trail.html#event-selector-for-management-events
467
- # @return [Boolean]
468
- #
469
- # @!attribute [rw] data_resources
470
- # CloudTrail supports logging only data events for S3 objects. You can
471
- # specify up to 50 S3 buckets and object prefixes for an event
472
- # selector.
473
- #
474
- # For more information, see [Data Events][1] in the *AWS CloudTrail
475
- # User Guide*.
476
- #
477
- #
478
- #
479
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-event-selectors-for-a-trail.html#data-events-resources
480
- # @return [Array<Types::DataResource>]
481
- class EventSelector < Struct.new(
482
- :read_write_type,
483
- :include_management_events,
484
- :data_resources)
485
- include Aws::Structure
486
- end
404
+ # Contains information about an event that was returned by a lookup
405
+ # request. The result includes a representation of a CloudTrail event.
406
+ #
407
+ # @!attribute [rw] event_id
408
+ # The CloudTrail ID of the event returned.
409
+ # @return [String]
410
+ #
411
+ # @!attribute [rw] event_name
412
+ # The name of the event returned.
413
+ # @return [String]
414
+ #
415
+ # @!attribute [rw] event_time
416
+ # The date and time of the event returned.
417
+ # @return [Time]
418
+ #
419
+ # @!attribute [rw] event_source
420
+ # The AWS service that the request was made to.
421
+ # @return [String]
422
+ #
423
+ # @!attribute [rw] username
424
+ # A user name or role name of the requester that called the API in the
425
+ # event returned.
426
+ # @return [String]
427
+ #
428
+ # @!attribute [rw] resources
429
+ # A list of resources referenced by the event returned.
430
+ # @return [Array<Types::Resource>]
431
+ #
432
+ # @!attribute [rw] cloud_trail_event
433
+ # A JSON string that contains a representation of the event returned.
434
+ # @return [String]
435
+ #
436
+ class Event < Struct.new(
437
+ :event_id,
438
+ :event_name,
439
+ :event_time,
440
+ :event_source,
441
+ :username,
442
+ :resources,
443
+ :cloud_trail_event)
444
+ include Aws::Structure
445
+ end
487
446
 
488
- # @note When making an API call, pass GetEventSelectorsRequest
489
- # data as a hash:
490
- #
491
- # {
492
- # trail_name: "String",
493
- # }
494
- # @!attribute [rw] trail_name
495
- # Specifies the name of the trail or trail ARN. If you specify a trail
496
- # name, the string must meet the following requirements:
497
- #
498
- # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
499
- # underscores (\_), or dashes (-)
500
- #
501
- # * Start with a letter or number, and end with a letter or number
502
- #
503
- # * Be between 3 and 128 characters
504
- #
505
- # * Have no adjacent periods, underscores or dashes. Names like
506
- # `my-_namespace` and `my--namespace` are invalid.
507
- #
508
- # * Not be in IP address format (for example, 192.168.5.4)
509
- #
510
- # If you specify a trail ARN, it must be in the format:
511
- #
512
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
513
- # @return [String]
514
- class GetEventSelectorsRequest < Struct.new(
515
- :trail_name)
516
- include Aws::Structure
517
- end
447
+ # Use event selectors to specify the types of events that you want your
448
+ # trail to log. When an event occurs in your account, CloudTrail
449
+ # evaluates the event selector for all trails. For each trail, if the
450
+ # event matches any event selector, the trail processes and logs the
451
+ # event. If the event doesn't match any event selector, the trail
452
+ # doesn't log the event.
453
+ #
454
+ # You can configure up to five event selectors for a trail.
455
+ #
456
+ # @note When making an API call, you may pass EventSelector
457
+ # data as a hash:
458
+ #
459
+ # {
460
+ # read_write_type: "ReadOnly", # accepts ReadOnly, WriteOnly, All
461
+ # include_management_events: false,
462
+ # data_resources: [
463
+ # {
464
+ # type: "String",
465
+ # values: ["String"],
466
+ # },
467
+ # ],
468
+ # }
469
+ #
470
+ # @!attribute [rw] read_write_type
471
+ # Specify if you want your trail to log read-only events, write-only
472
+ # events, or all. For example, the EC2 `GetConsoleOutput` is a
473
+ # read-only API operation and `RunInstances` is a write-only API
474
+ # operation.
475
+ #
476
+ # By default, the value is `All`.
477
+ # @return [String]
478
+ #
479
+ # @!attribute [rw] include_management_events
480
+ # Specify if you want your event selector to include management events
481
+ # for your trail.
482
+ #
483
+ # For more information, see [Management Events][1] in the *AWS
484
+ # CloudTrail User Guide*.
485
+ #
486
+ # By default, the value is `true`.
487
+ #
488
+ #
489
+ #
490
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-event-selectors-for-a-trail.html#event-selector-for-management-events
491
+ # @return [Boolean]
492
+ #
493
+ # @!attribute [rw] data_resources
494
+ # CloudTrail supports logging only data events for S3 objects. You can
495
+ # specify up to 50 S3 buckets and object prefixes for an event
496
+ # selector.
497
+ #
498
+ # For more information, see [Data Events][1] in the *AWS CloudTrail
499
+ # User Guide*.
500
+ #
501
+ #
502
+ #
503
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-event-selectors-for-a-trail.html#data-events-resources
504
+ # @return [Array<Types::DataResource>]
505
+ #
506
+ class EventSelector < Struct.new(
507
+ :read_write_type,
508
+ :include_management_events,
509
+ :data_resources)
510
+ include Aws::Structure
511
+ end
518
512
 
519
- # @!attribute [rw] trail_arn
520
- # The specified trail ARN that has the event selectors.
521
- # @return [String]
522
- #
523
- # @!attribute [rw] event_selectors
524
- # The event selectors that are configured for the trail.
525
- # @return [Array<Types::EventSelector>]
526
- class GetEventSelectorsResponse < Struct.new(
527
- :trail_arn,
528
- :event_selectors)
529
- include Aws::Structure
530
- end
513
+ # @note When making an API call, you may pass GetEventSelectorsRequest
514
+ # data as a hash:
515
+ #
516
+ # {
517
+ # trail_name: "String",
518
+ # }
519
+ #
520
+ # @!attribute [rw] trail_name
521
+ # Specifies the name of the trail or trail ARN. If you specify a trail
522
+ # name, the string must meet the following requirements:
523
+ #
524
+ # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
525
+ # underscores (\_), or dashes (-)
526
+ #
527
+ # * Start with a letter or number, and end with a letter or number
528
+ #
529
+ # * Be between 3 and 128 characters
530
+ #
531
+ # * Have no adjacent periods, underscores or dashes. Names like
532
+ # `my-_namespace` and `my--namespace` are invalid.
533
+ #
534
+ # * Not be in IP address format (for example, 192.168.5.4)
535
+ #
536
+ # If you specify a trail ARN, it must be in the format:
537
+ #
538
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
539
+ # @return [String]
540
+ #
541
+ class GetEventSelectorsRequest < Struct.new(
542
+ :trail_name)
543
+ include Aws::Structure
544
+ end
531
545
 
532
- # The name of a trail about which you want the current status.
533
- # @note When making an API call, pass GetTrailStatusRequest
534
- # data as a hash:
535
- #
536
- # {
537
- # name: "String", # required
538
- # }
539
- # @!attribute [rw] name
540
- # Specifies the name or the CloudTrail ARN of the trail for which you
541
- # are requesting status. To get the status of a shadow trail (a
542
- # replication of the trail in another region), you must specify its
543
- # ARN. The format of a trail ARN is:
544
- #
545
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
546
- # @return [String]
547
- class GetTrailStatusRequest < Struct.new(
548
- :name)
549
- include Aws::Structure
550
- end
546
+ # @!attribute [rw] trail_arn
547
+ # The specified trail ARN that has the event selectors.
548
+ # @return [String]
549
+ #
550
+ # @!attribute [rw] event_selectors
551
+ # The event selectors that are configured for the trail.
552
+ # @return [Array<Types::EventSelector>]
553
+ #
554
+ class GetEventSelectorsResponse < Struct.new(
555
+ :trail_arn,
556
+ :event_selectors)
557
+ include Aws::Structure
558
+ end
551
559
 
552
- # Returns the objects or data listed below if successful. Otherwise,
553
- # returns an error.
554
- # @!attribute [rw] is_logging
555
- # Whether the CloudTrail is currently logging AWS API calls.
556
- # @return [Boolean]
557
- #
558
- # @!attribute [rw] latest_delivery_error
559
- # Displays any Amazon S3 error that CloudTrail encountered when
560
- # attempting to deliver log files to the designated bucket. For more
561
- # information see the topic [Error Responses][1] in the Amazon S3 API
562
- # Reference.
563
- #
564
- # <note markdown="1"> This error occurs only when there is a problem with the destination
565
- # S3 bucket and will not occur for timeouts. To resolve the issue,
566
- # create a new bucket and call `UpdateTrail` to specify the new
567
- # bucket, or fix the existing objects so that CloudTrail can again
568
- # write to the bucket.
569
- #
570
- # </note>
571
- #
572
- #
573
- #
574
- # [1]: http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
575
- # @return [String]
576
- #
577
- # @!attribute [rw] latest_notification_error
578
- # Displays any Amazon SNS error that CloudTrail encountered when
579
- # attempting to send a notification. For more information about Amazon
580
- # SNS errors, see the [Amazon SNS Developer Guide][1].
581
- #
582
- #
583
- #
584
- # [1]: http://docs.aws.amazon.com/sns/latest/dg/welcome.html
585
- # @return [String]
586
- #
587
- # @!attribute [rw] latest_delivery_time
588
- # Specifies the date and time that CloudTrail last delivered log files
589
- # to an account's Amazon S3 bucket.
590
- # @return [Time]
591
- #
592
- # @!attribute [rw] latest_notification_time
593
- # Specifies the date and time of the most recent Amazon SNS
594
- # notification that CloudTrail has written a new log file to an
595
- # account's Amazon S3 bucket.
596
- # @return [Time]
597
- #
598
- # @!attribute [rw] start_logging_time
599
- # Specifies the most recent date and time when CloudTrail started
600
- # recording API calls for an AWS account.
601
- # @return [Time]
602
- #
603
- # @!attribute [rw] stop_logging_time
604
- # Specifies the most recent date and time when CloudTrail stopped
605
- # recording API calls for an AWS account.
606
- # @return [Time]
607
- #
608
- # @!attribute [rw] latest_cloud_watch_logs_delivery_error
609
- # Displays any CloudWatch Logs error that CloudTrail encountered when
610
- # attempting to deliver logs to CloudWatch Logs.
611
- # @return [String]
612
- #
613
- # @!attribute [rw] latest_cloud_watch_logs_delivery_time
614
- # Displays the most recent date and time when CloudTrail delivered
615
- # logs to CloudWatch Logs.
616
- # @return [Time]
617
- #
618
- # @!attribute [rw] latest_digest_delivery_time
619
- # Specifies the date and time that CloudTrail last delivered a digest
620
- # file to an account's Amazon S3 bucket.
621
- # @return [Time]
622
- #
623
- # @!attribute [rw] latest_digest_delivery_error
624
- # Displays any Amazon S3 error that CloudTrail encountered when
625
- # attempting to deliver a digest file to the designated bucket. For
626
- # more information see the topic [Error Responses][1] in the Amazon S3
627
- # API Reference.
628
- #
629
- # <note markdown="1"> This error occurs only when there is a problem with the destination
630
- # S3 bucket and will not occur for timeouts. To resolve the issue,
631
- # create a new bucket and call `UpdateTrail` to specify the new
632
- # bucket, or fix the existing objects so that CloudTrail can again
633
- # write to the bucket.
634
- #
635
- # </note>
636
- #
637
- #
638
- #
639
- # [1]: http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
640
- # @return [String]
641
- #
642
- # @!attribute [rw] latest_delivery_attempt_time
643
- # This field is deprecated.
644
- # @return [String]
645
- #
646
- # @!attribute [rw] latest_notification_attempt_time
647
- # This field is deprecated.
648
- # @return [String]
649
- #
650
- # @!attribute [rw] latest_notification_attempt_succeeded
651
- # This field is deprecated.
652
- # @return [String]
653
- #
654
- # @!attribute [rw] latest_delivery_attempt_succeeded
655
- # This field is deprecated.
656
- # @return [String]
657
- #
658
- # @!attribute [rw] time_logging_started
659
- # This field is deprecated.
660
- # @return [String]
661
- #
662
- # @!attribute [rw] time_logging_stopped
663
- # This field is deprecated.
664
- # @return [String]
665
- class GetTrailStatusResponse < Struct.new(
666
- :is_logging,
667
- :latest_delivery_error,
668
- :latest_notification_error,
669
- :latest_delivery_time,
670
- :latest_notification_time,
671
- :start_logging_time,
672
- :stop_logging_time,
673
- :latest_cloud_watch_logs_delivery_error,
674
- :latest_cloud_watch_logs_delivery_time,
675
- :latest_digest_delivery_time,
676
- :latest_digest_delivery_error,
677
- :latest_delivery_attempt_time,
678
- :latest_notification_attempt_time,
679
- :latest_notification_attempt_succeeded,
680
- :latest_delivery_attempt_succeeded,
681
- :time_logging_started,
682
- :time_logging_stopped)
683
- include Aws::Structure
684
- end
560
+ # The name of a trail about which you want the current status.
561
+ #
562
+ # @note When making an API call, you may pass GetTrailStatusRequest
563
+ # data as a hash:
564
+ #
565
+ # {
566
+ # name: "String", # required
567
+ # }
568
+ #
569
+ # @!attribute [rw] name
570
+ # Specifies the name or the CloudTrail ARN of the trail for which you
571
+ # are requesting status. To get the status of a shadow trail (a
572
+ # replication of the trail in another region), you must specify its
573
+ # ARN. The format of a trail ARN is:
574
+ #
575
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
576
+ # @return [String]
577
+ #
578
+ class GetTrailStatusRequest < Struct.new(
579
+ :name)
580
+ include Aws::Structure
581
+ end
685
582
 
686
- # Requests the public keys for a specified time range.
687
- # @note When making an API call, pass ListPublicKeysRequest
688
- # data as a hash:
689
- #
690
- # {
691
- # start_time: Time.now,
692
- # end_time: Time.now,
693
- # next_token: "String",
694
- # }
695
- # @!attribute [rw] start_time
696
- # Optionally specifies, in UTC, the start of the time range to look up
697
- # public keys for CloudTrail digest files. If not specified, the
698
- # current time is used, and the current public key is returned.
699
- # @return [Time]
700
- #
701
- # @!attribute [rw] end_time
702
- # Optionally specifies, in UTC, the end of the time range to look up
703
- # public keys for CloudTrail digest files. If not specified, the
704
- # current time is used.
705
- # @return [Time]
706
- #
707
- # @!attribute [rw] next_token
708
- # Reserved for future use.
709
- # @return [String]
710
- class ListPublicKeysRequest < Struct.new(
711
- :start_time,
712
- :end_time,
713
- :next_token)
714
- include Aws::Structure
715
- end
583
+ # Returns the objects or data listed below if successful. Otherwise,
584
+ # returns an error.
585
+ #
586
+ # @!attribute [rw] is_logging
587
+ # Whether the CloudTrail is currently logging AWS API calls.
588
+ # @return [Boolean]
589
+ #
590
+ # @!attribute [rw] latest_delivery_error
591
+ # Displays any Amazon S3 error that CloudTrail encountered when
592
+ # attempting to deliver log files to the designated bucket. For more
593
+ # information see the topic [Error Responses][1] in the Amazon S3 API
594
+ # Reference.
595
+ #
596
+ # <note markdown="1"> This error occurs only when there is a problem with the destination
597
+ # S3 bucket and will not occur for timeouts. To resolve the issue,
598
+ # create a new bucket and call `UpdateTrail` to specify the new
599
+ # bucket, or fix the existing objects so that CloudTrail can again
600
+ # write to the bucket.
601
+ #
602
+ # </note>
603
+ #
604
+ #
605
+ #
606
+ # [1]: http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
607
+ # @return [String]
608
+ #
609
+ # @!attribute [rw] latest_notification_error
610
+ # Displays any Amazon SNS error that CloudTrail encountered when
611
+ # attempting to send a notification. For more information about Amazon
612
+ # SNS errors, see the [Amazon SNS Developer Guide][1].
613
+ #
614
+ #
615
+ #
616
+ # [1]: http://docs.aws.amazon.com/sns/latest/dg/welcome.html
617
+ # @return [String]
618
+ #
619
+ # @!attribute [rw] latest_delivery_time
620
+ # Specifies the date and time that CloudTrail last delivered log files
621
+ # to an account's Amazon S3 bucket.
622
+ # @return [Time]
623
+ #
624
+ # @!attribute [rw] latest_notification_time
625
+ # Specifies the date and time of the most recent Amazon SNS
626
+ # notification that CloudTrail has written a new log file to an
627
+ # account's Amazon S3 bucket.
628
+ # @return [Time]
629
+ #
630
+ # @!attribute [rw] start_logging_time
631
+ # Specifies the most recent date and time when CloudTrail started
632
+ # recording API calls for an AWS account.
633
+ # @return [Time]
634
+ #
635
+ # @!attribute [rw] stop_logging_time
636
+ # Specifies the most recent date and time when CloudTrail stopped
637
+ # recording API calls for an AWS account.
638
+ # @return [Time]
639
+ #
640
+ # @!attribute [rw] latest_cloud_watch_logs_delivery_error
641
+ # Displays any CloudWatch Logs error that CloudTrail encountered when
642
+ # attempting to deliver logs to CloudWatch Logs.
643
+ # @return [String]
644
+ #
645
+ # @!attribute [rw] latest_cloud_watch_logs_delivery_time
646
+ # Displays the most recent date and time when CloudTrail delivered
647
+ # logs to CloudWatch Logs.
648
+ # @return [Time]
649
+ #
650
+ # @!attribute [rw] latest_digest_delivery_time
651
+ # Specifies the date and time that CloudTrail last delivered a digest
652
+ # file to an account's Amazon S3 bucket.
653
+ # @return [Time]
654
+ #
655
+ # @!attribute [rw] latest_digest_delivery_error
656
+ # Displays any Amazon S3 error that CloudTrail encountered when
657
+ # attempting to deliver a digest file to the designated bucket. For
658
+ # more information see the topic [Error Responses][1] in the Amazon S3
659
+ # API Reference.
660
+ #
661
+ # <note markdown="1"> This error occurs only when there is a problem with the destination
662
+ # S3 bucket and will not occur for timeouts. To resolve the issue,
663
+ # create a new bucket and call `UpdateTrail` to specify the new
664
+ # bucket, or fix the existing objects so that CloudTrail can again
665
+ # write to the bucket.
666
+ #
667
+ # </note>
668
+ #
669
+ #
670
+ #
671
+ # [1]: http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
672
+ # @return [String]
673
+ #
674
+ # @!attribute [rw] latest_delivery_attempt_time
675
+ # This field is deprecated.
676
+ # @return [String]
677
+ #
678
+ # @!attribute [rw] latest_notification_attempt_time
679
+ # This field is deprecated.
680
+ # @return [String]
681
+ #
682
+ # @!attribute [rw] latest_notification_attempt_succeeded
683
+ # This field is deprecated.
684
+ # @return [String]
685
+ #
686
+ # @!attribute [rw] latest_delivery_attempt_succeeded
687
+ # This field is deprecated.
688
+ # @return [String]
689
+ #
690
+ # @!attribute [rw] time_logging_started
691
+ # This field is deprecated.
692
+ # @return [String]
693
+ #
694
+ # @!attribute [rw] time_logging_stopped
695
+ # This field is deprecated.
696
+ # @return [String]
697
+ #
698
+ class GetTrailStatusResponse < Struct.new(
699
+ :is_logging,
700
+ :latest_delivery_error,
701
+ :latest_notification_error,
702
+ :latest_delivery_time,
703
+ :latest_notification_time,
704
+ :start_logging_time,
705
+ :stop_logging_time,
706
+ :latest_cloud_watch_logs_delivery_error,
707
+ :latest_cloud_watch_logs_delivery_time,
708
+ :latest_digest_delivery_time,
709
+ :latest_digest_delivery_error,
710
+ :latest_delivery_attempt_time,
711
+ :latest_notification_attempt_time,
712
+ :latest_notification_attempt_succeeded,
713
+ :latest_delivery_attempt_succeeded,
714
+ :time_logging_started,
715
+ :time_logging_stopped)
716
+ include Aws::Structure
717
+ end
716
718
 
717
- # Returns the objects or data listed below if successful. Otherwise,
718
- # returns an error.
719
- # @!attribute [rw] public_key_list
720
- # Contains an array of PublicKey objects.
721
- #
722
- # <note markdown="1"> The returned public keys may have validity time ranges that overlap.
723
- #
724
- # </note>
725
- # @return [Array<Types::PublicKey>]
726
- #
727
- # @!attribute [rw] next_token
728
- # Reserved for future use.
729
- # @return [String]
730
- class ListPublicKeysResponse < Struct.new(
731
- :public_key_list,
732
- :next_token)
733
- include Aws::Structure
734
- end
719
+ # Requests the public keys for a specified time range.
720
+ #
721
+ # @note When making an API call, you may pass ListPublicKeysRequest
722
+ # data as a hash:
723
+ #
724
+ # {
725
+ # start_time: Time.now,
726
+ # end_time: Time.now,
727
+ # next_token: "String",
728
+ # }
729
+ #
730
+ # @!attribute [rw] start_time
731
+ # Optionally specifies, in UTC, the start of the time range to look up
732
+ # public keys for CloudTrail digest files. If not specified, the
733
+ # current time is used, and the current public key is returned.
734
+ # @return [Time]
735
+ #
736
+ # @!attribute [rw] end_time
737
+ # Optionally specifies, in UTC, the end of the time range to look up
738
+ # public keys for CloudTrail digest files. If not specified, the
739
+ # current time is used.
740
+ # @return [Time]
741
+ #
742
+ # @!attribute [rw] next_token
743
+ # Reserved for future use.
744
+ # @return [String]
745
+ #
746
+ class ListPublicKeysRequest < Struct.new(
747
+ :start_time,
748
+ :end_time,
749
+ :next_token)
750
+ include Aws::Structure
751
+ end
735
752
 
736
- # Specifies a list of trail tags to return.
737
- # @note When making an API call, pass ListTagsRequest
738
- # data as a hash:
739
- #
740
- # {
741
- # resource_id_list: ["String"], # required
742
- # next_token: "String",
743
- # }
744
- # @!attribute [rw] resource_id_list
745
- # Specifies a list of trail ARNs whose tags will be listed. The list
746
- # has a limit of 20 ARNs. The format of a trail ARN is:
747
- #
748
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
749
- # @return [Array<String>]
750
- #
751
- # @!attribute [rw] next_token
752
- # Reserved for future use.
753
- # @return [String]
754
- class ListTagsRequest < Struct.new(
755
- :resource_id_list,
756
- :next_token)
757
- include Aws::Structure
758
- end
753
+ # Returns the objects or data listed below if successful. Otherwise,
754
+ # returns an error.
755
+ #
756
+ # @!attribute [rw] public_key_list
757
+ # Contains an array of PublicKey objects.
758
+ #
759
+ # <note markdown="1"> The returned public keys may have validity time ranges that overlap.
760
+ #
761
+ # </note>
762
+ # @return [Array<Types::PublicKey>]
763
+ #
764
+ # @!attribute [rw] next_token
765
+ # Reserved for future use.
766
+ # @return [String]
767
+ #
768
+ class ListPublicKeysResponse < Struct.new(
769
+ :public_key_list,
770
+ :next_token)
771
+ include Aws::Structure
772
+ end
759
773
 
760
- # Returns the objects or data listed below if successful. Otherwise,
761
- # returns an error.
762
- # @!attribute [rw] resource_tag_list
763
- # A list of resource tags.
764
- # @return [Array<Types::ResourceTag>]
765
- #
766
- # @!attribute [rw] next_token
767
- # Reserved for future use.
768
- # @return [String]
769
- class ListTagsResponse < Struct.new(
770
- :resource_tag_list,
771
- :next_token)
772
- include Aws::Structure
773
- end
774
+ # Specifies a list of trail tags to return.
775
+ #
776
+ # @note When making an API call, you may pass ListTagsRequest
777
+ # data as a hash:
778
+ #
779
+ # {
780
+ # resource_id_list: ["String"], # required
781
+ # next_token: "String",
782
+ # }
783
+ #
784
+ # @!attribute [rw] resource_id_list
785
+ # Specifies a list of trail ARNs whose tags will be listed. The list
786
+ # has a limit of 20 ARNs. The format of a trail ARN is:
787
+ #
788
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
789
+ # @return [Array<String>]
790
+ #
791
+ # @!attribute [rw] next_token
792
+ # Reserved for future use.
793
+ # @return [String]
794
+ #
795
+ class ListTagsRequest < Struct.new(
796
+ :resource_id_list,
797
+ :next_token)
798
+ include Aws::Structure
799
+ end
774
800
 
775
- # Specifies an attribute and value that filter the events returned.
776
- # @note When making an API call, pass LookupAttribute
777
- # data as a hash:
778
- #
779
- # {
780
- # attribute_key: "EventId", # required, accepts EventId, EventName, Username, ResourceType, ResourceName, EventSource
781
- # attribute_value: "String", # required
782
- # }
783
- # @!attribute [rw] attribute_key
784
- # Specifies an attribute on which to filter the events returned.
785
- # @return [String]
786
- #
787
- # @!attribute [rw] attribute_value
788
- # Specifies a value for the specified AttributeKey.
789
- # @return [String]
790
- class LookupAttribute < Struct.new(
791
- :attribute_key,
792
- :attribute_value)
793
- include Aws::Structure
794
- end
801
+ # Returns the objects or data listed below if successful. Otherwise,
802
+ # returns an error.
803
+ #
804
+ # @!attribute [rw] resource_tag_list
805
+ # A list of resource tags.
806
+ # @return [Array<Types::ResourceTag>]
807
+ #
808
+ # @!attribute [rw] next_token
809
+ # Reserved for future use.
810
+ # @return [String]
811
+ #
812
+ class ListTagsResponse < Struct.new(
813
+ :resource_tag_list,
814
+ :next_token)
815
+ include Aws::Structure
816
+ end
795
817
 
796
- # Contains a request for LookupEvents.
797
- # @note When making an API call, pass LookupEventsRequest
798
- # data as a hash:
799
- #
800
- # {
801
- # lookup_attributes: [
802
- # {
803
- # attribute_key: "EventId", # required, accepts EventId, EventName, Username, ResourceType, ResourceName, EventSource
804
- # attribute_value: "String", # required
805
- # },
806
- # ],
807
- # start_time: Time.now,
808
- # end_time: Time.now,
809
- # max_results: 1,
810
- # next_token: "NextToken",
811
- # }
812
- # @!attribute [rw] lookup_attributes
813
- # Contains a list of lookup attributes. Currently the list can contain
814
- # only one item.
815
- # @return [Array<Types::LookupAttribute>]
816
- #
817
- # @!attribute [rw] start_time
818
- # Specifies that only events that occur after or at the specified time
819
- # are returned. If the specified start time is after the specified end
820
- # time, an error is returned.
821
- # @return [Time]
822
- #
823
- # @!attribute [rw] end_time
824
- # Specifies that only events that occur before or at the specified
825
- # time are returned. If the specified end time is before the specified
826
- # start time, an error is returned.
827
- # @return [Time]
828
- #
829
- # @!attribute [rw] max_results
830
- # The number of events to return. Possible values are 1 through 50.
831
- # The default is 10.
832
- # @return [Integer]
833
- #
834
- # @!attribute [rw] next_token
835
- # The token to use to get the next page of results after a previous
836
- # API call. This token must be passed in with the same parameters that
837
- # were specified in the the original call. For example, if the
838
- # original call specified an AttributeKey of 'Username' with a value
839
- # of 'root', the call with NextToken should include those same
840
- # parameters.
841
- # @return [String]
842
- class LookupEventsRequest < Struct.new(
843
- :lookup_attributes,
844
- :start_time,
845
- :end_time,
846
- :max_results,
847
- :next_token)
848
- include Aws::Structure
849
- end
818
+ # Specifies an attribute and value that filter the events returned.
819
+ #
820
+ # @note When making an API call, you may pass LookupAttribute
821
+ # data as a hash:
822
+ #
823
+ # {
824
+ # attribute_key: "EventId", # required, accepts EventId, EventName, Username, ResourceType, ResourceName, EventSource
825
+ # attribute_value: "String", # required
826
+ # }
827
+ #
828
+ # @!attribute [rw] attribute_key
829
+ # Specifies an attribute on which to filter the events returned.
830
+ # @return [String]
831
+ #
832
+ # @!attribute [rw] attribute_value
833
+ # Specifies a value for the specified AttributeKey.
834
+ # @return [String]
835
+ #
836
+ class LookupAttribute < Struct.new(
837
+ :attribute_key,
838
+ :attribute_value)
839
+ include Aws::Structure
840
+ end
850
841
 
851
- # Contains a response to a LookupEvents action.
852
- # @!attribute [rw] events
853
- # A list of events returned based on the lookup attributes specified
854
- # and the CloudTrail event. The events list is sorted by time. The
855
- # most recent event is listed first.
856
- # @return [Array<Types::Event>]
857
- #
858
- # @!attribute [rw] next_token
859
- # The token to use to get the next page of results after a previous
860
- # API call. If the token does not appear, there are no more results to
861
- # return. The token must be passed in with the same parameters as the
862
- # previous call. For example, if the original call specified an
863
- # AttributeKey of 'Username' with a value of 'root', the call with
864
- # NextToken should include those same parameters.
865
- # @return [String]
866
- class LookupEventsResponse < Struct.new(
867
- :events,
868
- :next_token)
869
- include Aws::Structure
870
- end
842
+ # Contains a request for LookupEvents.
843
+ #
844
+ # @note When making an API call, you may pass LookupEventsRequest
845
+ # data as a hash:
846
+ #
847
+ # {
848
+ # lookup_attributes: [
849
+ # {
850
+ # attribute_key: "EventId", # required, accepts EventId, EventName, Username, ResourceType, ResourceName, EventSource
851
+ # attribute_value: "String", # required
852
+ # },
853
+ # ],
854
+ # start_time: Time.now,
855
+ # end_time: Time.now,
856
+ # max_results: 1,
857
+ # next_token: "NextToken",
858
+ # }
859
+ #
860
+ # @!attribute [rw] lookup_attributes
861
+ # Contains a list of lookup attributes. Currently the list can contain
862
+ # only one item.
863
+ # @return [Array<Types::LookupAttribute>]
864
+ #
865
+ # @!attribute [rw] start_time
866
+ # Specifies that only events that occur after or at the specified time
867
+ # are returned. If the specified start time is after the specified end
868
+ # time, an error is returned.
869
+ # @return [Time]
870
+ #
871
+ # @!attribute [rw] end_time
872
+ # Specifies that only events that occur before or at the specified
873
+ # time are returned. If the specified end time is before the specified
874
+ # start time, an error is returned.
875
+ # @return [Time]
876
+ #
877
+ # @!attribute [rw] max_results
878
+ # The number of events to return. Possible values are 1 through 50.
879
+ # The default is 10.
880
+ # @return [Integer]
881
+ #
882
+ # @!attribute [rw] next_token
883
+ # The token to use to get the next page of results after a previous
884
+ # API call. This token must be passed in with the same parameters that
885
+ # were specified in the the original call. For example, if the
886
+ # original call specified an AttributeKey of 'Username' with a value
887
+ # of 'root', the call with NextToken should include those same
888
+ # parameters.
889
+ # @return [String]
890
+ #
891
+ class LookupEventsRequest < Struct.new(
892
+ :lookup_attributes,
893
+ :start_time,
894
+ :end_time,
895
+ :max_results,
896
+ :next_token)
897
+ include Aws::Structure
898
+ end
871
899
 
872
- # Contains information about a returned public key.
873
- # @!attribute [rw] value
874
- # The DER encoded public key value in PKCS#1 format.
875
- # @return [String]
876
- #
877
- # @!attribute [rw] validity_start_time
878
- # The starting time of validity of the public key.
879
- # @return [Time]
880
- #
881
- # @!attribute [rw] validity_end_time
882
- # The ending time of validity of the public key.
883
- # @return [Time]
884
- #
885
- # @!attribute [rw] fingerprint
886
- # The fingerprint of the public key.
887
- # @return [String]
888
- class PublicKey < Struct.new(
889
- :value,
890
- :validity_start_time,
891
- :validity_end_time,
892
- :fingerprint)
893
- include Aws::Structure
894
- end
900
+ # Contains a response to a LookupEvents action.
901
+ #
902
+ # @!attribute [rw] events
903
+ # A list of events returned based on the lookup attributes specified
904
+ # and the CloudTrail event. The events list is sorted by time. The
905
+ # most recent event is listed first.
906
+ # @return [Array<Types::Event>]
907
+ #
908
+ # @!attribute [rw] next_token
909
+ # The token to use to get the next page of results after a previous
910
+ # API call. If the token does not appear, there are no more results to
911
+ # return. The token must be passed in with the same parameters as the
912
+ # previous call. For example, if the original call specified an
913
+ # AttributeKey of 'Username' with a value of 'root', the call with
914
+ # NextToken should include those same parameters.
915
+ # @return [String]
916
+ #
917
+ class LookupEventsResponse < Struct.new(
918
+ :events,
919
+ :next_token)
920
+ include Aws::Structure
921
+ end
895
922
 
896
- # @note When making an API call, pass PutEventSelectorsRequest
897
- # data as a hash:
898
- #
899
- # {
900
- # trail_name: "String",
901
- # event_selectors: [
902
- # {
903
- # read_write_type: "ReadOnly", # accepts ReadOnly, WriteOnly, All
904
- # include_management_events: false,
905
- # data_resources: [
906
- # {
907
- # type: "String",
908
- # values: ["String"],
909
- # },
910
- # ],
911
- # },
912
- # ],
913
- # }
914
- # @!attribute [rw] trail_name
915
- # Specifies the name of the trail or trail ARN. If you specify a trail
916
- # name, the string must meet the following requirements:
917
- #
918
- # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
919
- # underscores (\_), or dashes (-)
920
- #
921
- # * Start with a letter or number, and end with a letter or number
922
- #
923
- # * Be between 3 and 128 characters
924
- #
925
- # * Have no adjacent periods, underscores or dashes. Names like
926
- # `my-_namespace` and `my--namespace` are invalid.
927
- #
928
- # * Not be in IP address format (for example, 192.168.5.4)
929
- #
930
- # If you specify a trail ARN, it must be in the format:
931
- #
932
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
933
- # @return [String]
934
- #
935
- # @!attribute [rw] event_selectors
936
- # Specifies the settings for your event selectors. You can configure
937
- # up to five event selectors for a trail.
938
- # @return [Array<Types::EventSelector>]
939
- class PutEventSelectorsRequest < Struct.new(
940
- :trail_name,
941
- :event_selectors)
942
- include Aws::Structure
943
- end
923
+ # Contains information about a returned public key.
924
+ #
925
+ # @!attribute [rw] value
926
+ # The DER encoded public key value in PKCS#1 format.
927
+ # @return [String]
928
+ #
929
+ # @!attribute [rw] validity_start_time
930
+ # The starting time of validity of the public key.
931
+ # @return [Time]
932
+ #
933
+ # @!attribute [rw] validity_end_time
934
+ # The ending time of validity of the public key.
935
+ # @return [Time]
936
+ #
937
+ # @!attribute [rw] fingerprint
938
+ # The fingerprint of the public key.
939
+ # @return [String]
940
+ #
941
+ class PublicKey < Struct.new(
942
+ :value,
943
+ :validity_start_time,
944
+ :validity_end_time,
945
+ :fingerprint)
946
+ include Aws::Structure
947
+ end
944
948
 
945
- # @!attribute [rw] trail_arn
946
- # Specifies the ARN of the trail that was updated with event
947
- # selectors. The format of a trail ARN is:
948
- #
949
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
950
- # @return [String]
951
- #
952
- # @!attribute [rw] event_selectors
953
- # Specifies the event selectors configured for your trail.
954
- # @return [Array<Types::EventSelector>]
955
- class PutEventSelectorsResponse < Struct.new(
956
- :trail_arn,
957
- :event_selectors)
958
- include Aws::Structure
959
- end
949
+ # @note When making an API call, you may pass PutEventSelectorsRequest
950
+ # data as a hash:
951
+ #
952
+ # {
953
+ # trail_name: "String",
954
+ # event_selectors: [
955
+ # {
956
+ # read_write_type: "ReadOnly", # accepts ReadOnly, WriteOnly, All
957
+ # include_management_events: false,
958
+ # data_resources: [
959
+ # {
960
+ # type: "String",
961
+ # values: ["String"],
962
+ # },
963
+ # ],
964
+ # },
965
+ # ],
966
+ # }
967
+ #
968
+ # @!attribute [rw] trail_name
969
+ # Specifies the name of the trail or trail ARN. If you specify a trail
970
+ # name, the string must meet the following requirements:
971
+ #
972
+ # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
973
+ # underscores (\_), or dashes (-)
974
+ #
975
+ # * Start with a letter or number, and end with a letter or number
976
+ #
977
+ # * Be between 3 and 128 characters
978
+ #
979
+ # * Have no adjacent periods, underscores or dashes. Names like
980
+ # `my-_namespace` and `my--namespace` are invalid.
981
+ #
982
+ # * Not be in IP address format (for example, 192.168.5.4)
983
+ #
984
+ # If you specify a trail ARN, it must be in the format:
985
+ #
986
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
987
+ # @return [String]
988
+ #
989
+ # @!attribute [rw] event_selectors
990
+ # Specifies the settings for your event selectors. You can configure
991
+ # up to five event selectors for a trail.
992
+ # @return [Array<Types::EventSelector>]
993
+ #
994
+ class PutEventSelectorsRequest < Struct.new(
995
+ :trail_name,
996
+ :event_selectors)
997
+ include Aws::Structure
998
+ end
960
999
 
961
- # Specifies the tags to remove from a trail.
962
- # @note When making an API call, pass RemoveTagsRequest
963
- # data as a hash:
964
- #
965
- # {
966
- # resource_id: "String", # required
967
- # tags_list: [
968
- # {
969
- # key: "String", # required
970
- # value: "String",
971
- # },
972
- # ],
973
- # }
974
- # @!attribute [rw] resource_id
975
- # Specifies the ARN of the trail from which tags should be removed.
976
- # The format of a trail ARN is:
977
- #
978
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
979
- # @return [String]
980
- #
981
- # @!attribute [rw] tags_list
982
- # Specifies a list of tags to be removed.
983
- # @return [Array<Types::Tag>]
984
- class RemoveTagsRequest < Struct.new(
985
- :resource_id,
986
- :tags_list)
987
- include Aws::Structure
988
- end
1000
+ # @!attribute [rw] trail_arn
1001
+ # Specifies the ARN of the trail that was updated with event
1002
+ # selectors. The format of a trail ARN is:
1003
+ #
1004
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
1005
+ # @return [String]
1006
+ #
1007
+ # @!attribute [rw] event_selectors
1008
+ # Specifies the event selectors configured for your trail.
1009
+ # @return [Array<Types::EventSelector>]
1010
+ #
1011
+ class PutEventSelectorsResponse < Struct.new(
1012
+ :trail_arn,
1013
+ :event_selectors)
1014
+ include Aws::Structure
1015
+ end
989
1016
 
990
- # Returns the objects or data listed below if successful. Otherwise,
991
- # returns an error.
992
- class RemoveTagsResponse < Aws::EmptyStructure; end
1017
+ # Specifies the tags to remove from a trail.
1018
+ #
1019
+ # @note When making an API call, you may pass RemoveTagsRequest
1020
+ # data as a hash:
1021
+ #
1022
+ # {
1023
+ # resource_id: "String", # required
1024
+ # tags_list: [
1025
+ # {
1026
+ # key: "String", # required
1027
+ # value: "String",
1028
+ # },
1029
+ # ],
1030
+ # }
1031
+ #
1032
+ # @!attribute [rw] resource_id
1033
+ # Specifies the ARN of the trail from which tags should be removed.
1034
+ # The format of a trail ARN is:
1035
+ #
1036
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
1037
+ # @return [String]
1038
+ #
1039
+ # @!attribute [rw] tags_list
1040
+ # Specifies a list of tags to be removed.
1041
+ # @return [Array<Types::Tag>]
1042
+ #
1043
+ class RemoveTagsRequest < Struct.new(
1044
+ :resource_id,
1045
+ :tags_list)
1046
+ include Aws::Structure
1047
+ end
993
1048
 
994
- # Specifies the type and name of a resource referenced by an event.
995
- # @!attribute [rw] resource_type
996
- # The type of a resource referenced by the event returned. When the
997
- # resource type cannot be determined, null is returned. Some examples
998
- # of resource types are: **Instance** for EC2, **Trail** for
999
- # CloudTrail, **DBInstance** for RDS, and **AccessKey** for IAM. For a
1000
- # list of resource types supported for event lookup, see [Resource
1001
- # Types Supported for Event Lookup][1].
1002
- #
1003
- #
1004
- #
1005
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/lookup_supported_resourcetypes.html
1006
- # @return [String]
1007
- #
1008
- # @!attribute [rw] resource_name
1009
- # The name of the resource referenced by the event returned. These are
1010
- # user-created names whose values will depend on the environment. For
1011
- # example, the resource name might be "auto-scaling-test-group" for
1012
- # an Auto Scaling Group or "i-1234567" for an EC2 Instance.
1013
- # @return [String]
1014
- class Resource < Struct.new(
1015
- :resource_type,
1016
- :resource_name)
1017
- include Aws::Structure
1018
- end
1049
+ # Returns the objects or data listed below if successful. Otherwise,
1050
+ # returns an error.
1051
+ #
1052
+ class RemoveTagsResponse < Aws::EmptyStructure; end
1019
1053
 
1020
- # A resource tag.
1021
- # @!attribute [rw] resource_id
1022
- # Specifies the ARN of the resource.
1023
- # @return [String]
1024
- #
1025
- # @!attribute [rw] tags_list
1026
- # A list of tags.
1027
- # @return [Array<Types::Tag>]
1028
- class ResourceTag < Struct.new(
1029
- :resource_id,
1030
- :tags_list)
1031
- include Aws::Structure
1032
- end
1054
+ # Specifies the type and name of a resource referenced by an event.
1055
+ #
1056
+ # @!attribute [rw] resource_type
1057
+ # The type of a resource referenced by the event returned. When the
1058
+ # resource type cannot be determined, null is returned. Some examples
1059
+ # of resource types are: **Instance** for EC2, **Trail** for
1060
+ # CloudTrail, **DBInstance** for RDS, and **AccessKey** for IAM. For a
1061
+ # list of resource types supported for event lookup, see [Resource
1062
+ # Types Supported for Event Lookup][1].
1063
+ #
1064
+ #
1065
+ #
1066
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/lookup_supported_resourcetypes.html
1067
+ # @return [String]
1068
+ #
1069
+ # @!attribute [rw] resource_name
1070
+ # The name of the resource referenced by the event returned. These are
1071
+ # user-created names whose values will depend on the environment. For
1072
+ # example, the resource name might be "auto-scaling-test-group" for
1073
+ # an Auto Scaling Group or "i-1234567" for an EC2 Instance.
1074
+ # @return [String]
1075
+ #
1076
+ class Resource < Struct.new(
1077
+ :resource_type,
1078
+ :resource_name)
1079
+ include Aws::Structure
1080
+ end
1033
1081
 
1034
- # The request to CloudTrail to start logging AWS API calls for an
1035
- # account.
1036
- # @note When making an API call, pass StartLoggingRequest
1037
- # data as a hash:
1038
- #
1039
- # {
1040
- # name: "String", # required
1041
- # }
1042
- # @!attribute [rw] name
1043
- # Specifies the name or the CloudTrail ARN of the trail for which
1044
- # CloudTrail logs AWS API calls. The format of a trail ARN is:
1045
- #
1046
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
1047
- # @return [String]
1048
- class StartLoggingRequest < Struct.new(
1049
- :name)
1050
- include Aws::Structure
1051
- end
1082
+ # A resource tag.
1083
+ #
1084
+ # @!attribute [rw] resource_id
1085
+ # Specifies the ARN of the resource.
1086
+ # @return [String]
1087
+ #
1088
+ # @!attribute [rw] tags_list
1089
+ # A list of tags.
1090
+ # @return [Array<Types::Tag>]
1091
+ #
1092
+ class ResourceTag < Struct.new(
1093
+ :resource_id,
1094
+ :tags_list)
1095
+ include Aws::Structure
1096
+ end
1052
1097
 
1053
- # Returns the objects or data listed below if successful. Otherwise,
1054
- # returns an error.
1055
- class StartLoggingResponse < Aws::EmptyStructure; end
1098
+ # The request to CloudTrail to start logging AWS API calls for an
1099
+ # account.
1100
+ #
1101
+ # @note When making an API call, you may pass StartLoggingRequest
1102
+ # data as a hash:
1103
+ #
1104
+ # {
1105
+ # name: "String", # required
1106
+ # }
1107
+ #
1108
+ # @!attribute [rw] name
1109
+ # Specifies the name or the CloudTrail ARN of the trail for which
1110
+ # CloudTrail logs AWS API calls. The format of a trail ARN is:
1111
+ #
1112
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
1113
+ # @return [String]
1114
+ #
1115
+ class StartLoggingRequest < Struct.new(
1116
+ :name)
1117
+ include Aws::Structure
1118
+ end
1056
1119
 
1057
- # Passes the request to CloudTrail to stop logging AWS API calls for the
1058
- # specified account.
1059
- # @note When making an API call, pass StopLoggingRequest
1060
- # data as a hash:
1061
- #
1062
- # {
1063
- # name: "String", # required
1064
- # }
1065
- # @!attribute [rw] name
1066
- # Specifies the name or the CloudTrail ARN of the trail for which
1067
- # CloudTrail will stop logging AWS API calls. The format of a trail
1068
- # ARN is:
1069
- #
1070
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
1071
- # @return [String]
1072
- class StopLoggingRequest < Struct.new(
1073
- :name)
1074
- include Aws::Structure
1075
- end
1120
+ # Returns the objects or data listed below if successful. Otherwise,
1121
+ # returns an error.
1122
+ #
1123
+ class StartLoggingResponse < Aws::EmptyStructure; end
1076
1124
 
1077
- # Returns the objects or data listed below if successful. Otherwise,
1078
- # returns an error.
1079
- class StopLoggingResponse < Aws::EmptyStructure; end
1125
+ # Passes the request to CloudTrail to stop logging AWS API calls for the
1126
+ # specified account.
1127
+ #
1128
+ # @note When making an API call, you may pass StopLoggingRequest
1129
+ # data as a hash:
1130
+ #
1131
+ # {
1132
+ # name: "String", # required
1133
+ # }
1134
+ #
1135
+ # @!attribute [rw] name
1136
+ # Specifies the name or the CloudTrail ARN of the trail for which
1137
+ # CloudTrail will stop logging AWS API calls. The format of a trail
1138
+ # ARN is:
1139
+ #
1140
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
1141
+ # @return [String]
1142
+ #
1143
+ class StopLoggingRequest < Struct.new(
1144
+ :name)
1145
+ include Aws::Structure
1146
+ end
1080
1147
 
1081
- # A custom key-value pair associated with a resource such as a
1082
- # CloudTrail trail.
1083
- # @note When making an API call, pass Tag
1084
- # data as a hash:
1085
- #
1086
- # {
1087
- # key: "String", # required
1088
- # value: "String",
1089
- # }
1090
- # @!attribute [rw] key
1091
- # The key in a key-value pair. The key must be must be no longer than
1092
- # 128 Unicode characters. The key must be unique for the resource to
1093
- # which it applies.
1094
- # @return [String]
1095
- #
1096
- # @!attribute [rw] value
1097
- # The value in a key-value pair of a tag. The value must be no longer
1098
- # than 256 Unicode characters.
1099
- # @return [String]
1100
- class Tag < Struct.new(
1101
- :key,
1102
- :value)
1103
- include Aws::Structure
1104
- end
1148
+ # Returns the objects or data listed below if successful. Otherwise,
1149
+ # returns an error.
1150
+ #
1151
+ class StopLoggingResponse < Aws::EmptyStructure; end
1105
1152
 
1106
- # The settings for a trail.
1107
- # @!attribute [rw] name
1108
- # Name of the trail set by calling CreateTrail. The maximum length is
1109
- # 128 characters.
1110
- # @return [String]
1111
- #
1112
- # @!attribute [rw] s3_bucket_name
1113
- # Name of the Amazon S3 bucket into which CloudTrail delivers your
1114
- # trail files. See [Amazon S3 Bucket Naming Requirements][1].
1115
- #
1116
- #
1117
- #
1118
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
1119
- # @return [String]
1120
- #
1121
- # @!attribute [rw] s3_key_prefix
1122
- # Specifies the Amazon S3 key prefix that comes after the name of the
1123
- # bucket you have designated for log file delivery. For more
1124
- # information, see [Finding Your CloudTrail Log Files][1].The maximum
1125
- # length is 200 characters.
1126
- #
1127
- #
1128
- #
1129
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
1130
- # @return [String]
1131
- #
1132
- # @!attribute [rw] sns_topic_name
1133
- # This field is deprecated. Use SnsTopicARN.
1134
- # @return [String]
1135
- #
1136
- # @!attribute [rw] sns_topic_arn
1137
- # Specifies the ARN of the Amazon SNS topic that CloudTrail uses to
1138
- # send notifications when log files are delivered. The format of a
1139
- # topic ARN is:
1140
- #
1141
- # `arn:aws:sns:us-east-1:123456789012:MyTopic`
1142
- # @return [String]
1143
- #
1144
- # @!attribute [rw] include_global_service_events
1145
- # Set to **True** to include AWS API calls from AWS global services
1146
- # such as IAM. Otherwise, **False**.
1147
- # @return [Boolean]
1148
- #
1149
- # @!attribute [rw] is_multi_region_trail
1150
- # Specifies whether the trail belongs only to one region or exists in
1151
- # all regions.
1152
- # @return [Boolean]
1153
- #
1154
- # @!attribute [rw] home_region
1155
- # The region in which the trail was created.
1156
- # @return [String]
1157
- #
1158
- # @!attribute [rw] trail_arn
1159
- # Specifies the ARN of the trail. The format of a trail ARN is:
1160
- #
1161
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
1162
- # @return [String]
1163
- #
1164
- # @!attribute [rw] log_file_validation_enabled
1165
- # Specifies whether log file validation is enabled.
1166
- # @return [Boolean]
1167
- #
1168
- # @!attribute [rw] cloud_watch_logs_log_group_arn
1169
- # Specifies an Amazon Resource Name (ARN), a unique identifier that
1170
- # represents the log group to which CloudTrail logs will be delivered.
1171
- # @return [String]
1172
- #
1173
- # @!attribute [rw] cloud_watch_logs_role_arn
1174
- # Specifies the role for the CloudWatch Logs endpoint to assume to
1175
- # write to a user's log group.
1176
- # @return [String]
1177
- #
1178
- # @!attribute [rw] kms_key_id
1179
- # Specifies the KMS key ID that encrypts the logs delivered by
1180
- # CloudTrail. The value is a fully specified ARN to a KMS key in the
1181
- # format:
1182
- #
1183
- # `arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012`
1184
- # @return [String]
1185
- #
1186
- # @!attribute [rw] has_custom_event_selectors
1187
- # Specifies if the trail has custom event selectors.
1188
- # @return [Boolean]
1189
- class Trail < Struct.new(
1190
- :name,
1191
- :s3_bucket_name,
1192
- :s3_key_prefix,
1193
- :sns_topic_name,
1194
- :sns_topic_arn,
1195
- :include_global_service_events,
1196
- :is_multi_region_trail,
1197
- :home_region,
1198
- :trail_arn,
1199
- :log_file_validation_enabled,
1200
- :cloud_watch_logs_log_group_arn,
1201
- :cloud_watch_logs_role_arn,
1202
- :kms_key_id,
1203
- :has_custom_event_selectors)
1204
- include Aws::Structure
1205
- end
1153
+ # A custom key-value pair associated with a resource such as a
1154
+ # CloudTrail trail.
1155
+ #
1156
+ # @note When making an API call, you may pass Tag
1157
+ # data as a hash:
1158
+ #
1159
+ # {
1160
+ # key: "String", # required
1161
+ # value: "String",
1162
+ # }
1163
+ #
1164
+ # @!attribute [rw] key
1165
+ # The key in a key-value pair. The key must be must be no longer than
1166
+ # 128 Unicode characters. The key must be unique for the resource to
1167
+ # which it applies.
1168
+ # @return [String]
1169
+ #
1170
+ # @!attribute [rw] value
1171
+ # The value in a key-value pair of a tag. The value must be no longer
1172
+ # than 256 Unicode characters.
1173
+ # @return [String]
1174
+ #
1175
+ class Tag < Struct.new(
1176
+ :key,
1177
+ :value)
1178
+ include Aws::Structure
1179
+ end
1206
1180
 
1207
- # Specifies settings to update for the trail.
1208
- # @note When making an API call, pass UpdateTrailRequest
1209
- # data as a hash:
1210
- #
1211
- # {
1212
- # name: "String", # required
1213
- # s3_bucket_name: "String",
1214
- # s3_key_prefix: "String",
1215
- # sns_topic_name: "String",
1216
- # include_global_service_events: false,
1217
- # is_multi_region_trail: false,
1218
- # enable_log_file_validation: false,
1219
- # cloud_watch_logs_log_group_arn: "String",
1220
- # cloud_watch_logs_role_arn: "String",
1221
- # kms_key_id: "String",
1222
- # }
1223
- # @!attribute [rw] name
1224
- # Specifies the name of the trail or trail ARN. If `Name` is a trail
1225
- # name, the string must meet the following requirements:
1226
- #
1227
- # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
1228
- # underscores (\_), or dashes (-)
1229
- #
1230
- # * Start with a letter or number, and end with a letter or number
1231
- #
1232
- # * Be between 3 and 128 characters
1233
- #
1234
- # * Have no adjacent periods, underscores or dashes. Names like
1235
- # `my-_namespace` and `my--namespace` are invalid.
1236
- #
1237
- # * Not be in IP address format (for example, 192.168.5.4)
1238
- #
1239
- # If `Name` is a trail ARN, it must be in the format:
1240
- #
1241
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
1242
- # @return [String]
1243
- #
1244
- # @!attribute [rw] s3_bucket_name
1245
- # Specifies the name of the Amazon S3 bucket designated for publishing
1246
- # log files. See [Amazon S3 Bucket Naming Requirements][1].
1247
- #
1248
- #
1249
- #
1250
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
1251
- # @return [String]
1252
- #
1253
- # @!attribute [rw] s3_key_prefix
1254
- # Specifies the Amazon S3 key prefix that comes after the name of the
1255
- # bucket you have designated for log file delivery. For more
1256
- # information, see [Finding Your CloudTrail Log Files][1]. The maximum
1257
- # length is 200 characters.
1258
- #
1259
- #
1260
- #
1261
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
1262
- # @return [String]
1263
- #
1264
- # @!attribute [rw] sns_topic_name
1265
- # Specifies the name of the Amazon SNS topic defined for notification
1266
- # of log file delivery. The maximum length is 256 characters.
1267
- # @return [String]
1268
- #
1269
- # @!attribute [rw] include_global_service_events
1270
- # Specifies whether the trail is publishing events from global
1271
- # services such as IAM to the log files.
1272
- # @return [Boolean]
1273
- #
1274
- # @!attribute [rw] is_multi_region_trail
1275
- # Specifies whether the trail applies only to the current region or to
1276
- # all regions. The default is false. If the trail exists only in the
1277
- # current region and this value is set to true, shadow trails
1278
- # (replications of the trail) will be created in the other regions. If
1279
- # the trail exists in all regions and this value is set to false, the
1280
- # trail will remain in the region where it was created, and its shadow
1281
- # trails in other regions will be deleted.
1282
- # @return [Boolean]
1283
- #
1284
- # @!attribute [rw] enable_log_file_validation
1285
- # Specifies whether log file validation is enabled. The default is
1286
- # false.
1287
- #
1288
- # <note markdown="1"> When you disable log file integrity validation, the chain of digest
1289
- # files is broken after one hour. CloudTrail will not create digest
1290
- # files for log files that were delivered during a period in which log
1291
- # file integrity validation was disabled. For example, if you enable
1292
- # log file integrity validation at noon on January 1, disable it at
1293
- # noon on January 2, and re-enable it at noon on January 10, digest
1294
- # files will not be created for the log files delivered from noon on
1295
- # January 2 to noon on January 10. The same applies whenever you stop
1296
- # CloudTrail logging or delete a trail.
1297
- #
1298
- # </note>
1299
- # @return [Boolean]
1300
- #
1301
- # @!attribute [rw] cloud_watch_logs_log_group_arn
1302
- # Specifies a log group name using an Amazon Resource Name (ARN), a
1303
- # unique identifier that represents the log group to which CloudTrail
1304
- # logs will be delivered. Not required unless you specify
1305
- # CloudWatchLogsRoleArn.
1306
- # @return [String]
1307
- #
1308
- # @!attribute [rw] cloud_watch_logs_role_arn
1309
- # Specifies the role for the CloudWatch Logs endpoint to assume to
1310
- # write to a user's log group.
1311
- # @return [String]
1312
- #
1313
- # @!attribute [rw] kms_key_id
1314
- # Specifies the KMS key ID to use to encrypt the logs delivered by
1315
- # CloudTrail. The value can be a an alias name prefixed by "alias/",
1316
- # a fully specified ARN to an alias, a fully specified ARN to a key,
1317
- # or a globally unique identifier.
1318
- #
1319
- # Examples:
1320
- #
1321
- # * alias/MyAliasName
1322
- #
1323
- # * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
1324
- #
1325
- # * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
1326
- #
1327
- # * 12345678-1234-1234-1234-123456789012
1328
- # @return [String]
1329
- class UpdateTrailRequest < Struct.new(
1330
- :name,
1331
- :s3_bucket_name,
1332
- :s3_key_prefix,
1333
- :sns_topic_name,
1334
- :include_global_service_events,
1335
- :is_multi_region_trail,
1336
- :enable_log_file_validation,
1337
- :cloud_watch_logs_log_group_arn,
1338
- :cloud_watch_logs_role_arn,
1339
- :kms_key_id)
1340
- include Aws::Structure
1341
- end
1181
+ # The settings for a trail.
1182
+ #
1183
+ # @!attribute [rw] name
1184
+ # Name of the trail set by calling CreateTrail. The maximum length is
1185
+ # 128 characters.
1186
+ # @return [String]
1187
+ #
1188
+ # @!attribute [rw] s3_bucket_name
1189
+ # Name of the Amazon S3 bucket into which CloudTrail delivers your
1190
+ # trail files. See [Amazon S3 Bucket Naming Requirements][1].
1191
+ #
1192
+ #
1193
+ #
1194
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
1195
+ # @return [String]
1196
+ #
1197
+ # @!attribute [rw] s3_key_prefix
1198
+ # Specifies the Amazon S3 key prefix that comes after the name of the
1199
+ # bucket you have designated for log file delivery. For more
1200
+ # information, see [Finding Your CloudTrail Log Files][1].The maximum
1201
+ # length is 200 characters.
1202
+ #
1203
+ #
1204
+ #
1205
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
1206
+ # @return [String]
1207
+ #
1208
+ # @!attribute [rw] sns_topic_name
1209
+ # This field is deprecated. Use SnsTopicARN.
1210
+ # @return [String]
1211
+ #
1212
+ # @!attribute [rw] sns_topic_arn
1213
+ # Specifies the ARN of the Amazon SNS topic that CloudTrail uses to
1214
+ # send notifications when log files are delivered. The format of a
1215
+ # topic ARN is:
1216
+ #
1217
+ # `arn:aws:sns:us-east-1:123456789012:MyTopic`
1218
+ # @return [String]
1219
+ #
1220
+ # @!attribute [rw] include_global_service_events
1221
+ # Set to **True** to include AWS API calls from AWS global services
1222
+ # such as IAM. Otherwise, **False**.
1223
+ # @return [Boolean]
1224
+ #
1225
+ # @!attribute [rw] is_multi_region_trail
1226
+ # Specifies whether the trail belongs only to one region or exists in
1227
+ # all regions.
1228
+ # @return [Boolean]
1229
+ #
1230
+ # @!attribute [rw] home_region
1231
+ # The region in which the trail was created.
1232
+ # @return [String]
1233
+ #
1234
+ # @!attribute [rw] trail_arn
1235
+ # Specifies the ARN of the trail. The format of a trail ARN is:
1236
+ #
1237
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
1238
+ # @return [String]
1239
+ #
1240
+ # @!attribute [rw] log_file_validation_enabled
1241
+ # Specifies whether log file validation is enabled.
1242
+ # @return [Boolean]
1243
+ #
1244
+ # @!attribute [rw] cloud_watch_logs_log_group_arn
1245
+ # Specifies an Amazon Resource Name (ARN), a unique identifier that
1246
+ # represents the log group to which CloudTrail logs will be delivered.
1247
+ # @return [String]
1248
+ #
1249
+ # @!attribute [rw] cloud_watch_logs_role_arn
1250
+ # Specifies the role for the CloudWatch Logs endpoint to assume to
1251
+ # write to a user's log group.
1252
+ # @return [String]
1253
+ #
1254
+ # @!attribute [rw] kms_key_id
1255
+ # Specifies the KMS key ID that encrypts the logs delivered by
1256
+ # CloudTrail. The value is a fully specified ARN to a KMS key in the
1257
+ # format:
1258
+ #
1259
+ # `arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012`
1260
+ # @return [String]
1261
+ #
1262
+ # @!attribute [rw] has_custom_event_selectors
1263
+ # Specifies if the trail has custom event selectors.
1264
+ # @return [Boolean]
1265
+ #
1266
+ class Trail < Struct.new(
1267
+ :name,
1268
+ :s3_bucket_name,
1269
+ :s3_key_prefix,
1270
+ :sns_topic_name,
1271
+ :sns_topic_arn,
1272
+ :include_global_service_events,
1273
+ :is_multi_region_trail,
1274
+ :home_region,
1275
+ :trail_arn,
1276
+ :log_file_validation_enabled,
1277
+ :cloud_watch_logs_log_group_arn,
1278
+ :cloud_watch_logs_role_arn,
1279
+ :kms_key_id,
1280
+ :has_custom_event_selectors)
1281
+ include Aws::Structure
1282
+ end
1342
1283
 
1343
- # Returns the objects or data listed below if successful. Otherwise,
1344
- # returns an error.
1345
- # @!attribute [rw] name
1346
- # Specifies the name of the trail.
1347
- # @return [String]
1348
- #
1349
- # @!attribute [rw] s3_bucket_name
1350
- # Specifies the name of the Amazon S3 bucket designated for publishing
1351
- # log files.
1352
- # @return [String]
1353
- #
1354
- # @!attribute [rw] s3_key_prefix
1355
- # Specifies the Amazon S3 key prefix that comes after the name of the
1356
- # bucket you have designated for log file delivery. For more
1357
- # information, see [Finding Your CloudTrail Log Files][1].
1358
- #
1359
- #
1360
- #
1361
- # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
1362
- # @return [String]
1363
- #
1364
- # @!attribute [rw] sns_topic_name
1365
- # This field is deprecated. Use SnsTopicARN.
1366
- # @return [String]
1367
- #
1368
- # @!attribute [rw] sns_topic_arn
1369
- # Specifies the ARN of the Amazon SNS topic that CloudTrail uses to
1370
- # send notifications when log files are delivered. The format of a
1371
- # topic ARN is:
1372
- #
1373
- # `arn:aws:sns:us-east-1:123456789012:MyTopic`
1374
- # @return [String]
1375
- #
1376
- # @!attribute [rw] include_global_service_events
1377
- # Specifies whether the trail is publishing events from global
1378
- # services such as IAM to the log files.
1379
- # @return [Boolean]
1380
- #
1381
- # @!attribute [rw] is_multi_region_trail
1382
- # Specifies whether the trail exists in one region or in all regions.
1383
- # @return [Boolean]
1384
- #
1385
- # @!attribute [rw] trail_arn
1386
- # Specifies the ARN of the trail that was updated. The format of a
1387
- # trail ARN is:
1388
- #
1389
- # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
1390
- # @return [String]
1391
- #
1392
- # @!attribute [rw] log_file_validation_enabled
1393
- # Specifies whether log file integrity validation is enabled.
1394
- # @return [Boolean]
1395
- #
1396
- # @!attribute [rw] cloud_watch_logs_log_group_arn
1397
- # Specifies the Amazon Resource Name (ARN) of the log group to which
1398
- # CloudTrail logs will be delivered.
1399
- # @return [String]
1400
- #
1401
- # @!attribute [rw] cloud_watch_logs_role_arn
1402
- # Specifies the role for the CloudWatch Logs endpoint to assume to
1403
- # write to a user's log group.
1404
- # @return [String]
1405
- #
1406
- # @!attribute [rw] kms_key_id
1407
- # Specifies the KMS key ID that encrypts the logs delivered by
1408
- # CloudTrail. The value is a fully specified ARN to a KMS key in the
1409
- # format:
1410
- #
1411
- # `arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012`
1412
- # @return [String]
1413
- class UpdateTrailResponse < Struct.new(
1414
- :name,
1415
- :s3_bucket_name,
1416
- :s3_key_prefix,
1417
- :sns_topic_name,
1418
- :sns_topic_arn,
1419
- :include_global_service_events,
1420
- :is_multi_region_trail,
1421
- :trail_arn,
1422
- :log_file_validation_enabled,
1423
- :cloud_watch_logs_log_group_arn,
1424
- :cloud_watch_logs_role_arn,
1425
- :kms_key_id)
1426
- include Aws::Structure
1427
- end
1284
+ # Specifies settings to update for the trail.
1285
+ #
1286
+ # @note When making an API call, you may pass UpdateTrailRequest
1287
+ # data as a hash:
1288
+ #
1289
+ # {
1290
+ # name: "String", # required
1291
+ # s3_bucket_name: "String",
1292
+ # s3_key_prefix: "String",
1293
+ # sns_topic_name: "String",
1294
+ # include_global_service_events: false,
1295
+ # is_multi_region_trail: false,
1296
+ # enable_log_file_validation: false,
1297
+ # cloud_watch_logs_log_group_arn: "String",
1298
+ # cloud_watch_logs_role_arn: "String",
1299
+ # kms_key_id: "String",
1300
+ # }
1301
+ #
1302
+ # @!attribute [rw] name
1303
+ # Specifies the name of the trail or trail ARN. If `Name` is a trail
1304
+ # name, the string must meet the following requirements:
1305
+ #
1306
+ # * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
1307
+ # underscores (\_), or dashes (-)
1308
+ #
1309
+ # * Start with a letter or number, and end with a letter or number
1310
+ #
1311
+ # * Be between 3 and 128 characters
1312
+ #
1313
+ # * Have no adjacent periods, underscores or dashes. Names like
1314
+ # `my-_namespace` and `my--namespace` are invalid.
1315
+ #
1316
+ # * Not be in IP address format (for example, 192.168.5.4)
1317
+ #
1318
+ # If `Name` is a trail ARN, it must be in the format:
1319
+ #
1320
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
1321
+ # @return [String]
1322
+ #
1323
+ # @!attribute [rw] s3_bucket_name
1324
+ # Specifies the name of the Amazon S3 bucket designated for publishing
1325
+ # log files. See [Amazon S3 Bucket Naming Requirements][1].
1326
+ #
1327
+ #
1328
+ #
1329
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html
1330
+ # @return [String]
1331
+ #
1332
+ # @!attribute [rw] s3_key_prefix
1333
+ # Specifies the Amazon S3 key prefix that comes after the name of the
1334
+ # bucket you have designated for log file delivery. For more
1335
+ # information, see [Finding Your CloudTrail Log Files][1]. The maximum
1336
+ # length is 200 characters.
1337
+ #
1338
+ #
1339
+ #
1340
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
1341
+ # @return [String]
1342
+ #
1343
+ # @!attribute [rw] sns_topic_name
1344
+ # Specifies the name of the Amazon SNS topic defined for notification
1345
+ # of log file delivery. The maximum length is 256 characters.
1346
+ # @return [String]
1347
+ #
1348
+ # @!attribute [rw] include_global_service_events
1349
+ # Specifies whether the trail is publishing events from global
1350
+ # services such as IAM to the log files.
1351
+ # @return [Boolean]
1352
+ #
1353
+ # @!attribute [rw] is_multi_region_trail
1354
+ # Specifies whether the trail applies only to the current region or to
1355
+ # all regions. The default is false. If the trail exists only in the
1356
+ # current region and this value is set to true, shadow trails
1357
+ # (replications of the trail) will be created in the other regions. If
1358
+ # the trail exists in all regions and this value is set to false, the
1359
+ # trail will remain in the region where it was created, and its shadow
1360
+ # trails in other regions will be deleted.
1361
+ # @return [Boolean]
1362
+ #
1363
+ # @!attribute [rw] enable_log_file_validation
1364
+ # Specifies whether log file validation is enabled. The default is
1365
+ # false.
1366
+ #
1367
+ # <note markdown="1"> When you disable log file integrity validation, the chain of digest
1368
+ # files is broken after one hour. CloudTrail will not create digest
1369
+ # files for log files that were delivered during a period in which log
1370
+ # file integrity validation was disabled. For example, if you enable
1371
+ # log file integrity validation at noon on January 1, disable it at
1372
+ # noon on January 2, and re-enable it at noon on January 10, digest
1373
+ # files will not be created for the log files delivered from noon on
1374
+ # January 2 to noon on January 10. The same applies whenever you stop
1375
+ # CloudTrail logging or delete a trail.
1376
+ #
1377
+ # </note>
1378
+ # @return [Boolean]
1379
+ #
1380
+ # @!attribute [rw] cloud_watch_logs_log_group_arn
1381
+ # Specifies a log group name using an Amazon Resource Name (ARN), a
1382
+ # unique identifier that represents the log group to which CloudTrail
1383
+ # logs will be delivered. Not required unless you specify
1384
+ # CloudWatchLogsRoleArn.
1385
+ # @return [String]
1386
+ #
1387
+ # @!attribute [rw] cloud_watch_logs_role_arn
1388
+ # Specifies the role for the CloudWatch Logs endpoint to assume to
1389
+ # write to a user's log group.
1390
+ # @return [String]
1391
+ #
1392
+ # @!attribute [rw] kms_key_id
1393
+ # Specifies the KMS key ID to use to encrypt the logs delivered by
1394
+ # CloudTrail. The value can be a an alias name prefixed by "alias/",
1395
+ # a fully specified ARN to an alias, a fully specified ARN to a key,
1396
+ # or a globally unique identifier.
1397
+ #
1398
+ # Examples:
1399
+ #
1400
+ # * alias/MyAliasName
1401
+ #
1402
+ # * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
1403
+ #
1404
+ # * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
1405
+ #
1406
+ # * 12345678-1234-1234-1234-123456789012
1407
+ # @return [String]
1408
+ #
1409
+ class UpdateTrailRequest < Struct.new(
1410
+ :name,
1411
+ :s3_bucket_name,
1412
+ :s3_key_prefix,
1413
+ :sns_topic_name,
1414
+ :include_global_service_events,
1415
+ :is_multi_region_trail,
1416
+ :enable_log_file_validation,
1417
+ :cloud_watch_logs_log_group_arn,
1418
+ :cloud_watch_logs_role_arn,
1419
+ :kms_key_id)
1420
+ include Aws::Structure
1421
+ end
1428
1422
 
1423
+ # Returns the objects or data listed below if successful. Otherwise,
1424
+ # returns an error.
1425
+ #
1426
+ # @!attribute [rw] name
1427
+ # Specifies the name of the trail.
1428
+ # @return [String]
1429
+ #
1430
+ # @!attribute [rw] s3_bucket_name
1431
+ # Specifies the name of the Amazon S3 bucket designated for publishing
1432
+ # log files.
1433
+ # @return [String]
1434
+ #
1435
+ # @!attribute [rw] s3_key_prefix
1436
+ # Specifies the Amazon S3 key prefix that comes after the name of the
1437
+ # bucket you have designated for log file delivery. For more
1438
+ # information, see [Finding Your CloudTrail Log Files][1].
1439
+ #
1440
+ #
1441
+ #
1442
+ # [1]: http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html
1443
+ # @return [String]
1444
+ #
1445
+ # @!attribute [rw] sns_topic_name
1446
+ # This field is deprecated. Use SnsTopicARN.
1447
+ # @return [String]
1448
+ #
1449
+ # @!attribute [rw] sns_topic_arn
1450
+ # Specifies the ARN of the Amazon SNS topic that CloudTrail uses to
1451
+ # send notifications when log files are delivered. The format of a
1452
+ # topic ARN is:
1453
+ #
1454
+ # `arn:aws:sns:us-east-1:123456789012:MyTopic`
1455
+ # @return [String]
1456
+ #
1457
+ # @!attribute [rw] include_global_service_events
1458
+ # Specifies whether the trail is publishing events from global
1459
+ # services such as IAM to the log files.
1460
+ # @return [Boolean]
1461
+ #
1462
+ # @!attribute [rw] is_multi_region_trail
1463
+ # Specifies whether the trail exists in one region or in all regions.
1464
+ # @return [Boolean]
1465
+ #
1466
+ # @!attribute [rw] trail_arn
1467
+ # Specifies the ARN of the trail that was updated. The format of a
1468
+ # trail ARN is:
1469
+ #
1470
+ # `arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail`
1471
+ # @return [String]
1472
+ #
1473
+ # @!attribute [rw] log_file_validation_enabled
1474
+ # Specifies whether log file integrity validation is enabled.
1475
+ # @return [Boolean]
1476
+ #
1477
+ # @!attribute [rw] cloud_watch_logs_log_group_arn
1478
+ # Specifies the Amazon Resource Name (ARN) of the log group to which
1479
+ # CloudTrail logs will be delivered.
1480
+ # @return [String]
1481
+ #
1482
+ # @!attribute [rw] cloud_watch_logs_role_arn
1483
+ # Specifies the role for the CloudWatch Logs endpoint to assume to
1484
+ # write to a user's log group.
1485
+ # @return [String]
1486
+ #
1487
+ # @!attribute [rw] kms_key_id
1488
+ # Specifies the KMS key ID that encrypts the logs delivered by
1489
+ # CloudTrail. The value is a fully specified ARN to a KMS key in the
1490
+ # format:
1491
+ #
1492
+ # `arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012`
1493
+ # @return [String]
1494
+ #
1495
+ class UpdateTrailResponse < Struct.new(
1496
+ :name,
1497
+ :s3_bucket_name,
1498
+ :s3_key_prefix,
1499
+ :sns_topic_name,
1500
+ :sns_topic_arn,
1501
+ :include_global_service_events,
1502
+ :is_multi_region_trail,
1503
+ :trail_arn,
1504
+ :log_file_validation_enabled,
1505
+ :cloud_watch_logs_log_group_arn,
1506
+ :cloud_watch_logs_role_arn,
1507
+ :kms_key_id)
1508
+ include Aws::Structure
1429
1509
  end
1510
+
1430
1511
  end
1431
1512
  end