aws-sdk-cloudwatchlogs 1.27.0 → 1.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,6 +26,8 @@ module Aws::CloudWatchLogs
26
26
  DeleteLogGroupRequest = Shapes::StructureShape.new(name: 'DeleteLogGroupRequest')
27
27
  DeleteLogStreamRequest = Shapes::StructureShape.new(name: 'DeleteLogStreamRequest')
28
28
  DeleteMetricFilterRequest = Shapes::StructureShape.new(name: 'DeleteMetricFilterRequest')
29
+ DeleteQueryDefinitionRequest = Shapes::StructureShape.new(name: 'DeleteQueryDefinitionRequest')
30
+ DeleteQueryDefinitionResponse = Shapes::StructureShape.new(name: 'DeleteQueryDefinitionResponse')
29
31
  DeleteResourcePolicyRequest = Shapes::StructureShape.new(name: 'DeleteResourcePolicyRequest')
30
32
  DeleteRetentionPolicyRequest = Shapes::StructureShape.new(name: 'DeleteRetentionPolicyRequest')
31
33
  DeleteSubscriptionFilterRequest = Shapes::StructureShape.new(name: 'DeleteSubscriptionFilterRequest')
@@ -44,6 +46,8 @@ module Aws::CloudWatchLogs
44
46
  DescribeQueriesMaxResults = Shapes::IntegerShape.new(name: 'DescribeQueriesMaxResults')
45
47
  DescribeQueriesRequest = Shapes::StructureShape.new(name: 'DescribeQueriesRequest')
46
48
  DescribeQueriesResponse = Shapes::StructureShape.new(name: 'DescribeQueriesResponse')
49
+ DescribeQueryDefinitionsRequest = Shapes::StructureShape.new(name: 'DescribeQueryDefinitionsRequest')
50
+ DescribeQueryDefinitionsResponse = Shapes::StructureShape.new(name: 'DescribeQueryDefinitionsResponse')
47
51
  DescribeResourcePoliciesRequest = Shapes::StructureShape.new(name: 'DescribeResourcePoliciesRequest')
48
52
  DescribeResourcePoliciesResponse = Shapes::StructureShape.new(name: 'DescribeResourcePoliciesResponse')
49
53
  DescribeSubscriptionFiltersRequest = Shapes::StructureShape.new(name: 'DescribeSubscriptionFiltersRequest')
@@ -134,6 +138,8 @@ module Aws::CloudWatchLogs
134
138
  PutLogEventsRequest = Shapes::StructureShape.new(name: 'PutLogEventsRequest')
135
139
  PutLogEventsResponse = Shapes::StructureShape.new(name: 'PutLogEventsResponse')
136
140
  PutMetricFilterRequest = Shapes::StructureShape.new(name: 'PutMetricFilterRequest')
141
+ PutQueryDefinitionRequest = Shapes::StructureShape.new(name: 'PutQueryDefinitionRequest')
142
+ PutQueryDefinitionResponse = Shapes::StructureShape.new(name: 'PutQueryDefinitionResponse')
137
143
  PutResourcePolicyRequest = Shapes::StructureShape.new(name: 'PutResourcePolicyRequest')
138
144
  PutResourcePolicyResponse = Shapes::StructureShape.new(name: 'PutResourcePolicyResponse')
139
145
  PutRetentionPolicyRequest = Shapes::StructureShape.new(name: 'PutRetentionPolicyRequest')
@@ -141,9 +147,14 @@ module Aws::CloudWatchLogs
141
147
  QueryCharOffset = Shapes::IntegerShape.new(name: 'QueryCharOffset')
142
148
  QueryCompileError = Shapes::StructureShape.new(name: 'QueryCompileError')
143
149
  QueryCompileErrorLocation = Shapes::StructureShape.new(name: 'QueryCompileErrorLocation')
150
+ QueryDefinition = Shapes::StructureShape.new(name: 'QueryDefinition')
151
+ QueryDefinitionList = Shapes::ListShape.new(name: 'QueryDefinitionList')
152
+ QueryDefinitionName = Shapes::StringShape.new(name: 'QueryDefinitionName')
153
+ QueryDefinitionString = Shapes::StringShape.new(name: 'QueryDefinitionString')
144
154
  QueryId = Shapes::StringShape.new(name: 'QueryId')
145
155
  QueryInfo = Shapes::StructureShape.new(name: 'QueryInfo')
146
156
  QueryInfoList = Shapes::ListShape.new(name: 'QueryInfoList')
157
+ QueryListMaxResults = Shapes::IntegerShape.new(name: 'QueryListMaxResults')
147
158
  QueryResults = Shapes::ListShape.new(name: 'QueryResults')
