aws-sdk-cloudwatchlogs 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7e234d9dc793b6738513fe119cf93f14b7f61ac6
4
+ data.tar.gz: b8483e4bacccc4046112694f9b831f81de46eacf
5
+ SHA512:
6
+ metadata.gz: 5f202c57949838355e5352bb1ab8b33f484968728291c77fc2c8364716cd0204b285f1561c8851eb2b165731e122c9767b5294691c95ac7df8bc8cc509c43f82
7
+ data.tar.gz: 36881ede05f7cd013d3320c59004e02b883a4892bf34061caa75f8fff929f976eed22895d1953a11e734e169f819f614846d98763d676229af0d6d94245a0466
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-cloudwatchlogs/types'
12
+ require_relative 'aws-sdk-cloudwatchlogs/client_api'
13
+ require_relative 'aws-sdk-cloudwatchlogs/client'
14
+ require_relative 'aws-sdk-cloudwatchlogs/errors'
15
+ require_relative 'aws-sdk-cloudwatchlogs/resource'
16
+ require_relative 'aws-sdk-cloudwatchlogs/customizations'
17
+
18
+ # This module provides support for Amazon CloudWatch Logs. This module is available in the
19
+ # `aws-sdk-cloudwatchlogs` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from Amazon CloudWatch Logs all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::CloudWatchLogs::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::CloudWatchLogs
44
+
45
+ GEM_VERSION = '1.0.0.rc1'
46
+
47
+ end
@@ -0,0 +1,1128 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/signature_v4.rb'
22
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:cloudwatchlogs)
25
+
26
+ module Aws
27
+ module CloudWatchLogs
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :cloudwatchlogs
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::SignatureV4)
50
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
51
+
52
+ # @option options [required, Aws::CredentialProvider] :credentials
53
+ # Your AWS credentials. This can be an instance of any one of the
54
+ # following classes:
55
+ #
56
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
57
+ # credentials.
58
+ #
59
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
60
+ # from an EC2 IMDS on an EC2 instance.
61
+ #
62
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
63
+ # shared file, such as `~/.aws/config`.
64
+ #
65
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
66
+ #
67
+ # When `:credentials` are not configured directly, the following
68
+ # locations will be searched for credentials:
69
+ #
70
+ # * `Aws.config[:credentials]`
71
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
72
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
73
+ # * `~/.aws/credentials`
74
+ # * `~/.aws/config`
75
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
76
+ # very aggressive. Construct and pass an instance of
77
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
78
+ # timeouts.
79
+ # @option options [required, String] :region
80
+ # The AWS region to connect to. The configured `:region` is
81
+ # used to determine the service `:endpoint`. When not passed,
82
+ # a default `:region` is search for in the following locations:
83
+ #
84
+ # * `Aws.config[:region]`
85
+ # * `ENV['AWS_REGION']`
86
+ # * `ENV['AMAZON_REGION']`
87
+ # * `ENV['AWS_DEFAULT_REGION']`
88
+ # * `~/.aws/credentials`
89
+ # * `~/.aws/config`
90
+ # @option options [String] :access_key_id
91
+ # @option options [Boolean] :convert_params (true)
92
+ # When `true`, an attempt is made to coerce request parameters into
93
+ # the required types.
94
+ # @option options [String] :endpoint
95
+ # The client endpoint is normally constructed from the `:region`
96
+ # option. You should only configure an `:endpoint` when connecting
97
+ # to test endpoints. This should be avalid HTTP(S) URI.
98
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
99
+ # The log formatter.
100
+ # @option options [Symbol] :log_level (:info)
101
+ # The log level to send messages to the `:logger` at.
102
+ # @option options [Logger] :logger
103
+ # The Logger instance to send log messages to. If this option
104
+ # is not set, logging will be disabled.
105
+ # @option options [String] :profile ("default")
106
+ # Used when loading credentials from the shared credentials file
107
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
108
+ # @option options [Integer] :retry_limit (3)
109
+ # The maximum number of times to retry failed requests. Only
110
+ # ~ 500 level server errors and certain ~ 400 level client errors
111
+ # are retried. Generally, these are throttling errors, data
112
+ # checksum errors, networking errors, timeout errors and auth
113
+ # errors from expired credentials.
114
+ # @option options [String] :secret_access_key
115
+ # @option options [String] :session_token
116
+ # @option options [Boolean] :simple_json (false)
117
+ # Disables request parameter conversion, validation, and formatting.
118
+ # Also disable response data type conversions. This option is useful
119
+ # when you want to ensure the highest level of performance by
120
+ # avoiding overhead of walking request parameters and response data
121
+ # structures.
122
+ #
123
+ # When `:simple_json` is enabled, the request parameters hash must
124
+ # be formatted exactly as the DynamoDB API expects.
125
+ # @option options [Boolean] :stub_responses (false)
126
+ # Causes the client to return stubbed responses. By default
127
+ # fake responses are generated and returned. You can specify
128
+ # the response data to return or errors to raise by calling
129
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
130
+ #
131
+ # ** Please note ** When response stubbing is enabled, no HTTP
132
+ # requests are made, and retries are disabled.
133
+ # @option options [Boolean] :validate_params (true)
134
+ # When `true`, request parameters are validated before
135
+ # sending the request.
136
+ def initialize(*args)
137
+ super
138
+ end
139
+
140
+ # @!group API Operations
141
+
142
+ # Cancels the specified export task.
143
+ #
144
+ # The task must be in the `PENDING` or `RUNNING` state.
145
+ # @option params [required, String] :task_id
146
+ # The ID of the export task.
147
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
148
+ #
149
+ # @example Request syntax with placeholder values
150
+ # resp = client.cancel_export_task({
151
+ # task_id: "ExportTaskId", # required
152
+ # })
153
+ # @overload cancel_export_task(params = {})
154
+ # @param [Hash] params ({})
155
+ def cancel_export_task(params = {}, options = {})
156
+ req = build_request(:cancel_export_task, params)
157
+ req.send_request(options)
158
+ end
159
+
160
+ # Creates an export task, which allows you to efficiently export data
161
+ # from a log group to an Amazon S3 bucket.
162
+ #
163
+ # This is an asynchronous call. If all the required information is
164
+ # provided, this operation initiates an export task and responds with
165
+ # the ID of the task. After the task has started, you can use
166
+ # DescribeExportTasks to get the status of the export task. Each account
167
+ # can only have one active (`RUNNING` or `PENDING`) export task at a
168
+ # time. To cancel an export task, use CancelExportTask.
169
+ #
170
+ # You can export logs from multiple log groups or multiple time ranges
171
+ # to the same S3 bucket. To separate out log data for each export task,
172
+ # you can specify a prefix that will be used as the Amazon S3 key prefix
173
+ # for all exported objects.
174
+ # @option params [String] :task_name
175
+ # The name of the export task.
176
+ # @option params [required, String] :log_group_name
177
+ # The name of the log group.
178
+ # @option params [String] :log_stream_name_prefix
179
+ # Export only log streams that match the provided prefix. If you don't
180
+ # specify a value, no prefix filter is applied.
181
+ # @option params [required, Integer] :from
182
+ # The start time of the range for the request, expressed as the number
183
+ # of milliseconds since Jan 1, 1970 00:00:00 UTC. Events with a
184
+ # timestamp earlier than this time are not exported.
185
+ # @option params [required, Integer] :to
186
+ # The end time of the range for the request, expressed as the number of
187
+ # milliseconds since Jan 1, 1970 00:00:00 UTC. Events with a timestamp
188
+ # later than this time are not exported.
189
+ # @option params [required, String] :destination
190
+ # The name of S3 bucket for the exported log data. The bucket must be in
191
+ # the same AWS region.
192
+ # @option params [String] :destination_prefix
193
+ # The prefix used as the start of the key for every object exported. If
194
+ # you don't specify a value, the default is `exportedlogs`.
195
+ # @return [Types::CreateExportTaskResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
196
+ #
197
+ # * {Types::CreateExportTaskResponse#task_id #taskId} => String
198
+ #
199
+ # @example Request syntax with placeholder values
200
+ # resp = client.create_export_task({
201
+ # task_name: "ExportTaskName",
202
+ # log_group_name: "LogGroupName", # required
203
+ # log_stream_name_prefix: "LogStreamName",
204
+ # from: 1, # required
205
+ # to: 1, # required
206
+ # destination: "ExportDestinationBucket", # required
207
+ # destination_prefix: "ExportDestinationPrefix",
208
+ # })
209
+ #
210
+ # @example Response structure
211
+ # resp.task_id #=> String
212
+ # @overload create_export_task(params = {})
213
+ # @param [Hash] params ({})
214
+ def create_export_task(params = {}, options = {})
215
+ req = build_request(:create_export_task, params)
216
+ req.send_request(options)
217
+ end
218
+
219
+ # Creates a log group with the specified name.
220
+ #
221
+ # You can create up to 5000 log groups per account.
222
+ #
223
+ # You must use the following guidelines when naming a log group:
224
+ #
225
+ # * Log group names must be unique within a region for an AWS account.
226
+ #
227
+ # * Log group names can be between 1 and 512 characters long.
228
+ #
229
+ # * Log group names consist of the following characters: a-z, A-Z, 0-9,
230
+ # '\_' (underscore), '-' (hyphen), '/' (forward slash), and
231
+ # '.' (period).
232
+ # @option params [required, String] :log_group_name
233
+ # The name of the log group.
234
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
235
+ #
236
+ # @example Request syntax with placeholder values
237
+ # resp = client.create_log_group({
238
+ # log_group_name: "LogGroupName", # required
239
+ # })
240
+ # @overload create_log_group(params = {})
241
+ # @param [Hash] params ({})
242
+ def create_log_group(params = {}, options = {})
243
+ req = build_request(:create_log_group, params)
244
+ req.send_request(options)
245
+ end
246
+
247
+ # Creates a log stream for the specified log group.
248
+ #
249
+ # There is no limit on the number of log streams that you can create for
250
+ # a log group.
251
+ #
252
+ # You must use the following guidelines when naming a log stream:
253
+ #
254
+ # * Log stream names must be unique within the log group.
255
+ #
256
+ # * Log stream names can be between 1 and 512 characters long.
257
+ #
258
+ # * The ':' (colon) and '*' (asterisk) characters are not allowed.
259
+ # @option params [required, String] :log_group_name
260
+ # The name of the log group.
261
+ # @option params [required, String] :log_stream_name
262
+ # The name of the log stream.
263
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
264
+ #
265
+ # @example Request syntax with placeholder values
266
+ # resp = client.create_log_stream({
267
+ # log_group_name: "LogGroupName", # required
268
+ # log_stream_name: "LogStreamName", # required
269
+ # })
270
+ # @overload create_log_stream(params = {})
271
+ # @param [Hash] params ({})
272
+ def create_log_stream(params = {}, options = {})
273
+ req = build_request(:create_log_stream, params)
274
+ req.send_request(options)
275
+ end
276
+
277
+ # Deletes the specified destination, and eventually disables all the
278
+ # subscription filters that publish to it. This operation does not
279
+ # delete the physical resource encapsulated by the destination.
280
+ # @option params [required, String] :destination_name
281
+ # The name of the destination.
282
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
283
+ #
284
+ # @example Request syntax with placeholder values
285
+ # resp = client.delete_destination({
286
+ # destination_name: "DestinationName", # required
287
+ # })
288
+ # @overload delete_destination(params = {})
289
+ # @param [Hash] params ({})
290
+ def delete_destination(params = {}, options = {})
291
+ req = build_request(:delete_destination, params)
292
+ req.send_request(options)
293
+ end
294
+
295
+ # Deletes the specified log group and permanently deletes all the
296
+ # archived log events associated with the log group.
297
+ # @option params [required, String] :log_group_name
298
+ # The name of the log group.
299
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
300
+ #
301
+ # @example Request syntax with placeholder values
302
+ # resp = client.delete_log_group({
303
+ # log_group_name: "LogGroupName", # required
304
+ # })
305
+ # @overload delete_log_group(params = {})
306
+ # @param [Hash] params ({})
307
+ def delete_log_group(params = {}, options = {})
308
+ req = build_request(:delete_log_group, params)
309
+ req.send_request(options)
310
+ end
311
+
312
+ # Deletes the specified log stream and permanently deletes all the
313
+ # archived log events associated with the log stream.
314
+ # @option params [required, String] :log_group_name
315
+ # The name of the log group.
316
+ # @option params [required, String] :log_stream_name
317
+ # The name of the log stream.
318
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
319
+ #
320
+ # @example Request syntax with placeholder values
321
+ # resp = client.delete_log_stream({
322
+ # log_group_name: "LogGroupName", # required
323
+ # log_stream_name: "LogStreamName", # required
324
+ # })
325
+ # @overload delete_log_stream(params = {})
326
+ # @param [Hash] params ({})
327
+ def delete_log_stream(params = {}, options = {})
328
+ req = build_request(:delete_log_stream, params)
329
+ req.send_request(options)
330
+ end
331
+
332
+ # Deletes the specified metric filter.
333
+ # @option params [required, String] :log_group_name
334
+ # The name of the log group.
335
+ # @option params [required, String] :filter_name
336
+ # The name of the metric filter.
337
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
338
+ #
339
+ # @example Request syntax with placeholder values
340
+ # resp = client.delete_metric_filter({
341
+ # log_group_name: "LogGroupName", # required
342
+ # filter_name: "FilterName", # required
343
+ # })
344
+ # @overload delete_metric_filter(params = {})
345
+ # @param [Hash] params ({})
346
+ def delete_metric_filter(params = {}, options = {})
347
+ req = build_request(:delete_metric_filter, params)
348
+ req.send_request(options)
349
+ end
350
+
351
+ # Deletes the specified retention policy.
352
+ #
353
+ # Log events do not expire if they belong to log groups without a
354
+ # retention policy.
355
+ # @option params [required, String] :log_group_name
356
+ # The name of the log group.
357
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
358
+ #
359
+ # @example Request syntax with placeholder values
360
+ # resp = client.delete_retention_policy({
361
+ # log_group_name: "LogGroupName", # required
362
+ # })
363
+ # @overload delete_retention_policy(params = {})
364
+ # @param [Hash] params ({})
365
+ def delete_retention_policy(params = {}, options = {})
366
+ req = build_request(:delete_retention_policy, params)
367
+ req.send_request(options)
368
+ end
369
+
370
+ # Deletes the specified subscription filter.
371
+ # @option params [required, String] :log_group_name
372
+ # The name of the log group.
373
+ # @option params [required, String] :filter_name
374
+ # The name of the subscription filter.
375
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
376
+ #
377
+ # @example Request syntax with placeholder values
378
+ # resp = client.delete_subscription_filter({
379
+ # log_group_name: "LogGroupName", # required
380
+ # filter_name: "FilterName", # required
381
+ # })
382
+ # @overload delete_subscription_filter(params = {})
383
+ # @param [Hash] params ({})
384
+ def delete_subscription_filter(params = {}, options = {})
385
+ req = build_request(:delete_subscription_filter, params)
386
+ req.send_request(options)
387
+ end
388
+
389
+ # Lists all your destinations. The results are ASCII-sorted by
390
+ # destination name.
391
+ # @option params [String] :destination_name_prefix
392
+ # The prefix to match. If you don't specify a value, no prefix filter
393
+ # is applied.
394
+ # @option params [String] :next_token
395
+ # The token for the next set of items to return. (You received this
396
+ # token from a previous call.)
397
+ # @option params [Integer] :limit
398
+ # The maximum number of items returned. If you don't specify a value,
399
+ # the default is up to 50 items.
400
+ # @return [Types::DescribeDestinationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
401
+ #
402
+ # * {Types::DescribeDestinationsResponse#destinations #destinations} => Array&lt;Types::Destination&gt;
403
+ # * {Types::DescribeDestinationsResponse#next_token #nextToken} => String
404
+ #
405
+ # @example Request syntax with placeholder values
406
+ # resp = client.describe_destinations({
407
+ # destination_name_prefix: "DestinationName",
408
+ # next_token: "NextToken",
409
+ # limit: 1,
410
+ # })
411
+ #
412
+ # @example Response structure
413
+ # resp.destinations #=> Array
414
+ # resp.destinations[0].destination_name #=> String
415
+ # resp.destinations[0].target_arn #=> String
416
+ # resp.destinations[0].role_arn #=> String
417
+ # resp.destinations[0].access_policy #=> String
418
+ # resp.destinations[0].arn #=> String
419
+ # resp.destinations[0].creation_time #=> Integer
420
+ # resp.next_token #=> String
421
+ # @overload describe_destinations(params = {})
422
+ # @param [Hash] params ({})
423
+ def describe_destinations(params = {}, options = {})
424
+ req = build_request(:describe_destinations, params)
425
+ req.send_request(options)
426
+ end
427
+
428
+ # Lists the specified export tasks. You can list all your export tasks
429
+ # or filter the results based on task ID or task status.
430
+ # @option params [String] :task_id
431
+ # The ID of the export task. Specifying a task ID filters the results to
432
+ # zero or one export tasks.
433
+ # @option params [String] :status_code
434
+ # The status code of the export task. Specifying a status code filters
435
+ # the results to zero or more export tasks.
436
+ # @option params [String] :next_token
437
+ # The token for the next set of items to return. (You received this
438
+ # token from a previous call.)
439
+ # @option params [Integer] :limit
440
+ # The maximum number of items returned. If you don't specify a value,
441
+ # the default is up to 50 items.
442
+ # @return [Types::DescribeExportTasksResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
443
+ #
444
+ # * {Types::DescribeExportTasksResponse#export_tasks #exportTasks} => Array&lt;Types::ExportTask&gt;
445
+ # * {Types::DescribeExportTasksResponse#next_token #nextToken} => String
446
+ #
447
+ # @example Request syntax with placeholder values
448
+ # resp = client.describe_export_tasks({
449
+ # task_id: "ExportTaskId",
450
+ # status_code: "CANCELLED", # accepts CANCELLED, COMPLETED, FAILED, PENDING, PENDING_CANCEL, RUNNING
451
+ # next_token: "NextToken",
452
+ # limit: 1,
453
+ # })
454
+ #
455
+ # @example Response structure
456
+ # resp.export_tasks #=> Array
457
+ # resp.export_tasks[0].task_id #=> String
458
+ # resp.export_tasks[0].task_name #=> String
459
+ # resp.export_tasks[0].log_group_name #=> String
460
+ # resp.export_tasks[0].from #=> Integer
461
+ # resp.export_tasks[0].to #=> Integer
462
+ # resp.export_tasks[0].destination #=> String
463
+ # resp.export_tasks[0].destination_prefix #=> String
464
+ # resp.export_tasks[0].status.code #=> String, one of "CANCELLED", "COMPLETED", "FAILED", "PENDING", "PENDING_CANCEL", "RUNNING"
465
+ # resp.export_tasks[0].status.message #=> String
466
+ # resp.export_tasks[0].execution_info.creation_time #=> Integer
467
+ # resp.export_tasks[0].execution_info.completion_time #=> Integer
468
+ # resp.next_token #=> String
469
+ # @overload describe_export_tasks(params = {})
470
+ # @param [Hash] params ({})
471
+ def describe_export_tasks(params = {}, options = {})
472
+ req = build_request(:describe_export_tasks, params)
473
+ req.send_request(options)
474
+ end
475
+
476
+ # Lists the specified log groups. You can list all your log groups or
477
+ # filter the results by prefix. The results are ASCII-sorted by log
478
+ # group name.
479
+ # @option params [String] :log_group_name_prefix
480
+ # The prefix to match.
481
+ # @option params [String] :next_token
482
+ # The token for the next set of items to return. (You received this
483
+ # token from a previous call.)
484
+ # @option params [Integer] :limit
485
+ # The maximum number of items returned. If you don't specify a value,
486
+ # the default is up to 50 items.
487
+ # @return [Types::DescribeLogGroupsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
488
+ #
489
+ # * {Types::DescribeLogGroupsResponse#log_groups #logGroups} => Array&lt;Types::LogGroup&gt;
490
+ # * {Types::DescribeLogGroupsResponse#next_token #nextToken} => String
491
+ #
492
+ # @example Request syntax with placeholder values
493
+ # resp = client.describe_log_groups({
494
+ # log_group_name_prefix: "LogGroupName",
495
+ # next_token: "NextToken",
496
+ # limit: 1,
497
+ # })
498
+ #
499
+ # @example Response structure
500
+ # resp.log_groups #=> Array
501
+ # resp.log_groups[0].log_group_name #=> String
502
+ # resp.log_groups[0].creation_time #=> Integer
503
+ # resp.log_groups[0].retention_in_days #=> Integer
504
+ # resp.log_groups[0].metric_filter_count #=> Integer
505
+ # resp.log_groups[0].arn #=> String
506
+ # resp.log_groups[0].stored_bytes #=> Integer
507
+ # resp.next_token #=> String
508
+ # @overload describe_log_groups(params = {})
509
+ # @param [Hash] params ({})
510
+ def describe_log_groups(params = {}, options = {})
511
+ req = build_request(:describe_log_groups, params)
512
+ req.send_request(options)
513
+ end
514
+
515
+ # Lists the log streams for the specified log group. You can list all
516
+ # the log streams or filter the results by prefix. You can also control
517
+ # how the results are ordered.
518
+ #
519
+ # This operation has a limit of five transactions per second, after
520
+ # which transactions are throttled.
521
+ # @option params [required, String] :log_group_name
522
+ # The name of the log group.
523
+ # @option params [String] :log_stream_name_prefix
524
+ # The prefix to match.
525
+ #
526
+ # You cannot specify this parameter if `orderBy` is `LastEventTime`.
527
+ # @option params [String] :order_by
528
+ # If the value is `LogStreamName`, the results are ordered by log stream
529
+ # name. If the value is `LastEventTime`, the results are ordered by the
530
+ # event time. The default value is `LogStreamName`.
531
+ #
532
+ # If you order the results by event time, you cannot specify the
533
+ # `logStreamNamePrefix` parameter.
534
+ # @option params [Boolean] :descending
535
+ # If the value is true, results are returned in descending order. If the
536
+ # value is to false, results are returned in ascending order. The
537
+ # default value is false.
538
+ # @option params [String] :next_token
539
+ # The token for the next set of items to return. (You received this
540
+ # token from a previous call.)
541
+ # @option params [Integer] :limit
542
+ # The maximum number of items returned. If you don't specify a value,
543
+ # the default is up to 50 items.
544
+ # @return [Types::DescribeLogStreamsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
545
+ #
546
+ # * {Types::DescribeLogStreamsResponse#log_streams #logStreams} => Array&lt;Types::LogStream&gt;
547
+ # * {Types::DescribeLogStreamsResponse#next_token #nextToken} => String
548
+ #
549
+ # @example Request syntax with placeholder values
550
+ # resp = client.describe_log_streams({
551
+ # log_group_name: "LogGroupName", # required
552
+ # log_stream_name_prefix: "LogStreamName",
553
+ # order_by: "LogStreamName", # accepts LogStreamName, LastEventTime
554
+ # descending: false,
555
+ # next_token: "NextToken",
556
+ # limit: 1,
557
+ # })
558
+ #
559
+ # @example Response structure
560
+ # resp.log_streams #=> Array
561
+ # resp.log_streams[0].log_stream_name #=> String
562
+ # resp.log_streams[0].creation_time #=> Integer
563
+ # resp.log_streams[0].first_event_timestamp #=> Integer
564
+ # resp.log_streams[0].last_event_timestamp #=> Integer
565
+ # resp.log_streams[0].last_ingestion_time #=> Integer
566
+ # resp.log_streams[0].upload_sequence_token #=> String
567
+ # resp.log_streams[0].arn #=> String
568
+ # resp.log_streams[0].stored_bytes #=> Integer
569
+ # resp.next_token #=> String
570
+ # @overload describe_log_streams(params = {})
571
+ # @param [Hash] params ({})
572
+ def describe_log_streams(params = {}, options = {})
573
+ req = build_request(:describe_log_streams, params)
574
+ req.send_request(options)
575
+ end
576
+
577
+ # Lists the specified metric filters. You can list all the metric
578
+ # filters or filter the results by log name, prefix, metric name, or
579
+ # metric namespace. The results are ASCII-sorted by filter name.
580
+ # @option params [String] :log_group_name
581
+ # The name of the log group.
582
+ # @option params [String] :filter_name_prefix
583
+ # The prefix to match.
584
+ # @option params [String] :next_token
585
+ # The token for the next set of items to return. (You received this
586
+ # token from a previous call.)
587
+ # @option params [Integer] :limit
588
+ # The maximum number of items returned. If you don't specify a value,
589
+ # the default is up to 50 items.
590
+ # @option params [String] :metric_name
591
+ # The name of the CloudWatch metric.
592
+ # @option params [String] :metric_namespace
593
+ # The namespace of the CloudWatch metric.
594
+ # @return [Types::DescribeMetricFiltersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
595
+ #
596
+ # * {Types::DescribeMetricFiltersResponse#metric_filters #metricFilters} => Array&lt;Types::MetricFilter&gt;
597
+ # * {Types::DescribeMetricFiltersResponse#next_token #nextToken} => String
598
+ #
599
+ # @example Request syntax with placeholder values
600
+ # resp = client.describe_metric_filters({
601
+ # log_group_name: "LogGroupName",
602
+ # filter_name_prefix: "FilterName",
603
+ # next_token: "NextToken",
604
+ # limit: 1,
605
+ # metric_name: "MetricName",
606
+ # metric_namespace: "MetricNamespace",
607
+ # })
608
+ #
609
+ # @example Response structure
610
+ # resp.metric_filters #=> Array
611
+ # resp.metric_filters[0].filter_name #=> String
612
+ # resp.metric_filters[0].filter_pattern #=> String
613
+ # resp.metric_filters[0].metric_transformations #=> Array
614
+ # resp.metric_filters[0].metric_transformations[0].metric_name #=> String
615
+ # resp.metric_filters[0].metric_transformations[0].metric_namespace #=> String
616
+ # resp.metric_filters[0].metric_transformations[0].metric_value #=> String
617
+ # resp.metric_filters[0].metric_transformations[0].default_value #=> Float
618
+ # resp.metric_filters[0].creation_time #=> Integer
619
+ # resp.metric_filters[0].log_group_name #=> String
620
+ # resp.next_token #=> String
621
+ # @overload describe_metric_filters(params = {})
622
+ # @param [Hash] params ({})
623
+ def describe_metric_filters(params = {}, options = {})
624
+ req = build_request(:describe_metric_filters, params)
625
+ req.send_request(options)
626
+ end
627
+
628
+ # Lists the subscription filters for the specified log group. You can
629
+ # list all the subscription filters or filter the results by prefix. The
630
+ # results are ASCII-sorted by filter name.
631
+ # @option params [required, String] :log_group_name
632
+ # The name of the log group.
633
+ # @option params [String] :filter_name_prefix
634
+ # The prefix to match. If you don't specify a value, no prefix filter
635
+ # is applied.
636
+ # @option params [String] :next_token
637
+ # The token for the next set of items to return. (You received this
638
+ # token from a previous call.)
639
+ # @option params [Integer] :limit
640
+ # The maximum number of items returned. If you don't specify a value,
641
+ # the default is up to 50 items.
642
+ # @return [Types::DescribeSubscriptionFiltersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
643
+ #
644
+ # * {Types::DescribeSubscriptionFiltersResponse#subscription_filters #subscriptionFilters} => Array&lt;Types::SubscriptionFilter&gt;
645
+ # * {Types::DescribeSubscriptionFiltersResponse#next_token #nextToken} => String
646
+ #
647
+ # @example Request syntax with placeholder values
648
+ # resp = client.describe_subscription_filters({
649
+ # log_group_name: "LogGroupName", # required
650
+ # filter_name_prefix: "FilterName",
651
+ # next_token: "NextToken",
652
+ # limit: 1,
653
+ # })
654
+ #
655
+ # @example Response structure
656
+ # resp.subscription_filters #=> Array
657
+ # resp.subscription_filters[0].filter_name #=> String
658
+ # resp.subscription_filters[0].log_group_name #=> String
659
+ # resp.subscription_filters[0].filter_pattern #=> String
660
+ # resp.subscription_filters[0].destination_arn #=> String
661
+ # resp.subscription_filters[0].role_arn #=> String
662
+ # resp.subscription_filters[0].creation_time #=> Integer
663
+ # resp.next_token #=> String
664
+ # @overload describe_subscription_filters(params = {})
665
+ # @param [Hash] params ({})
666
+ def describe_subscription_filters(params = {}, options = {})
667
+ req = build_request(:describe_subscription_filters, params)
668
+ req.send_request(options)
669
+ end
670
+
671
+ # Lists log events from the specified log group. You can list all the
672
+ # log events or filter the results using a filter pattern, a time range,
673
+ # and the name of the log stream.
674
+ #
675
+ # By default, this operation returns as many log events as can fit in
676
+ # 1MB (up to 10,000 log events), or all the events found within the time
677
+ # range that you specify. If the results include a token, then there are
678
+ # more log events available, and you can get additional results by
679
+ # specifying the token in a subsequent call.
680
+ # @option params [required, String] :log_group_name
681
+ # The name of the log group.
682
+ # @option params [Array<String>] :log_stream_names
683
+ # Optional list of log stream names.
684
+ # @option params [Integer] :start_time
685
+ # The start of the time range. Events with a timestamp prior to this
686
+ # time are not returned.
687
+ # @option params [Integer] :end_time
688
+ # The end of the time range. Events with a timestamp later than this
689
+ # time are not returned.
690
+ # @option params [String] :filter_pattern
691
+ # The filter pattern to use. If not provided, all the events are
692
+ # matched.
693
+ # @option params [String] :next_token
694
+ # The token for the next set of events to return. (You received this
695
+ # token from a previous call.)
696
+ # @option params [Integer] :limit
697
+ # The maximum number of events to return. The default is 10,000 events.
698
+ # @option params [Boolean] :interleaved
699
+ # If the value is true, the operation makes a best effort to provide
700
+ # responses that contain events from multiple log streams within the log
701
+ # group interleaved in a single response. If the value is false all the
702
+ # matched log events in the first log stream are searched first, then
703
+ # those in the next log stream, and so on. The default is false.
704
+ # @return [Types::FilterLogEventsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
705
+ #
706
+ # * {Types::FilterLogEventsResponse#events #events} => Array&lt;Types::FilteredLogEvent&gt;
707
+ # * {Types::FilterLogEventsResponse#searched_log_streams #searchedLogStreams} => Array&lt;Types::SearchedLogStream&gt;
708
+ # * {Types::FilterLogEventsResponse#next_token #nextToken} => String
709
+ #
710
+ # @example Request syntax with placeholder values
711
+ # resp = client.filter_log_events({
712
+ # log_group_name: "LogGroupName", # required
713
+ # log_stream_names: ["LogStreamName"],
714
+ # start_time: 1,
715
+ # end_time: 1,
716
+ # filter_pattern: "FilterPattern",
717
+ # next_token: "NextToken",
718
+ # limit: 1,
719
+ # interleaved: false,
720
+ # })
721
+ #
722
+ # @example Response structure
723
+ # resp.events #=> Array
724
+ # resp.events[0].log_stream_name #=> String
725
+ # resp.events[0].timestamp #=> Integer
726
+ # resp.events[0].message #=> String
727
+ # resp.events[0].ingestion_time #=> Integer
728
+ # resp.events[0].event_id #=> String
729
+ # resp.searched_log_streams #=> Array
730
+ # resp.searched_log_streams[0].log_stream_name #=> String
731
+ # resp.searched_log_streams[0].searched_completely #=> Boolean
732
+ # resp.next_token #=> String
733
+ # @overload filter_log_events(params = {})
734
+ # @param [Hash] params ({})
735
+ def filter_log_events(params = {}, options = {})
736
+ req = build_request(:filter_log_events, params)
737
+ req.send_request(options)
738
+ end
739
+
740
+ # Lists log events from the specified log stream. You can list all the
741
+ # log events or filter using a time range.
742
+ #
743
+ # By default, this operation returns as many log events as can fit in a
744
+ # response size of 1MB (up to 10,000 log events). If the results include
745
+ # tokens, there are more log events available. You can get additional
746
+ # log events by specifying one of the tokens in a subsequent call.
747
+ # @option params [required, String] :log_group_name
748
+ # The name of the log group.
749
+ # @option params [required, String] :log_stream_name
750
+ # The name of the log stream.
751
+ # @option params [Integer] :start_time
752
+ # The start of the time range. Events with a timestamp earlier than this
753
+ # time are not included.
754
+ # @option params [Integer] :end_time
755
+ # The end of the time range. Events with a timestamp later than this
756
+ # time are not included.
757
+ # @option params [String] :next_token
758
+ # The token for the next set of items to return. (You received this
759
+ # token from a previous call.)
760
+ # @option params [Integer] :limit
761
+ # The maximum number of log events returned. If you don't specify a
762
+ # value, the maximum is as many log events as can fit in a response size
763
+ # of 1MB, up to 10,000 log events.
764
+ # @option params [Boolean] :start_from_head
765
+ # If the value is true, the earliest log events are returned first. If
766
+ # the value is false, the latest log events are returned first. The
767
+ # default value is false.
768
+ # @return [Types::GetLogEventsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
769
+ #
770
+ # * {Types::GetLogEventsResponse#events #events} => Array&lt;Types::OutputLogEvent&gt;
771
+ # * {Types::GetLogEventsResponse#next_forward_token #nextForwardToken} => String
772
+ # * {Types::GetLogEventsResponse#next_backward_token #nextBackwardToken} => String
773
+ #
774
+ # @example Request syntax with placeholder values
775
+ # resp = client.get_log_events({
776
+ # log_group_name: "LogGroupName", # required
777
+ # log_stream_name: "LogStreamName", # required
778
+ # start_time: 1,
779
+ # end_time: 1,
780
+ # next_token: "NextToken",
781
+ # limit: 1,
782
+ # start_from_head: false,
783
+ # })
784
+ #
785
+ # @example Response structure
786
+ # resp.events #=> Array
787
+ # resp.events[0].timestamp #=> Integer
788
+ # resp.events[0].message #=> String
789
+ # resp.events[0].ingestion_time #=> Integer
790
+ # resp.next_forward_token #=> String
791
+ # resp.next_backward_token #=> String
792
+ # @overload get_log_events(params = {})
793
+ # @param [Hash] params ({})
794
+ def get_log_events(params = {}, options = {})
795
+ req = build_request(:get_log_events, params)
796
+ req.send_request(options)
797
+ end
798
+
799
+ # Creates or updates a destination. A destination encapsulates a
800
+ # physical resource (such as a Kinesis stream) and enables you to
801
+ # subscribe to a real-time stream of log events of a different account,
802
+ # ingested using PutLogEvents. Currently, the only supported physical
803
+ # resource is a Amazon Kinesis stream belonging to the same account as
804
+ # the destination.
805
+ #
806
+ # A destination controls what is written to its Amazon Kinesis stream
807
+ # through an access policy. By default, `PutDestination` does not set
808
+ # any access policy with the destination, which means a cross-account
809
+ # user cannot call PutSubscriptionFilter against this destination. To
810
+ # enable this, the destination owner must call PutDestinationPolicy
811
+ # after `PutDestination`.
812
+ # @option params [required, String] :destination_name
813
+ # A name for the destination.
814
+ # @option params [required, String] :target_arn
815
+ # The ARN of an Amazon Kinesis stream to deliver matching log events to.
816
+ # @option params [required, String] :role_arn
817
+ # The ARN of an IAM role that grants CloudWatch Logs permissions to call
818
+ # Amazon Kinesis PutRecord on the destination stream.
819
+ # @return [Types::PutDestinationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
820
+ #
821
+ # * {Types::PutDestinationResponse#destination #destination} => Types::Destination
822
+ #
823
+ # @example Request syntax with placeholder values
824
+ # resp = client.put_destination({
825
+ # destination_name: "DestinationName", # required
826
+ # target_arn: "TargetArn", # required
827
+ # role_arn: "RoleArn", # required
828
+ # })
829
+ #
830
+ # @example Response structure
831
+ # resp.destination.destination_name #=> String
832
+ # resp.destination.target_arn #=> String
833
+ # resp.destination.role_arn #=> String
834
+ # resp.destination.access_policy #=> String
835
+ # resp.destination.arn #=> String
836
+ # resp.destination.creation_time #=> Integer
837
+ # @overload put_destination(params = {})
838
+ # @param [Hash] params ({})
839
+ def put_destination(params = {}, options = {})
840
+ req = build_request(:put_destination, params)
841
+ req.send_request(options)
842
+ end
843
+
844
+ # Creates or updates an access policy associated with an existing
845
+ # destination. An access policy is an [IAM policy document][1] that is
846
+ # used to authorize claims to register a subscription filter against a
847
+ # given destination.
848
+ #
849
+ #
850
+ #
851
+ # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html
852
+ # @option params [required, String] :destination_name
853
+ # A name for an existing destination.
854
+ # @option params [required, String] :access_policy
855
+ # An IAM policy document that authorizes cross-account users to deliver
856
+ # their log events to the associated destination.
857
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
858
+ #
859
+ # @example Request syntax with placeholder values
860
+ # resp = client.put_destination_policy({
861
+ # destination_name: "DestinationName", # required
862
+ # access_policy: "AccessPolicy", # required
863
+ # })
864
+ # @overload put_destination_policy(params = {})
865
+ # @param [Hash] params ({})
866
+ def put_destination_policy(params = {}, options = {})
867
+ req = build_request(:put_destination_policy, params)
868
+ req.send_request(options)
869
+ end
870
+
871
+ # Uploads a batch of log events to the specified log stream.
872
+ #
873
+ # You must include the sequence token obtained from the response of the
874
+ # previous call. An upload in a newly created log stream does not
875
+ # require a sequence token. You can also get the sequence token using
876
+ # DescribeLogStreams.
877
+ #
878
+ # The batch of events must satisfy the following constraints:
879
+ #
880
+ # * The maximum batch size is 1,048,576 bytes, and this size is
881
+ # calculated as the sum of all event messages in UTF-8, plus 26 bytes
882
+ # for each log event.
883
+ #
884
+ # * None of the log events in the batch can be more than 2 hours in the
885
+ # future.
886
+ #
887
+ # * None of the log events in the batch can be older than 14 days or the
888
+ # retention period of the log group.
889
+ #
890
+ # * The log events in the batch must be in chronological ordered by
891
+ # their timestamp.
892
+ #
893
+ # * The maximum number of log events in a batch is 10,000.
894
+ #
895
+ # * A batch of log events in a single PutLogEvents request cannot span
896
+ # more than 24 hours. Otherwise, the PutLogEvents operation will fail.
897
+ # @option params [required, String] :log_group_name
898
+ # The name of the log group.
899
+ # @option params [required, String] :log_stream_name
900
+ # The name of the log stream.
901
+ # @option params [required, Array<Types::InputLogEvent>] :log_events
902
+ # The log events.
903
+ # @option params [String] :sequence_token
904
+ # The sequence token.
905
+ # @return [Types::PutLogEventsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
906
+ #
907
+ # * {Types::PutLogEventsResponse#next_sequence_token #nextSequenceToken} => String
908
+ # * {Types::PutLogEventsResponse#rejected_log_events_info #rejectedLogEventsInfo} => Types::RejectedLogEventsInfo
909
+ #
910
+ # @example Request syntax with placeholder values
911
+ # resp = client.put_log_events({
912
+ # log_group_name: "LogGroupName", # required
913
+ # log_stream_name: "LogStreamName", # required
914
+ # log_events: [ # required
915
+ # {
916
+ # timestamp: 1, # required
917
+ # message: "EventMessage", # required
918
+ # },
919
+ # ],
920
+ # sequence_token: "SequenceToken",
921
+ # })
922
+ #
923
+ # @example Response structure
924
+ # resp.next_sequence_token #=> String
925
+ # resp.rejected_log_events_info.too_new_log_event_start_index #=> Integer
926
+ # resp.rejected_log_events_info.too_old_log_event_end_index #=> Integer
927
+ # resp.rejected_log_events_info.expired_log_event_end_index #=> Integer
928
+ # @overload put_log_events(params = {})
929
+ # @param [Hash] params ({})
930
+ def put_log_events(params = {}, options = {})
931
+ req = build_request(:put_log_events, params)
932
+ req.send_request(options)
933
+ end
934
+
935
+ # Creates or updates a metric filter and associates it with the
936
+ # specified log group. Metric filters allow you to configure rules to
937
+ # extract metric data from log events ingested through PutLogEvents.
938
+ #
939
+ # The maximum number of metric filters that can be associated with a log
940
+ # group is 100.
941
+ # @option params [required, String] :log_group_name
942
+ # The name of the log group.
943
+ # @option params [required, String] :filter_name
944
+ # A name for the metric filter.
945
+ # @option params [required, String] :filter_pattern
946
+ # A filter pattern for extracting metric data out of ingested log
947
+ # events.
948
+ # @option params [required, Array<Types::MetricTransformation>] :metric_transformations
949
+ # A collection of information needed to define how metric data gets
950
+ # emitted.
951
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
952
+ #
953
+ # @example Request syntax with placeholder values
954
+ # resp = client.put_metric_filter({
955
+ # log_group_name: "LogGroupName", # required
956
+ # filter_name: "FilterName", # required
957
+ # filter_pattern: "FilterPattern", # required
958
+ # metric_transformations: [ # required
959
+ # {
960
+ # metric_name: "MetricName", # required
961
+ # metric_namespace: "MetricNamespace", # required
962
+ # metric_value: "MetricValue", # required
963
+ # default_value: 1.0,
964
+ # },
965
+ # ],
966
+ # })
967
+ # @overload put_metric_filter(params = {})
968
+ # @param [Hash] params ({})
969
+ def put_metric_filter(params = {}, options = {})
970
+ req = build_request(:put_metric_filter, params)
971
+ req.send_request(options)
972
+ end
973
+
974
+ # Sets the retention of the specified log group. A retention policy
975
+ # allows you to configure the number of days you want to retain log
976
+ # events in the specified log group.
977
+ # @option params [required, String] :log_group_name
978
+ # The name of the log group.
979
+ # @option params [required, Integer] :retention_in_days
980
+ # The number of days to retain the log events in the specified log
981
+ # group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180,
982
+ # 365, 400, 545, 731, 1827, and 3653.
983
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
984
+ #
985
+ # @example Request syntax with placeholder values
986
+ # resp = client.put_retention_policy({
987
+ # log_group_name: "LogGroupName", # required
988
+ # retention_in_days: 1, # required
989
+ # })
990
+ # @overload put_retention_policy(params = {})
991
+ # @param [Hash] params ({})
992
+ def put_retention_policy(params = {}, options = {})
993
+ req = build_request(:put_retention_policy, params)
994
+ req.send_request(options)
995
+ end
996
+
997
+ # Creates or updates a subscription filter and associates it with the
998
+ # specified log group. Subscription filters allow you to subscribe to a
999
+ # real-time stream of log events ingested through PutLogEvents and have
1000
+ # them delivered to a specific destination. Currently, the supported
1001
+ # destinations are:
1002
+ #
1003
+ # * An Amazon Kinesis stream belonging to the same account as the
1004
+ # subscription filter, for same-account delivery.
1005
+ #
1006
+ # * A logical destination that belongs to a different account, for
1007
+ # cross-account delivery.
1008
+ #
1009
+ # * An Amazon Kinesis Firehose stream that belongs to the same account
1010
+ # as the subscription filter, for same-account delivery.
1011
+ #
1012
+ # * An AWS Lambda function that belongs to the same account as the
1013
+ # subscription filter, for same-account delivery.
1014
+ #
1015
+ # There can only be one subscription filter associated with a log group.
1016
+ # @option params [required, String] :log_group_name
1017
+ # The name of the log group.
1018
+ # @option params [required, String] :filter_name
1019
+ # A name for the subscription filter.
1020
+ # @option params [required, String] :filter_pattern
1021
+ # A filter pattern for subscribing to a filtered stream of log events.
1022
+ # @option params [required, String] :destination_arn
1023
+ # The ARN of the destination to deliver matching log events to.
1024
+ # Currently, the supported destinations are:
1025
+ #
1026
+ # * An Amazon Kinesis stream belonging to the same account as the
1027
+ # subscription filter, for same-account delivery.
1028
+ #
1029
+ # * A logical destination (specified using an ARN) belonging to a
1030
+ # different account, for cross-account delivery.
1031
+ #
1032
+ # * An Amazon Kinesis Firehose stream belonging to the same account as
1033
+ # the subscription filter, for same-account delivery.
1034
+ #
1035
+ # * An AWS Lambda function belonging to the same account as the
1036
+ # subscription filter, for same-account delivery.
1037
+ # @option params [String] :role_arn
1038
+ # The ARN of an IAM role that grants CloudWatch Logs permissions to
1039
+ # deliver ingested log events to the destination stream. You don't need
1040
+ # to provide the ARN when you are working with a logical destination for
1041
+ # cross-account delivery.
1042
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1043
+ #
1044
+ # @example Request syntax with placeholder values
1045
+ # resp = client.put_subscription_filter({
1046
+ # log_group_name: "LogGroupName", # required
1047
+ # filter_name: "FilterName", # required
1048
+ # filter_pattern: "FilterPattern", # required
1049
+ # destination_arn: "DestinationArn", # required
1050
+ # role_arn: "RoleArn",
1051
+ # })
1052
+ # @overload put_subscription_filter(params = {})
1053
+ # @param [Hash] params ({})
1054
+ def put_subscription_filter(params = {}, options = {})
1055
+ req = build_request(:put_subscription_filter, params)
1056
+ req.send_request(options)
1057
+ end
1058
+
1059
+ # Tests the filter pattern of a metric filter against a sample of log
1060
+ # event messages. You can use this operation to validate the correctness
1061
+ # of a metric filter pattern.
1062
+ # @option params [required, String] :filter_pattern
1063
+ # A symbolic description of how CloudWatch Logs should interpret the
1064
+ # data in each log event. For example, a log event may contain
1065
+ # timestamps, IP addresses, strings, and so on. You use the filter
1066
+ # pattern to specify what to look for in the log event message.
1067
+ # @option params [required, Array<String>] :log_event_messages
1068
+ # The log event messages to test.
1069
+ # @return [Types::TestMetricFilterResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1070
+ #
1071
+ # * {Types::TestMetricFilterResponse#matches #matches} => Array&lt;Types::MetricFilterMatchRecord&gt;
1072
+ #
1073
+ # @example Request syntax with placeholder values
1074
+ # resp = client.test_metric_filter({
1075
+ # filter_pattern: "FilterPattern", # required
1076
+ # log_event_messages: ["EventMessage"], # required
1077
+ # })
1078
+ #
1079
+ # @example Response structure
1080
+ # resp.matches #=> Array
1081
+ # resp.matches[0].event_number #=> Integer
1082
+ # resp.matches[0].event_message #=> String
1083
+ # resp.matches[0].extracted_values #=> Hash
1084
+ # resp.matches[0].extracted_values["Token"] #=> String
1085
+ # @overload test_metric_filter(params = {})
1086
+ # @param [Hash] params ({})
1087
+ def test_metric_filter(params = {}, options = {})
1088
+ req = build_request(:test_metric_filter, params)
1089
+ req.send_request(options)
1090
+ end
1091
+
1092
+ # @!endgroup
1093
+
1094
+ # @param params ({})
1095
+ # @api private
1096
+ def build_request(operation_name, params = {})
1097
+ handlers = @handlers.for(operation_name)
1098
+ context = Seahorse::Client::RequestContext.new(
1099
+ operation_name: operation_name,
1100
+ operation: config.api.operation(operation_name),
1101
+ client: self,
1102
+ params: params,
1103
+ config: config)
1104
+ context[:gem_name] = 'aws-sdk-cloudwatchlogs'
1105
+ context[:gem_version] = '1.0.0.rc1'
1106
+ Seahorse::Client::Request.new(handlers, context)
1107
+ end
1108
+
1109
+ # @api private
1110
+ # @deprecated
1111
+ def waiter_names
1112
+ []
1113
+ end
1114
+
1115
+ class << self
1116
+
1117
+ # @api private
1118
+ attr_reader :identifier
1119
+
1120
+ # @api private
1121
+ def errors_module
1122
+ Errors
1123
+ end
1124
+
1125
+ end
1126
+ end
1127
+ end
1128
+ end