148
159
  QueryStatistics = Shapes::StructureShape.new(name: 'QueryStatistics')
149
160
  QueryStatus = Shapes::StringShape.new(name: 'QueryStatus')
@@ -230,6 +241,12 @@ module Aws::CloudWatchLogs
230
241
  DeleteMetricFilterRequest.add_member(:filter_name, Shapes::ShapeRef.new(shape: FilterName, required: true, location_name: "filterName"))
231
242
  DeleteMetricFilterRequest.struct_class = Types::DeleteMetricFilterRequest
232
243
 
244
+ DeleteQueryDefinitionRequest.add_member(:query_definition_id, Shapes::ShapeRef.new(shape: QueryId, required: true, location_name: "queryDefinitionId"))
245
+ DeleteQueryDefinitionRequest.struct_class = Types::DeleteQueryDefinitionRequest
246
+
247
+ DeleteQueryDefinitionResponse.add_member(:success, Shapes::ShapeRef.new(shape: Success, location_name: "success"))
248
+ DeleteQueryDefinitionResponse.struct_class = Types::DeleteQueryDefinitionResponse
249
+
233
250
  DeleteResourcePolicyRequest.add_member(:policy_name, Shapes::ShapeRef.new(shape: PolicyName, location_name: "policyName"))
234
251
  DeleteResourcePolicyRequest.struct_class = Types::DeleteResourcePolicyRequest
235
252
 
@@ -302,6 +319,15 @@ module Aws::CloudWatchLogs
302
319
  DescribeQueriesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "nextToken"))
303
320
  DescribeQueriesResponse.struct_class = Types::DescribeQueriesResponse
304
321
 
322
+ DescribeQueryDefinitionsRequest.add_member(:query_definition_name_prefix, Shapes::ShapeRef.new(shape: QueryDefinitionName, location_name: "queryDefinitionNamePrefix"))
323
+ DescribeQueryDefinitionsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: QueryListMaxResults, location_name: "maxResults"))
324
+ DescribeQueryDefinitionsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "nextToken"))
325
+ DescribeQueryDefinitionsRequest.struct_class = Types::DescribeQueryDefinitionsRequest
326
+
327
+ DescribeQueryDefinitionsResponse.add_member(:query_definitions, Shapes::ShapeRef.new(shape: QueryDefinitionList, location_name: "queryDefinitions"))
328
+ DescribeQueryDefinitionsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "nextToken"))
329
+ DescribeQueryDefinitionsResponse.struct_class = Types::DescribeQueryDefinitionsResponse
330
+
305
331
  DescribeResourcePoliciesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "nextToken"))
306
332
  DescribeResourcePoliciesRequest.add_member(:limit, Shapes::ShapeRef.new(shape: DescribeLimit, location_name: "limit"))
307
333
  DescribeResourcePoliciesRequest.struct_class = Types::DescribeResourcePoliciesRequest
@@ -425,9 +451,15 @@ module Aws::CloudWatchLogs
425
451
 
426
452
  InputLogStreamNames.member = Shapes::ShapeRef.new(shape: LogStreamName)
427
453
 
454
+ InvalidOperationException.struct_class = Types::InvalidOperationException
455
+
456
+ InvalidParameterException.struct_class = Types::InvalidParameterException
457
+
428
458
  InvalidSequenceTokenException.add_member(:expected_sequence_token, Shapes::ShapeRef.new(shape: SequenceToken, location_name: "expectedSequenceToken"))
429
459
  InvalidSequenceTokenException.struct_class = Types::InvalidSequenceTokenException
430
460
 
461
+ LimitExceededException.struct_class = Types::LimitExceededException
462
+
431
463
  ListTagsLogGroupRequest.add_member(:log_group_name, Shapes::ShapeRef.new(shape: LogGroupName, required: true, location_name: "logGroupName"))
432
464
  ListTagsLogGroupRequest.struct_class = Types::ListTagsLogGroupRequest
433
465
 
@@ -495,6 +527,8 @@ module Aws::CloudWatchLogs
495
527
 
496
528
  MetricTransformations.member = Shapes::ShapeRef.new(shape: MetricTransformation)
497
529
 
530
+ OperationAbortedException.struct_class = Types::OperationAbortedException
531
+
498
532
  OutputLogEvent.add_member(:timestamp, Shapes::ShapeRef.new(shape: Timestamp, location_name: "timestamp"))
499
533
  OutputLogEvent.add_member(:message, Shapes::ShapeRef.new(shape: EventMessage, location_name: "message"))
500
534
  OutputLogEvent.add_member(:ingestion_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "ingestionTime"))
@@ -530,6 +564,15 @@ module Aws::CloudWatchLogs
530
564
  PutMetricFilterRequest.add_member(:metric_transformations, Shapes::ShapeRef.new(shape: MetricTransformations, required: true, location_name: "metricTransformations"))
531
565
  PutMetricFilterRequest.struct_class = Types::PutMetricFilterRequest
532
566
 
567
+ PutQueryDefinitionRequest.add_member(:name, Shapes::ShapeRef.new(shape: QueryDefinitionName, required: true, location_name: "name"))
568
+ PutQueryDefinitionRequest.add_member(:query_definition_id, Shapes::ShapeRef.new(shape: QueryId, location_name: "queryDefinitionId"))
569
+ PutQueryDefinitionRequest.add_member(:log_group_names, Shapes::ShapeRef.new(shape: LogGroupNames, location_name: "logGroupNames"))
570
+ PutQueryDefinitionRequest.add_member(:query_string, Shapes::ShapeRef.new(shape: QueryDefinitionString, required: true, location_name: "queryString"))
571
+ PutQueryDefinitionRequest.struct_class = Types::PutQueryDefinitionRequest
572
+
573
+ PutQueryDefinitionResponse.add_member(:query_definition_id, Shapes::ShapeRef.new(shape: QueryId, location_name: "queryDefinitionId"))
574
+ PutQueryDefinitionResponse.struct_class = Types::PutQueryDefinitionResponse
575
+
533
576
  PutResourcePolicyRequest.add_member(:policy_name, Shapes::ShapeRef.new(shape: PolicyName, location_name: "policyName"))
534
577
  PutResourcePolicyRequest.add_member(:policy_document, Shapes::ShapeRef.new(shape: PolicyDocument, location_name: "policyDocument"))
535
578
  PutResourcePolicyRequest.struct_class = Types::PutResourcePolicyRequest
@@ -557,6 +600,15 @@ module Aws::CloudWatchLogs
557
600
  QueryCompileErrorLocation.add_member(:end_char_offset, Shapes::ShapeRef.new(shape: QueryCharOffset, location_name: "endCharOffset"))
558
601
  QueryCompileErrorLocation.struct_class = Types::QueryCompileErrorLocation
559
602
 
603
+ QueryDefinition.add_member(:query_definition_id, Shapes::ShapeRef.new(shape: QueryId, location_name: "queryDefinitionId"))
604
+ QueryDefinition.add_member(:name, Shapes::ShapeRef.new(shape: QueryDefinitionName, location_name: "name"))
605
+ QueryDefinition.add_member(:query_string, Shapes::ShapeRef.new(shape: QueryDefinitionString, location_name: "queryString"))
606
+ QueryDefinition.add_member(:last_modified, Shapes::ShapeRef.new(shape: Timestamp, location_name: "lastModified"))
607
+ QueryDefinition.add_member(:log_group_names, Shapes::ShapeRef.new(shape: LogGroupNames, location_name: "logGroupNames"))
608
+ QueryDefinition.struct_class = Types::QueryDefinition
609
+
610
+ QueryDefinitionList.member = Shapes::ShapeRef.new(shape: QueryDefinition)
611
+
560
612
  QueryInfo.add_member(:query_id, Shapes::ShapeRef.new(shape: QueryId, location_name: "queryId"))
561
613
  QueryInfo.add_member(:query_string, Shapes::ShapeRef.new(shape: QueryString, location_name: "queryString"))
562
614
  QueryInfo.add_member(:status, Shapes::ShapeRef.new(shape: QueryStatus, location_name: "status"))
@@ -578,6 +630,10 @@ module Aws::CloudWatchLogs
578
630
  RejectedLogEventsInfo.add_member(:expired_log_event_end_index, Shapes::ShapeRef.new(shape: LogEventIndex, location_name: "expiredLogEventEndIndex"))
579
631
  RejectedLogEventsInfo.struct_class = Types::RejectedLogEventsInfo
580
632
 
633
+ ResourceAlreadyExistsException.struct_class = Types::ResourceAlreadyExistsException
634
+
635
+ ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
636
+
581
637
  ResourcePolicies.member = Shapes::ShapeRef.new(shape: ResourcePolicy)
582
638
 
583
639
  ResourcePolicy.add_member(:policy_name, Shapes::ShapeRef.new(shape: PolicyName, location_name: "policyName"))
@@ -597,6 +653,8 @@ module Aws::CloudWatchLogs
597
653
 
598
654
  SearchedLogStreams.member = Shapes::ShapeRef.new(shape: SearchedLogStream)
599
655
 
656
+ ServiceUnavailableException.struct_class = Types::ServiceUnavailableException
657
+
600
658
  StartQueryRequest.add_member(:log_group_name, Shapes::ShapeRef.new(shape: LogGroupName, location_name: "logGroupName"))
601
659
  StartQueryRequest.add_member(:log_group_names, Shapes::ShapeRef.new(shape: LogGroupNames, location_name: "logGroupNames"))
602
660
  StartQueryRequest.add_member(:start_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "startTime"))
@@ -643,6 +701,8 @@ module Aws::CloudWatchLogs
643
701
  TestMetricFilterResponse.add_member(:matches, Shapes::ShapeRef.new(shape: MetricFilterMatches, location_name: "matches"))
644
702
  TestMetricFilterResponse.struct_class = Types::TestMetricFilterResponse
645
703
 
704
+ UnrecognizedClientException.struct_class = Types::UnrecognizedClientException
705
+
646
706
  UntagLogGroupRequest.add_member(:log_group_name, Shapes::ShapeRef.new(shape: LogGroupName, required: true, location_name: "logGroupName"))
647
707
  UntagLogGroupRequest.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, required: true, location_name: "tags"))
648
708
  UntagLogGroupRequest.struct_class = Types::UntagLogGroupRequest
@@ -776,6 +836,17 @@ module Aws::CloudWatchLogs
776
836
  o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
777
837
  end)
778
838
 
839
+ api.add_operation(:delete_query_definition, Seahorse::Model::Operation.new.tap do |o|
840
+ o.name = "DeleteQueryDefinition"
841
+ o.http_method = "POST"
842
+ o.http_request_uri = "/"
843
+ o.input = Shapes::ShapeRef.new(shape: DeleteQueryDefinitionRequest)
844
+ o.output = Shapes::ShapeRef.new(shape: DeleteQueryDefinitionResponse)
845
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
846
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
847
+ o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
848
+ end)
849
+
779
850
  api.add_operation(:delete_resource_policy, Seahorse::Model::Operation.new.tap do |o|
780
851
  o.name = "DeleteResourcePolicy"
781
852
  o.http_method = "POST"
@@ -898,6 +969,16 @@ module Aws::CloudWatchLogs
898
969
  o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
899
970
  end)
900
971
 
972
+ api.add_operation(:describe_query_definitions, Seahorse::Model::Operation.new.tap do |o|
973
+ o.name = "DescribeQueryDefinitions"
974
+ o.http_method = "POST"
975
+ o.http_request_uri = "/"
976
+ o.input = Shapes::ShapeRef.new(shape: DescribeQueryDefinitionsRequest)
977
+ o.output = Shapes::ShapeRef.new(shape: DescribeQueryDefinitionsResponse)
978
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
979
+ o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
980
+ end)
981
+
901
982
  api.add_operation(:describe_resource_policies, Seahorse::Model::Operation.new.tap do |o|
902
983
  o.name = "DescribeResourcePolicies"
903
984
  o.http_method = "POST"
@@ -1065,6 +1146,17 @@ module Aws::CloudWatchLogs
1065
1146
  o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
1066
1147
  end)
1067
1148
 
1149
+ api.add_operation(:put_query_definition, Seahorse::Model::Operation.new.tap do |o|
1150
+ o.name = "PutQueryDefinition"
1151
+ o.http_method = "POST"
1152
+ o.http_request_uri = "/"
1153
+ o.input = Shapes::ShapeRef.new(shape: PutQueryDefinitionRequest)
1154
+ o.output = Shapes::ShapeRef.new(shape: PutQueryDefinitionResponse)
1155
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
1156
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1157
+ o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
1158
+ end)
1159
+
1068
1160
  api.add_operation(:put_resource_policy, Seahorse::Model::Operation.new.tap do |o|
1069
1161
  o.name = "PutResourcePolicy"
1070
1162
  o.http_method = "POST"
@@ -6,6 +6,39 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::CloudWatchLogs
9
+
10
+ # When CloudWatchLogs returns an error response, the Ruby SDK constructs and raises an error.
11
+ # These errors all extend Aws::CloudWatchLogs::Errors::ServiceError < {Aws::Errors::ServiceError}
12
+ #
13
+ # You can rescue all CloudWatchLogs errors using ServiceError:
14
+ #
15
+ # begin
16
+ # # do stuff
17
+ # rescue Aws::CloudWatchLogs::Errors::ServiceError
18
+ # # rescues all CloudWatchLogs API errors
19
+ # end
20
+ #
21
+ #
22
+ # ## Request Context
23
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
24
+ # information about the request that generated the error.
25
+ # See {Seahorse::Client::RequestContext} for more information.
26
+ #
27
+ # ## Error Classes
28
+ # * {DataAlreadyAcceptedException}
29
+ # * {InvalidOperationException}
30
+ # * {InvalidParameterException}
31
+ # * {InvalidSequenceTokenException}
32
+ # * {LimitExceededException}
33
+ # * {MalformedQueryException}
34
+ # * {OperationAbortedException}
35
+ # * {ResourceAlreadyExistsException}
36
+ # * {ResourceNotFoundException}
37
+ # * {ServiceUnavailableException}
38
+ # * {UnrecognizedClientException}
39
+ #
40
+ # Additionally, error classes are dynamically generated for service errors based on the error code
41
+ # if they are not defined above.
9
42
  module Errors
10
43
 
11
44
  extend Aws::Errors::DynamicErrors
@@ -23,7 +56,26 @@ module Aws::CloudWatchLogs
23
56
  def expected_sequence_token
24
57
  @data[:expected_sequence_token]
25
58
  end
59
+ end
60
+
61
+ class InvalidOperationException < ServiceError
62
+
63
+ # @param [Seahorse::Client::RequestContext] context
64
+ # @param [String] message
65
+ # @param [Aws::CloudWatchLogs::Types::InvalidOperationException] data
66
+ def initialize(context, message, data = Aws::EmptyStructure.new)
67
+ super(context, message, data)
68
+ end
69
+ end
26
70
 
71
+ class InvalidParameterException < ServiceError
72
+
73
+ # @param [Seahorse::Client::RequestContext] context
74
+ # @param [String] message
75
+ # @param [Aws::CloudWatchLogs::Types::InvalidParameterException] data
76
+ def initialize(context, message, data = Aws::EmptyStructure.new)
77
+ super(context, message, data)
78
+ end
27
79
  end
28
80
 
29
81
  class InvalidSequenceTokenException < ServiceError
@@ -39,7 +91,16 @@ module Aws::CloudWatchLogs
39
91
  def expected_sequence_token
40
92
  @data[:expected_sequence_token]
41
93
  end
94
+ end
95
+
96
+ class LimitExceededException < ServiceError
42
97
 
98
+ # @param [Seahorse::Client::RequestContext] context
99
+ # @param [String] message
100
+ # @param [Aws::CloudWatchLogs::Types::LimitExceededException] data
101
+ def initialize(context, message, data = Aws::EmptyStructure.new)
102
+ super(context, message, data)
103
+ end
43
104
  end
44
105
 
45
106
  class MalformedQueryException < ServiceError
@@ -55,7 +116,56 @@ module Aws::CloudWatchLogs
55
116
  def query_compile_error
56
117
  @data[:query_compile_error]
57
118
  end
119
+ end
120
+
121
+ class OperationAbortedException < ServiceError
122
+
123
+ # @param [Seahorse::Client::RequestContext] context
124
+ # @param [String] message
125
+ # @param [Aws::CloudWatchLogs::Types::OperationAbortedException] data
126
+ def initialize(context, message, data = Aws::EmptyStructure.new)
127
+ super(context, message, data)
128
+ end
129
+ end
130
+
131
+ class ResourceAlreadyExistsException < ServiceError
132
+
133
+ # @param [Seahorse::Client::RequestContext] context
134
+ # @param [String] message
135
+ # @param [Aws::CloudWatchLogs::Types::ResourceAlreadyExistsException] data
136
+ def initialize(context, message, data = Aws::EmptyStructure.new)
137
+ super(context, message, data)
138
+ end
139
+ end
140
+
141
+ class ResourceNotFoundException < ServiceError
58
142
 
143
+ # @param [Seahorse::Client::RequestContext] context
144
+ # @param [String] message
145
+ # @param [Aws::CloudWatchLogs::Types::ResourceNotFoundException] data
146
+ def initialize(context, message, data = Aws::EmptyStructure.new)
147
+ super(context, message, data)
148
+ end
149
+ end
150
+
151
+ class ServiceUnavailableException < ServiceError
152
+
153
+ # @param [Seahorse::Client::RequestContext] context
154
+ # @param [String] message
155
+ # @param [Aws::CloudWatchLogs::Types::ServiceUnavailableException] data
156
+ def initialize(context, message, data = Aws::EmptyStructure.new)
157
+ super(context, message, data)
158
+ end
159
+ end
160
+
161
+ class UnrecognizedClientException < ServiceError
162
+
163
+ # @param [Seahorse::Client::RequestContext] context
164
+ # @param [String] message
165
+ # @param [Aws::CloudWatchLogs::Types::UnrecognizedClientException] data
166
+ def initialize(context, message, data = Aws::EmptyStructure.new)
167
+ super(context, message, data)
168
+ end
59
169
  end
60
170
 
61
171
  end
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::CloudWatchLogs
9
+
9
10
  class Resource
10
11
 
11
12
  # @param options ({})
@@ -22,12 +22,14 @@ module Aws::CloudWatchLogs
22
22
  #
23
23
  # @!attribute [rw] kms_key_id
24
24
  # The Amazon Resource Name (ARN) of the CMK to use when encrypting log
25
- # data. For more information, see [Amazon Resource Names - AWS Key
26
- # Management Service (AWS KMS)][1].
25
+ # data. This must be a symmetric CMK. For more information, see
26
+ # [Amazon Resource Names - AWS Key Management Service (AWS KMS)][1]
27
+ # and [Using Symmetric and Asymmetric Keys][2].
27
28
  #
28
29
  #
29
30
  #
30
31
  # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms
32
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
31
33
  # @return [String]
32
34
  #
33
35
  # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKeyRequest AWS API Documentation
@@ -286,6 +288,33 @@ module Aws::CloudWatchLogs
286
288
  include Aws::Structure
287
289
  end
288
290
 
291
+ # @note When making an API call, you may pass DeleteQueryDefinitionRequest
292
+ # data as a hash:
293
+ #
294
+ # {
295
+ # query_definition_id: "QueryId", # required
296
+ # }
297
+ #
298
+ # @!attribute [rw] query_definition_id
299
+ # @return [String]
300
+ #
301
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinitionRequest AWS API Documentation
302
+ #
303
+ class DeleteQueryDefinitionRequest < Struct.new(
304
+ :query_definition_id)
305
+ include Aws::Structure
306
+ end
307
+
308
+ # @!attribute [rw] success
309
+ # @return [Boolean]
310
+ #
311
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinitionResponse AWS API Documentation
312
+ #
313
+ class DeleteQueryDefinitionResponse < Struct.new(
314
+ :success)
315
+ include Aws::Structure
316
+ end
317
+
289
318
  # @note When making an API call, you may pass DeleteResourcePolicyRequest
290
319
  # data as a hash:
291
320
  #
@@ -713,6 +742,51 @@ module Aws::CloudWatchLogs
713
742
  include Aws::Structure
714
743
  end
715
744
 
745
+ # @note When making an API call, you may pass DescribeQueryDefinitionsRequest
746
+ # data as a hash:
747
+ #
748
+ # {
749
+ # query_definition_name_prefix: "QueryDefinitionName",
750
+ # max_results: 1,
751
+ # next_token: "NextToken",
752
+ # }
753
+ #
754
+ # @!attribute [rw] query_definition_name_prefix
755
+ # @return [String]
756
+ #
757
+ # @!attribute [rw] max_results
758
+ # @return [Integer]
759
+ #
760
+ # @!attribute [rw] next_token
761
+ # The token for the next set of items to return. The token expires
762
+ # after 24 hours.
763
+ # @return [String]
764
+ #
765
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitionsRequest AWS API Documentation
766
+ #
767
+ class DescribeQueryDefinitionsRequest < Struct.new(
768
+ :query_definition_name_prefix,
769
+ :max_results,
770
+ :next_token)
771
+ include Aws::Structure
772
+ end
773
+
774
+ # @!attribute [rw] query_definitions
775
+ # @return [Array<Types::QueryDefinition>]
776
+ #
777
+ # @!attribute [rw] next_token
778
+ # The token for the next set of items to return. The token expires
779
+ # after 24 hours.
780
+ # @return [String]
781
+ #
782
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitionsResponse AWS API Documentation
783
+ #
784
+ class DescribeQueryDefinitionsResponse < Struct.new(
785
+ :query_definitions,
786
+ :next_token)
787
+ include Aws::Structure
788
+ end
789
+
716
790
  # @note When making an API call, you may pass DescribeResourcePoliciesRequest
717
791
  # data as a hash:
718
792
  #
@@ -1377,7 +1451,21 @@ module Aws::CloudWatchLogs
1377
1451
  include Aws::Structure
1378
1452
  end
1379
1453
 
1380
- # The sequence token is not valid.
1454
+ # The operation is not valid on the specified resource.
1455
+ #
1456
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/InvalidOperationException AWS API Documentation
1457
+ #
1458
+ class InvalidOperationException < Aws::EmptyStructure; end
1459
+
1460
+ # A parameter is specified incorrectly.
1461
+ #
1462
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/InvalidParameterException AWS API Documentation
1463
+ #
1464
+ class InvalidParameterException < Aws::EmptyStructure; end
1465
+
1466
+ # The sequence token is not valid. You can get the correct sequence
1467
+ # token in the `expectedSequenceToken` field in the
1468
+ # `InvalidSequenceTokenException` message.
1381
1469
  #
1382
1470
  # @!attribute [rw] expected_sequence_token
1383
1471
  # @return [String]
@@ -1389,6 +1477,12 @@ module Aws::CloudWatchLogs
1389
1477
  include Aws::Structure
1390
1478
  end
1391
1479
 
1480
+ # You have reached the maximum number of resources that can be created.
1481
+ #
1482
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/LimitExceededException AWS API Documentation
1483
+ #
1484
+ class LimitExceededException < Aws::EmptyStructure; end
1485
+
1392
1486
  # @note When making an API call, you may pass ListTagsLogGroupRequest
1393
1487
  # data as a hash:
1394
1488
  #
@@ -1548,14 +1642,16 @@ module Aws::CloudWatchLogs
1548
1642
  end
1549
1643
 
1550
1644
  # The query string is not valid. Details about this error are displayed
1551
- # in a `QueryCompileError` object. For more information, see .
1645
+ # in a `QueryCompileError` object. For more information, see
1646
+ # [QueryCompileError][1]"/&gt;.
1552
1647
  #
1553
1648
  # For more information about valid query syntax, see [CloudWatch Logs
1554
- # Insights Query Syntax][1].
1649
+ # Insights Query Syntax][2].
1555
1650
  #
1556
1651
  #
1557
1652
  #
1558
- # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html
1653
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html
1654
+ # [2]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html
1559
1655
  #
1560
1656
  # @!attribute [rw] query_compile_error
1561
1657
  # Reserved.
@@ -1648,7 +1744,13 @@ module Aws::CloudWatchLogs
1648
1744
  # @return [String]
1649
1745
  #
1650
1746
  # @!attribute [rw] metric_namespace
1651
- # The namespace of the CloudWatch metric.
1747
+ # A custom namespace to contain your metric in CloudWatch. Use
1748
+ # namespaces to group together metrics that are similar. For more
1749
+ # information, see [Namespaces][1].
1750
+ #
1751
+ #
1752
+ #
1753
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace
1652
1754
  # @return [String]
1653
1755
  #
1654
1756
  # @!attribute [rw] metric_value
@@ -1671,6 +1773,12 @@ module Aws::CloudWatchLogs
1671
1773
  include Aws::Structure
1672
1774
  end
1673
1775
 
1776
+ # Multiple requests to update the same resource were in conflict.
1777
+ #
1778
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/OperationAbortedException AWS API Documentation
1779
+ #
1780
+ class OperationAbortedException < Aws::EmptyStructure; end
1781
+
1674
1782
  # Represents a log event.
1675
1783
  #
1676
1784
  # @!attribute [rw] timestamp
@@ -1796,9 +1904,14 @@ module Aws::CloudWatchLogs
1796
1904
  # The sequence token obtained from the response of the previous
1797
1905
  # `PutLogEvents` call. An upload in a newly created log stream does
1798
1906
  # not require a sequence token. You can also get the sequence token
1799
- # using DescribeLogStreams. If you call `PutLogEvents` twice within a
1800
- # narrow time period using the same value for `sequenceToken`, both
1801
- # calls may be successful, or one may be rejected.
1907
+ # using [DescribeLogStreams][1]. If you call `PutLogEvents` twice
1908
+ # within a narrow time period using the same value for
1909
+ # `sequenceToken`, both calls may be successful, or one may be
1910
+ # rejected.
1911
+ #
1912
+ #
1913
+ #
1914
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogStreams.html
1802
1915
  # @return [String]
1803
1916
  #
1804
1917
  # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEventsRequest AWS API Documentation
@@ -1872,6 +1985,48 @@ module Aws::CloudWatchLogs
1872
1985
  include Aws::Structure
1873
1986
  end
1874
1987
 
1988
+ # @note When making an API call, you may pass PutQueryDefinitionRequest
1989
+ # data as a hash:
1990
+ #
1991
+ # {
1992
+ # name: "QueryDefinitionName", # required
1993
+ # query_definition_id: "QueryId",
1994
+ # log_group_names: ["LogGroupName"],
1995
+ # query_string: "QueryDefinitionString", # required
1996
+ # }
1997
+ #
1998
+ # @!attribute [rw] name
1999
+ # @return [String]
2000
+ #
2001
+ # @!attribute [rw] query_definition_id
2002
+ # @return [String]
2003
+ #
2004
+ # @!attribute [rw] log_group_names
2005
+ # @return [Array<String>]
2006
+ #
2007
+ # @!attribute [rw] query_string
2008
+ # @return [String]
2009
+ #
2010
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinitionRequest AWS API Documentation
2011
+ #
2012
+ class PutQueryDefinitionRequest < Struct.new(
2013
+ :name,
2014
+ :query_definition_id,
2015
+ :log_group_names,
2016
+ :query_string)
2017
+ include Aws::Structure
2018
+ end
2019
+
2020
+ # @!attribute [rw] query_definition_id
2021
+ # @return [String]
2022
+ #
2023
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinitionResponse AWS API Documentation
2024
+ #
2025
+ class PutQueryDefinitionResponse < Struct.new(
2026
+ :query_definition_id)
2027
+ include Aws::Structure
2028
+ end
2029
+
1875
2030
  # @note When making an API call, you may pass PutResourcePolicyRequest
1876
2031
  # data as a hash:
1877
2032
  #
@@ -1966,7 +2121,11 @@ module Aws::CloudWatchLogs
1966
2121
  # filter, you must specify the correct name in `filterName`.
1967
2122
  # Otherwise, the call fails because you cannot associate a second
1968
2123
  # filter with a log group. To find the name of the filter currently
1969
- # associated with a log group, use DescribeSubscriptionFilters.
2124
+ # associated with a log group, use [DescribeSubscriptionFilters][1].
2125
+ #
2126
+ #
2127
+ #
2128
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeSubscriptionFilters.html
1970
2129
  # @return [String]
1971
2130
  #
1972
2131
  # @!attribute [rw] filter_pattern
@@ -2052,6 +2211,32 @@ module Aws::CloudWatchLogs
2052
2211
  include Aws::Structure
2053
2212
  end
2054
2213
 
2214
+ # @!attribute [rw] query_definition_id
2215
+ # @return [String]
2216
+ #
2217
+ # @!attribute [rw] name
2218
+ # @return [String]
2219
+ #
2220
+ # @!attribute [rw] query_string
2221
+ # @return [String]
2222
+ #
2223
+ # @!attribute [rw] last_modified
2224
+ # @return [Integer]
2225
+ #
2226
+ # @!attribute [rw] log_group_names
2227
+ # @return [Array<String>]
2228
+ #
2229
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/QueryDefinition AWS API Documentation
2230
+ #
2231
+ class QueryDefinition < Struct.new(
2232
+ :query_definition_id,
2233
+ :name,
2234
+ :query_string,
2235
+ :last_modified,
2236
+ :log_group_names)
2237
+ include Aws::Structure
2238
+ end
2239
+
2055
2240
  # Information about one CloudWatch Logs Insights query that matches the
2056
2241
  # request in a `DescribeQueries` operation.
2057
2242
  #
@@ -2136,6 +2321,18 @@ module Aws::CloudWatchLogs
2136
2321
  include Aws::Structure
2137
2322
  end
2138
2323
 
2324
+ # The specified resource already exists.
2325
+ #
2326
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ResourceAlreadyExistsException AWS API Documentation
2327
+ #
2328
+ class ResourceAlreadyExistsException < Aws::EmptyStructure; end
2329
+
2330
+ # The specified resource does not exist.
2331
+ #
2332
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ResourceNotFoundException AWS API Documentation
2333
+ #
2334
+ class ResourceNotFoundException < Aws::EmptyStructure; end
2335
+
2139
2336
  # A policy enabling one or more entities to put logs to a log group in
2140
2337
  # this account.
2141
2338
  #
@@ -2164,6 +2361,13 @@ module Aws::CloudWatchLogs
2164
2361
  # Contains one field from one log event returned by a CloudWatch Logs
2165
2362
  # Insights query, along with the value of that field.
2166
2363
  #
2364
+ # For more information about the fields that are generated by CloudWatch
2365
+ # logs, see [Supported Logs and Discovered Fields][1].
2366
+ #
2367
+ #
2368
+ #
2369
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html
2370
+ #
2167
2371
  # @!attribute [rw] field
2168
2372
  # The log event field.
2169
2373
  # @return [String]
@@ -2198,6 +2402,12 @@ module Aws::CloudWatchLogs
2198
2402
  include Aws::Structure
2199
2403
  end
2200
2404
 
2405
+ # The service cannot complete the request.
2406
+ #
2407
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ServiceUnavailableException AWS API Documentation
2408
+ #
2409
+ class ServiceUnavailableException < Aws::EmptyStructure; end
2410
+
2201
2411
  # @note When making an API call, you may pass StartQueryRequest
2202
2412
  # data as a hash:
2203
2413
  #
@@ -2417,6 +2627,12 @@ module Aws::CloudWatchLogs
2417
2627
  include Aws::Structure
2418
2628
  end
2419
2629
 
2630
+ # The most likely cause is an invalid AWS access key ID or secret key.
2631
+ #
2632
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UnrecognizedClientException AWS API Documentation
2633
+ #
2634
+ class UnrecognizedClientException < Aws::EmptyStructure; end
2635
+
2420
2636
  # @note When making an API call, you may pass UntagLogGroupRequest
2421
2637
  # data as a hash:
2422
2638
  #