aws-sdk-cloudwatch 1.159.0 → 1.160.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f272f104e162a1df32400276b539d5ae460b609618028aa8b555995974c2ddd
4
- data.tar.gz: dfdc3fbfddc2560ce97527d9deb3192d49aa7f6dcdafc5ee02847c6c70b0f13c
3
+ metadata.gz: c0338af03978236f27c095fd3aed06569fe0252adee2ce1fb80976748aaae197
4
+ data.tar.gz: 5120bad11953f7204a67a7b16fdc8422bc0a53d31051b3e04dcd5bfa35c28e4a
5
5
  SHA512:
6
- metadata.gz: '09b92c115de753f49cde4a0c0535b1562da90bd7f28c6153395708f2c253ee1dcc7bbf959264b38c3c53a7890ab8c564ea6a89a75259d37b3c5c66e446ea607f'
7
- data.tar.gz: 71bc1b6c23dcf6dc14a554348301092539a11badef3909a486109c9daacc4b3be2f67bccdf1a6e812aac0af33a60914c171c27e02efe655eaec04d921dd437c9
6
+ metadata.gz: 8f44b00a1bd586723b6d0c5a957bccb522e7e5ec2e97ac37f5445aa337d080c22d1d7f1773365d467038e43cb5ac9a2faf29f0fdd55261e1fd651e7ab24cedca
7
+ data.tar.gz: 7bbae9891be52a0d441b13b3c5ab80549db4e95060b14e0e005b79188faf17e450396f278769b22688bf8f86fb14fa5b5ae8af16ed78b1dfaa1f793226ed222a
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.160.0 (2026-11-12)
5
+ ------------------
6
+
7
+ * Feature - Adds support for saving, retrieving, listing, and deleting CloudWatch metric data query definitions.
8
+
4
9
  1.159.0 (2026-11-11)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.159.0
1
+ 1.160.0
@@ -957,6 +957,39 @@ module Aws::CloudWatch
957
957
  req.send_request(options)
958
958
  end
959
959
 
960
+ # Deletes a metric data query definition.
961
+ #
962
+ # This operation is idempotent. If the definition doesn't exist, the
963
+ # operation succeeds without returning an error.
964
+ #
965
+ # **Permissions**
966
+ #
967
+ # To delete a definition, you need the
968
+ # `cloudwatch:DeleteMetricDataQueryDefinition` permission on the metric
969
+ # data query definition resource. You can use the
970
+ # `aws:ResourceTag/${TagKey}` condition key to control access based on
971
+ # the tags of the definition.
972
+ #
973
+ # @option params [required, String] :id
974
+ # The ID of the metric data query definition to delete.
975
+ #
976
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
977
+ #
978
+ # @example Request syntax with placeholder values
979
+ #
980
+ # resp = client.delete_metric_data_query_definition({
981
+ # id: "DefinitionId", # required
982
+ # })
983
+ #
984
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteMetricDataQueryDefinition AWS API Documentation
985
+ #
986
+ # @overload delete_metric_data_query_definition(params = {})
987
+ # @param [Hash] params ({})
988
+ def delete_metric_data_query_definition(params = {}, options = {})
989
+ req = build_request(:delete_metric_data_query_definition, params)
990
+ req.send_request(options)
991
+ end
992
+
960
993
  # Permanently deletes the metric stream that you specify.
961
994
  #
962
995
  # @option params [required, String] :name
@@ -2454,6 +2487,54 @@ module Aws::CloudWatch
2454
2487
  req.send_request(options)
2455
2488
  end
2456
2489
 
2490
+ # Returns a metric data query definition, including its expression.
2491
+ #
2492
+ # **Permissions**
2493
+ #
2494
+ # To get a definition, you need the
2495
+ # `cloudwatch:GetMetricDataQueryDefinition` permission on the metric
2496
+ # data query definition resource. You can use the
2497
+ # `aws:ResourceTag/${TagKey}` condition key to control access based on
2498
+ # the tags of the definition.
2499
+ #
2500
+ # @option params [required, String] :id
2501
+ # The ID of the metric data query definition to retrieve.
2502
+ #
2503
+ # @return [Types::GetMetricDataQueryDefinitionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2504
+ #
2505
+ # * {Types::GetMetricDataQueryDefinitionOutput#id #id} => String
2506
+ # * {Types::GetMetricDataQueryDefinitionOutput#arn #arn} => String
2507
+ # * {Types::GetMetricDataQueryDefinitionOutput#path #path} => String
2508
+ # * {Types::GetMetricDataQueryDefinitionOutput#expression #expression} => String
2509
+ # * {Types::GetMetricDataQueryDefinitionOutput#type #type} => String
2510
+ # * {Types::GetMetricDataQueryDefinitionOutput#created_at #created_at} => Time
2511
+ # * {Types::GetMetricDataQueryDefinitionOutput#updated_at #updated_at} => Time
2512
+ #
2513
+ # @example Request syntax with placeholder values
2514
+ #
2515
+ # resp = client.get_metric_data_query_definition({
2516
+ # id: "DefinitionId", # required
2517
+ # })
2518
+ #
2519
+ # @example Response structure
2520
+ #
2521
+ # resp.id #=> String
2522
+ # resp.arn #=> String
2523
+ # resp.path #=> String
2524
+ # resp.expression #=> String
2525
+ # resp.type #=> String, one of "PROMQL", "SQL", "METRIC_MATH"
2526
+ # resp.created_at #=> Time
2527
+ # resp.updated_at #=> Time
2528
+ #
2529
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricDataQueryDefinition AWS API Documentation
2530
+ #
2531
+ # @overload get_metric_data_query_definition(params = {})
2532
+ # @param [Hash] params ({})
2533
+ def get_metric_data_query_definition(params = {}, options = {})
2534
+ req = build_request(:get_metric_data_query_definition, params)
2535
+ req.send_request(options)
2536
+ end
2537
+
2457
2538
  # Gets statistics for the specified metric.
2458
2539
  #
2459
2540
  # The maximum number of data points returned from a single call is
@@ -3105,6 +3186,61 @@ module Aws::CloudWatch
3105
3186
  req.send_request(options)
3106
3187
  end
3107
3188
 
3189
+ # Lists the metric data query definitions in your account and Region.
3190
+ #
3191
+ # The results are summaries that don't include the expression. To get
3192
+ # the full definition, call `GetMetricDataQueryDefinition` with its ID.
3193
+ #
3194
+ # This operation supports pagination. Use the `MaxResults` and
3195
+ # `NextToken` parameters to retrieve results in multiple calls.
3196
+ #
3197
+ # **Permissions**
3198
+ #
3199
+ # To list definitions, you need the
3200
+ # `cloudwatch:ListMetricDataQueryDefinitions` permission. This
3201
+ # permission applies to all definitions in the account and Region. The
3202
+ # results aren't filtered by tags.
3203
+ #
3204
+ # @option params [Integer] :max_results
3205
+ # The maximum number of metric data query definitions to return in one
3206
+ # call. The default is 100.
3207
+ #
3208
+ # @option params [String] :next_token
3209
+ # The token returned by a previous call to indicate where to continue
3210
+ # retrieving results.
3211
+ #
3212
+ # @return [Types::ListMetricDataQueryDefinitionsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3213
+ #
3214
+ # * {Types::ListMetricDataQueryDefinitionsOutput#items #items} => Array<Types::MetricDataQueryDefinitionSummary>
3215
+ # * {Types::ListMetricDataQueryDefinitionsOutput#next_token #next_token} => String
3216
+ #
3217
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
3218
+ #
3219
+ # @example Request syntax with placeholder values
3220
+ #
3221
+ # resp = client.list_metric_data_query_definitions({
3222
+ # max_results: 1,
3223
+ # next_token: "MetricDataQueryDefinitionNextToken",
3224
+ # })
3225
+ #
3226
+ # @example Response structure
3227
+ #
3228
+ # resp.items #=> Array
3229
+ # resp.items[0].id #=> String
3230
+ # resp.items[0].path #=> String
3231
+ # resp.items[0].type #=> String, one of "PROMQL", "SQL", "METRIC_MATH"
3232
+ # resp.items[0].updated_at #=> Time
3233
+ # resp.next_token #=> String
3234
+ #
3235
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetricDataQueryDefinitions AWS API Documentation
3236
+ #
3237
+ # @overload list_metric_data_query_definitions(params = {})
3238
+ # @param [Hash] params ({})
3239
+ def list_metric_data_query_definitions(params = {}, options = {})
3240
+ req = build_request(:list_metric_data_query_definitions, params)
3241
+ req.send_request(options)
3242
+ end
3243
+
3108
3244
  # Returns a list of metric streams in this account.
3109
3245
  #
3110
3246
  # @option params [String] :next_token
@@ -5220,6 +5356,120 @@ module Aws::CloudWatch
5220
5356
  req.send_request(options)
5221
5357
  end
5222
5358
 
5359
+ # Creates or updates a metric data query definition.
5360
+ #
5361
+ # A metric data query definition saves a metric query so that you can
5362
+ # reuse it later. It includes the query expression, the query language,
5363
+ # and a path that names the definition and can organize it into folders.
5364
+ # When you save a definition, CloudWatch doesn't validate or run its
5365
+ # expression.
5366
+ #
5367
+ # To create a definition, omit `Id`. CloudWatch generates the ID and
5368
+ # returns it. To update a definition, specify its `Id`. An update
5369
+ # replaces the path, expression, and type, and keeps the creation time.
5370
+ #
5371
+ # The path must be unique in your account and Region. If another
5372
+ # definition already uses the path, the request fails with a
5373
+ # `ConflictException`.
5374
+ #
5375
+ # You can have up to 1,000 metric data query definitions in each Region
5376
+ # of your account. A request that would create more fails with a
5377
+ # `LimitExceededException`.
5378
+ #
5379
+ # **Permissions**
5380
+ #
5381
+ # To create or update a definition, you need the
5382
+ # `cloudwatch:PutMetricDataQueryDefinition` permission on the metric
5383
+ # data query definition resource. The resource ARN has the format
5384
+ # `arn:aws:cloudwatch:Region:account-id:metric-query-definition/Id`.
5385
+ #
5386
+ # To add tags when you create a definition, you also need the
5387
+ # `cloudwatch:TagResource` permission. You can use the
5388
+ # `aws:RequestTag/${TagKey}` and `aws:TagKeys` condition keys to control
5389
+ # which tags can be added.
5390
+ #
5391
+ # @option params [String] :id
5392
+ # The ID of the metric data query definition to update. Omit this
5393
+ # parameter to create a definition. CloudWatch then generates the ID and
5394
+ # returns it in the response.
5395
+ #
5396
+ # @option params [required, String] :path
5397
+ # The name of the metric data query definition. Use slashes (`/`) to
5398
+ # organize definitions into folders, for example `team/web/latency`. The
5399
+ # path must meet the following requirements:
5400
+ #
5401
+ # * It must be unique in your account and Region.
5402
+ #
5403
+ # * It can't start or end with a slash.
5404
+ #
5405
+ # * It can't contain an empty folder name (`//`).
5406
+ #
5407
+ # * It can be at most 1,015 bytes when encoded as UTF-8.
5408
+ #
5409
+ # @option params [required, String] :expression
5410
+ # The query expression, in the language that `Type` specifies.
5411
+ # CloudWatch doesn't validate or run the expression when you save it.
5412
+ #
5413
+ # @option params [required, String] :type
5414
+ # The language of the expression. Valid values are the following:
5415
+ #
5416
+ # * `PROMQL` – A PromQL query.
5417
+ #
5418
+ # * `SQL` – A CloudWatch Metrics Insights query.
5419
+ #
5420
+ # * `METRIC_MATH` – A metric math expression.
5421
+ #
5422
+ # @option params [Array<Types::Tag>] :tags
5423
+ # A list of key-value pairs to associate with the metric data query
5424
+ # definition. You can use tags to categorize definitions and to control
5425
+ # access to them. Tags are applied only when the request creates a
5426
+ # definition, that is, when you omit `Id`. To change the tags of an
5427
+ # existing definition, use `TagResource` and `UntagResource`.
5428
+ #
5429
+ # @return [Types::PutMetricDataQueryDefinitionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5430
+ #
5431
+ # * {Types::PutMetricDataQueryDefinitionOutput#id #id} => String
5432
+ # * {Types::PutMetricDataQueryDefinitionOutput#arn #arn} => String
5433
+ # * {Types::PutMetricDataQueryDefinitionOutput#path #path} => String
5434
+ # * {Types::PutMetricDataQueryDefinitionOutput#expression #expression} => String
5435
+ # * {Types::PutMetricDataQueryDefinitionOutput#type #type} => String
5436
+ # * {Types::PutMetricDataQueryDefinitionOutput#created_at #created_at} => Time
5437
+ # * {Types::PutMetricDataQueryDefinitionOutput#updated_at #updated_at} => Time
5438
+ #
5439
+ # @example Request syntax with placeholder values
5440
+ #
5441
+ # resp = client.put_metric_data_query_definition({
5442
+ # id: "DefinitionId",
5443
+ # path: "DefinitionPath", # required
5444
+ # expression: "MetricExpressionString", # required
5445
+ # type: "PROMQL", # required, accepts PROMQL, SQL, METRIC_MATH
5446
+ # tags: [
5447
+ # {
5448
+ # key: "TagKey", # required
5449
+ # value: "TagValue", # required
5450
+ # },
5451
+ # ],
5452
+ # })
5453
+ #
5454
+ # @example Response structure
5455
+ #
5456
+ # resp.id #=> String
5457
+ # resp.arn #=> String
5458
+ # resp.path #=> String
5459
+ # resp.expression #=> String
5460
+ # resp.type #=> String, one of "PROMQL", "SQL", "METRIC_MATH"
5461
+ # resp.created_at #=> Time
5462
+ # resp.updated_at #=> Time
5463
+ #
5464
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricDataQueryDefinition AWS API Documentation
5465
+ #
5466
+ # @overload put_metric_data_query_definition(params = {})
5467
+ # @param [Hash] params ({})
5468
+ def put_metric_data_query_definition(params = {}, options = {})
5469
+ req = build_request(:put_metric_data_query_definition, params)
5470
+ req.send_request(options)
5471
+ end
5472
+
5223
5473
  # Creates or updates a metric stream. Metric streams can automatically
5224
5474
  # stream CloudWatch metrics to Amazon Web Services destinations,
5225
5475
  # including Amazon S3, and to many third-party solutions.
@@ -5920,7 +6170,7 @@ module Aws::CloudWatch
5920
6170
  tracer: tracer
5921
6171
  )
5922
6172
  context[:gem_name] = 'aws-sdk-cloudwatch'
5923
- context[:gem_version] = '1.159.0'
6173
+ context[:gem_version] = '1.160.0'
5924
6174
  Seahorse::Client::Request.new(handlers, context)
5925
6175
  end
5926
6176
 
@@ -97,6 +97,8 @@ module Aws::CloudWatch
97
97
  DatasetArn = Shapes::StringShape.new(name: 'DatasetArn')
98
98
  DatasetId = Shapes::StringShape.new(name: 'DatasetId')
99
99
  DatasetIdentifier = Shapes::StringShape.new(name: 'DatasetIdentifier')
100
+ DefinitionId = Shapes::StringShape.new(name: 'DefinitionId')
101
+ DefinitionPath = Shapes::StringShape.new(name: 'DefinitionPath')
100
102
  DeleteAlarmMuteRuleInput = Shapes::StructureShape.new(name: 'DeleteAlarmMuteRuleInput')
101
103
  DeleteAlarmsInput = Shapes::StructureShape.new(name: 'DeleteAlarmsInput')
102
104
  DeleteAnomalyDetectorInput = Shapes::StructureShape.new(name: 'DeleteAnomalyDetectorInput')
@@ -105,6 +107,8 @@ module Aws::CloudWatch
105
107
  DeleteDashboardsOutput = Shapes::StructureShape.new(name: 'DeleteDashboardsOutput')
106
108
  DeleteInsightRulesInput = Shapes::StructureShape.new(name: 'DeleteInsightRulesInput')
107
109
  DeleteInsightRulesOutput = Shapes::StructureShape.new(name: 'DeleteInsightRulesOutput')
110
+ DeleteMetricDataQueryDefinitionInput = Shapes::StructureShape.new(name: 'DeleteMetricDataQueryDefinitionInput')
111
+ DeleteMetricDataQueryDefinitionOutput = Shapes::StructureShape.new(name: 'DeleteMetricDataQueryDefinitionOutput')
108
112
  DeleteMetricStreamInput = Shapes::StructureShape.new(name: 'DeleteMetricStreamInput')
109
113
  DeleteMetricStreamOutput = Shapes::StructureShape.new(name: 'DeleteMetricStreamOutput')
110
114
  DeleteResourceMetricsConfigurationInput = Shapes::StructureShape.new(name: 'DeleteResourceMetricsConfigurationInput')
@@ -173,6 +177,8 @@ module Aws::CloudWatch
173
177
  GetMetricDataLabelTimezone = Shapes::StringShape.new(name: 'GetMetricDataLabelTimezone')
174
178
  GetMetricDataMaxDatapoints = Shapes::IntegerShape.new(name: 'GetMetricDataMaxDatapoints')
175
179
  GetMetricDataOutput = Shapes::StructureShape.new(name: 'GetMetricDataOutput')
180
+ GetMetricDataQueryDefinitionInput = Shapes::StructureShape.new(name: 'GetMetricDataQueryDefinitionInput')
181
+ GetMetricDataQueryDefinitionOutput = Shapes::StructureShape.new(name: 'GetMetricDataQueryDefinitionOutput')
176
182
  GetMetricStatisticsInput = Shapes::StructureShape.new(name: 'GetMetricStatisticsInput')
177
183
  GetMetricStatisticsOutput = Shapes::StructureShape.new(name: 'GetMetricStatisticsOutput')
178
184
  GetMetricStreamInput = Shapes::StructureShape.new(name: 'GetMetricStreamInput')
@@ -234,6 +240,8 @@ module Aws::CloudWatch
234
240
  ListDashboardsOutput = Shapes::StructureShape.new(name: 'ListDashboardsOutput')
235
241
  ListManagedInsightRulesInput = Shapes::StructureShape.new(name: 'ListManagedInsightRulesInput')
236
242
  ListManagedInsightRulesOutput = Shapes::StructureShape.new(name: 'ListManagedInsightRulesOutput')
243
+ ListMetricDataQueryDefinitionsInput = Shapes::StructureShape.new(name: 'ListMetricDataQueryDefinitionsInput')
244
+ ListMetricDataQueryDefinitionsOutput = Shapes::StructureShape.new(name: 'ListMetricDataQueryDefinitionsOutput')
237
245
  ListMetricStreamsInput = Shapes::StructureShape.new(name: 'ListMetricStreamsInput')
238
246
  ListMetricStreamsMaxResults = Shapes::IntegerShape.new(name: 'ListMetricStreamsMaxResults')
239
247
  ListMetricStreamsOutput = Shapes::StructureShape.new(name: 'ListMetricStreamsOutput')
@@ -250,6 +258,7 @@ module Aws::CloudWatch
250
258
  ManagedRuleState = Shapes::StructureShape.new(name: 'ManagedRuleState')
251
259
  ManagedRules = Shapes::ListShape.new(name: 'ManagedRules')
252
260
  MaxRecords = Shapes::IntegerShape.new(name: 'MaxRecords')
261
+ MaxResults = Shapes::IntegerShape.new(name: 'MaxResults')
253
262
  MaxReturnedResultsCount = Shapes::IntegerShape.new(name: 'MaxReturnedResultsCount')
254
263
  Message = Shapes::StringShape.new(name: 'Message')
255
264
  MessageData = Shapes::StructureShape.new(name: 'MessageData')
@@ -262,11 +271,15 @@ module Aws::CloudWatch
262
271
  MetricData = Shapes::ListShape.new(name: 'MetricData')
263
272
  MetricDataQueries = Shapes::ListShape.new(name: 'MetricDataQueries')
264
273
  MetricDataQuery = Shapes::StructureShape.new(name: 'MetricDataQuery')
274
+ MetricDataQueryDefinitionNextToken = Shapes::StringShape.new(name: 'MetricDataQueryDefinitionNextToken')
275
+ MetricDataQueryDefinitionSummaries = Shapes::ListShape.new(name: 'MetricDataQueryDefinitionSummaries')
276
+ MetricDataQueryDefinitionSummary = Shapes::StructureShape.new(name: 'MetricDataQueryDefinitionSummary')
265
277
  MetricDataResult = Shapes::StructureShape.new(name: 'MetricDataResult')
266
278
  MetricDataResultMessages = Shapes::ListShape.new(name: 'MetricDataResultMessages')
267
279
  MetricDataResults = Shapes::ListShape.new(name: 'MetricDataResults')
268
280
  MetricDatum = Shapes::StructureShape.new(name: 'MetricDatum')
269
281
  MetricExpression = Shapes::StringShape.new(name: 'MetricExpression')
282
+ MetricExpressionString = Shapes::StringShape.new(name: 'MetricExpressionString')
270
283
  MetricId = Shapes::StringShape.new(name: 'MetricId')
271
284
  MetricLabel = Shapes::StringShape.new(name: 'MetricLabel')
272
285
  MetricMathAnomalyDetector = Shapes::StructureShape.new(name: 'MetricMathAnomalyDetector')
@@ -322,12 +335,15 @@ module Aws::CloudWatch
322
335
  PutManagedInsightRulesOutput = Shapes::StructureShape.new(name: 'PutManagedInsightRulesOutput')
323
336
  PutMetricAlarmInput = Shapes::StructureShape.new(name: 'PutMetricAlarmInput')
324
337
  PutMetricDataInput = Shapes::StructureShape.new(name: 'PutMetricDataInput')
338
+ PutMetricDataQueryDefinitionInput = Shapes::StructureShape.new(name: 'PutMetricDataQueryDefinitionInput')
339
+ PutMetricDataQueryDefinitionOutput = Shapes::StructureShape.new(name: 'PutMetricDataQueryDefinitionOutput')
325
340
  PutMetricStreamInput = Shapes::StructureShape.new(name: 'PutMetricStreamInput')
326
341
  PutMetricStreamOutput = Shapes::StructureShape.new(name: 'PutMetricStreamOutput')
327
342
  Query = Shapes::StringShape.new(name: 'Query')
328
343
  QueryResultsToAlarm = Shapes::IntegerShape.new(name: 'QueryResultsToAlarm')
329
344
  QueryResultsToEvaluate = Shapes::IntegerShape.new(name: 'QueryResultsToEvaluate')
330
345
  QueryString = Shapes::StringShape.new(name: 'QueryString')
346
+ QueryType = Shapes::StringShape.new(name: 'QueryType')
331
347
  Range = Shapes::StructureShape.new(name: 'Range')
332
348
  RecentlyActive = Shapes::StringShape.new(name: 'RecentlyActive')
333
349
  RecoveryPeriod = Shapes::IntegerShape.new(name: 'RecoveryPeriod')
@@ -594,6 +610,11 @@ module Aws::CloudWatch
594
610
  DeleteInsightRulesOutput.add_member(:failures, Shapes::ShapeRef.new(shape: BatchFailures, location_name: "Failures"))
595
611
  DeleteInsightRulesOutput.struct_class = Types::DeleteInsightRulesOutput
596
612
 
613
+ DeleteMetricDataQueryDefinitionInput.add_member(:id, Shapes::ShapeRef.new(shape: DefinitionId, required: true, location_name: "Id"))
614
+ DeleteMetricDataQueryDefinitionInput.struct_class = Types::DeleteMetricDataQueryDefinitionInput
615
+
616
+ DeleteMetricDataQueryDefinitionOutput.struct_class = Types::DeleteMetricDataQueryDefinitionOutput
617
+
597
618
  DeleteMetricStreamInput.add_member(:name, Shapes::ShapeRef.new(shape: MetricStreamName, required: true, location_name: "Name"))
598
619
  DeleteMetricStreamInput.struct_class = Types::DeleteMetricStreamInput
599
620
 
@@ -806,6 +827,18 @@ module Aws::CloudWatch
806
827
  GetMetricDataOutput.add_member(:messages, Shapes::ShapeRef.new(shape: MetricDataResultMessages, location_name: "Messages"))
807
828
  GetMetricDataOutput.struct_class = Types::GetMetricDataOutput
808
829
 
830
+ GetMetricDataQueryDefinitionInput.add_member(:id, Shapes::ShapeRef.new(shape: DefinitionId, required: true, location_name: "Id"))
831
+ GetMetricDataQueryDefinitionInput.struct_class = Types::GetMetricDataQueryDefinitionInput
832
+
833
+ GetMetricDataQueryDefinitionOutput.add_member(:id, Shapes::ShapeRef.new(shape: DefinitionId, required: true, location_name: "Id"))
834
+ GetMetricDataQueryDefinitionOutput.add_member(:arn, Shapes::ShapeRef.new(shape: AmazonResourceName, required: true, location_name: "Arn"))
835
+ GetMetricDataQueryDefinitionOutput.add_member(:path, Shapes::ShapeRef.new(shape: DefinitionPath, required: true, location_name: "Path"))
836
+ GetMetricDataQueryDefinitionOutput.add_member(:expression, Shapes::ShapeRef.new(shape: MetricExpressionString, required: true, location_name: "Expression"))
837
+ GetMetricDataQueryDefinitionOutput.add_member(:type, Shapes::ShapeRef.new(shape: QueryType, required: true, location_name: "Type"))
838
+ GetMetricDataQueryDefinitionOutput.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "CreatedAt"))
839
+ GetMetricDataQueryDefinitionOutput.add_member(:updated_at, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "UpdatedAt"))
840
+ GetMetricDataQueryDefinitionOutput.struct_class = Types::GetMetricDataQueryDefinitionOutput
841
+
809
842
  GetMetricStatisticsInput.add_member(:namespace, Shapes::ShapeRef.new(shape: Namespace, required: true, location_name: "Namespace"))
810
843
  GetMetricStatisticsInput.add_member(:metric_name, Shapes::ShapeRef.new(shape: MetricName, required: true, location_name: "MetricName"))
811
844
  GetMetricStatisticsInput.add_member(:dimensions, Shapes::ShapeRef.new(shape: Dimensions, location_name: "Dimensions"))
@@ -962,6 +995,14 @@ module Aws::CloudWatch
962
995
  ListManagedInsightRulesOutput.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
963
996
  ListManagedInsightRulesOutput.struct_class = Types::ListManagedInsightRulesOutput
964
997
 
998
+ ListMetricDataQueryDefinitionsInput.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
999
+ ListMetricDataQueryDefinitionsInput.add_member(:next_token, Shapes::ShapeRef.new(shape: MetricDataQueryDefinitionNextToken, location_name: "NextToken"))
1000
+ ListMetricDataQueryDefinitionsInput.struct_class = Types::ListMetricDataQueryDefinitionsInput
1001
+
1002
+ ListMetricDataQueryDefinitionsOutput.add_member(:items, Shapes::ShapeRef.new(shape: MetricDataQueryDefinitionSummaries, required: true, location_name: "Items"))
1003
+ ListMetricDataQueryDefinitionsOutput.add_member(:next_token, Shapes::ShapeRef.new(shape: MetricDataQueryDefinitionNextToken, location_name: "NextToken"))
1004
+ ListMetricDataQueryDefinitionsOutput.struct_class = Types::ListMetricDataQueryDefinitionsOutput
1005
+
965
1006
  ListMetricStreamsInput.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
966
1007
  ListMetricStreamsInput.add_member(:max_results, Shapes::ShapeRef.new(shape: ListMetricStreamsMaxResults, location_name: "MaxResults"))
967
1008
  ListMetricStreamsInput.struct_class = Types::ListMetricStreamsInput
@@ -1101,6 +1142,14 @@ module Aws::CloudWatch
1101
1142
  MetricDataQuery.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountId, location_name: "AccountId"))
1102
1143
  MetricDataQuery.struct_class = Types::MetricDataQuery
1103
1144
 
1145
+ MetricDataQueryDefinitionSummaries.member = Shapes::ShapeRef.new(shape: MetricDataQueryDefinitionSummary)
1146
+
1147
+ MetricDataQueryDefinitionSummary.add_member(:id, Shapes::ShapeRef.new(shape: DefinitionId, required: true, location_name: "Id"))
1148
+ MetricDataQueryDefinitionSummary.add_member(:path, Shapes::ShapeRef.new(shape: DefinitionPath, required: true, location_name: "Path"))
1149
+ MetricDataQueryDefinitionSummary.add_member(:type, Shapes::ShapeRef.new(shape: QueryType, required: true, location_name: "Type"))
1150
+ MetricDataQueryDefinitionSummary.add_member(:updated_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "UpdatedAt"))
1151
+ MetricDataQueryDefinitionSummary.struct_class = Types::MetricDataQueryDefinitionSummary
1152
+
1104
1153
  MetricDataResult.add_member(:id, Shapes::ShapeRef.new(shape: MetricId, location_name: "Id"))
1105
1154
  MetricDataResult.add_member(:label, Shapes::ShapeRef.new(shape: MetricLabel, location_name: "Label"))
1106
1155
  MetricDataResult.add_member(:timestamps, Shapes::ShapeRef.new(shape: Timestamps, location_name: "Timestamps"))
@@ -1309,6 +1358,22 @@ module Aws::CloudWatch
1309
1358
  PutMetricDataInput.add_member(:strict_entity_validation, Shapes::ShapeRef.new(shape: StrictEntityValidation, location_name: "StrictEntityValidation", metadata: {"box" => true}))
1310
1359
  PutMetricDataInput.struct_class = Types::PutMetricDataInput
1311
1360
 
1361
+ PutMetricDataQueryDefinitionInput.add_member(:id, Shapes::ShapeRef.new(shape: DefinitionId, location_name: "Id"))
1362
+ PutMetricDataQueryDefinitionInput.add_member(:path, Shapes::ShapeRef.new(shape: DefinitionPath, required: true, location_name: "Path"))
1363
+ PutMetricDataQueryDefinitionInput.add_member(:expression, Shapes::ShapeRef.new(shape: MetricExpressionString, required: true, location_name: "Expression"))
1364
+ PutMetricDataQueryDefinitionInput.add_member(:type, Shapes::ShapeRef.new(shape: QueryType, required: true, location_name: "Type"))
1365
+ PutMetricDataQueryDefinitionInput.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
1366
+ PutMetricDataQueryDefinitionInput.struct_class = Types::PutMetricDataQueryDefinitionInput
1367
+
1368
+ PutMetricDataQueryDefinitionOutput.add_member(:id, Shapes::ShapeRef.new(shape: DefinitionId, required: true, location_name: "Id"))
1369
+ PutMetricDataQueryDefinitionOutput.add_member(:arn, Shapes::ShapeRef.new(shape: AmazonResourceName, required: true, location_name: "Arn"))
1370
+ PutMetricDataQueryDefinitionOutput.add_member(:path, Shapes::ShapeRef.new(shape: DefinitionPath, required: true, location_name: "Path"))
1371
+ PutMetricDataQueryDefinitionOutput.add_member(:expression, Shapes::ShapeRef.new(shape: MetricExpressionString, required: true, location_name: "Expression"))
1372
+ PutMetricDataQueryDefinitionOutput.add_member(:type, Shapes::ShapeRef.new(shape: QueryType, required: true, location_name: "Type"))
1373
+ PutMetricDataQueryDefinitionOutput.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "CreatedAt"))
1374
+ PutMetricDataQueryDefinitionOutput.add_member(:updated_at, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "UpdatedAt"))
1375
+ PutMetricDataQueryDefinitionOutput.struct_class = Types::PutMetricDataQueryDefinitionOutput
1376
+
1312
1377
  PutMetricStreamInput.add_member(:name, Shapes::ShapeRef.new(shape: MetricStreamName, required: true, location_name: "Name"))
1313
1378
  PutMetricStreamInput.add_member(:include_filters, Shapes::ShapeRef.new(shape: MetricStreamFilters, location_name: "IncludeFilters"))
1314
1379
  PutMetricStreamInput.add_member(:exclude_filters, Shapes::ShapeRef.new(shape: MetricStreamFilters, location_name: "ExcludeFilters"))
@@ -1568,6 +1633,14 @@ module Aws::CloudWatch
1568
1633
  o.errors << Shapes::ShapeRef.new(shape: MissingRequiredParameterException)
1569
1634
  end)
1570
1635
 
1636
+ api.add_operation(:delete_metric_data_query_definition, Seahorse::Model::Operation.new.tap do |o|
1637
+ o.name = "DeleteMetricDataQueryDefinition"
1638
+ o.http_method = "POST"
1639
+ o.http_request_uri = "/"
1640
+ o.input = Shapes::ShapeRef.new(shape: DeleteMetricDataQueryDefinitionInput)
1641
+ o.output = Shapes::ShapeRef.new(shape: DeleteMetricDataQueryDefinitionOutput)
1642
+ end)
1643
+
1571
1644
  api.add_operation(:delete_metric_stream, Seahorse::Model::Operation.new.tap do |o|
1572
1645
  o.name = "DeleteMetricStream"
1573
1646
  o.http_method = "POST"
@@ -1771,6 +1844,15 @@ module Aws::CloudWatch
1771
1844
  )
1772
1845
  end)
1773
1846
 
1847
+ api.add_operation(:get_metric_data_query_definition, Seahorse::Model::Operation.new.tap do |o|
1848
+ o.name = "GetMetricDataQueryDefinition"
1849
+ o.http_method = "POST"
1850
+ o.http_request_uri = "/"
1851
+ o.input = Shapes::ShapeRef.new(shape: GetMetricDataQueryDefinitionInput)
1852
+ o.output = Shapes::ShapeRef.new(shape: GetMetricDataQueryDefinitionOutput)
1853
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1854
+ end)
1855
+
1774
1856
  api.add_operation(:get_metric_statistics, Seahorse::Model::Operation.new.tap do |o|
1775
1857
  o.name = "GetMetricStatistics"
1776
1858
  o.http_method = "POST"
@@ -1869,6 +1951,20 @@ module Aws::CloudWatch
1869
1951
  )
1870
1952
  end)
1871
1953
 
1954
+ api.add_operation(:list_metric_data_query_definitions, Seahorse::Model::Operation.new.tap do |o|
1955
+ o.name = "ListMetricDataQueryDefinitions"
1956
+ o.http_method = "POST"
1957
+ o.http_request_uri = "/"
1958
+ o.input = Shapes::ShapeRef.new(shape: ListMetricDataQueryDefinitionsInput)
1959
+ o.output = Shapes::ShapeRef.new(shape: ListMetricDataQueryDefinitionsOutput)
1960
+ o[:pager] = Aws::Pager.new(
1961
+ limit_key: "max_results",
1962
+ tokens: {
1963
+ "next_token" => "next_token"
1964
+ }
1965
+ )
1966
+ end)
1967
+
1872
1968
  api.add_operation(:list_metric_streams, Seahorse::Model::Operation.new.tap do |o|
1873
1969
  o.name = "ListMetricStreams"
1874
1970
  o.http_method = "POST"
@@ -2010,6 +2106,17 @@ module Aws::CloudWatch
2010
2106
  o.errors << Shapes::ShapeRef.new(shape: InternalServiceFault)
2011
2107
  end)
2012
2108
 
2109
+ api.add_operation(:put_metric_data_query_definition, Seahorse::Model::Operation.new.tap do |o|
2110
+ o.name = "PutMetricDataQueryDefinition"
2111
+ o.http_method = "POST"
2112
+ o.http_request_uri = "/"
2113
+ o.input = Shapes::ShapeRef.new(shape: PutMetricDataQueryDefinitionInput)
2114
+ o.output = Shapes::ShapeRef.new(shape: PutMetricDataQueryDefinitionOutput)
2115
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
2116
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
2117
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
2118
+ end)
2119
+
2013
2120
  api.add_operation(:put_metric_stream, Seahorse::Model::Operation.new.tap do |o|
2014
2121
  o.name = "PutMetricStream"
2015
2122
  o.http_method = "POST"
@@ -907,6 +907,22 @@ module Aws::CloudWatch
907
907
  include Aws::Structure
908
908
  end
909
909
 
910
+ # @!attribute [rw] id
911
+ # The ID of the metric data query definition to delete.
912
+ # @return [String]
913
+ #
914
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteMetricDataQueryDefinitionInput AWS API Documentation
915
+ #
916
+ class DeleteMetricDataQueryDefinitionInput < Struct.new(
917
+ :id)
918
+ SENSITIVE = []
919
+ include Aws::Structure
920
+ end
921
+
922
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteMetricDataQueryDefinitionOutput AWS API Documentation
923
+ #
924
+ class DeleteMetricDataQueryDefinitionOutput < Aws::EmptyStructure; end
925
+
910
926
  # @!attribute [rw] name
911
927
  # The name of the metric stream to delete.
912
928
  # @return [String]
@@ -2070,6 +2086,67 @@ module Aws::CloudWatch
2070
2086
  include Aws::Structure
2071
2087
  end
2072
2088
 
2089
+ # @!attribute [rw] id
2090
+ # The ID of the metric data query definition to retrieve.
2091
+ # @return [String]
2092
+ #
2093
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricDataQueryDefinitionInput AWS API Documentation
2094
+ #
2095
+ class GetMetricDataQueryDefinitionInput < Struct.new(
2096
+ :id)
2097
+ SENSITIVE = []
2098
+ include Aws::Structure
2099
+ end
2100
+
2101
+ # @!attribute [rw] id
2102
+ # The ID of the metric data query definition.
2103
+ # @return [String]
2104
+ #
2105
+ # @!attribute [rw] arn
2106
+ # The Amazon Resource Name (ARN) of the metric data query definition.
2107
+ # @return [String]
2108
+ #
2109
+ # @!attribute [rw] path
2110
+ # The path of the metric data query definition.
2111
+ # @return [String]
2112
+ #
2113
+ # @!attribute [rw] expression
2114
+ # The query expression.
2115
+ # @return [String]
2116
+ #
2117
+ # @!attribute [rw] type
2118
+ # The language of the expression. Valid values are the following:
2119
+ #
2120
+ # * `PROMQL` – A PromQL query.
2121
+ #
2122
+ # * `SQL` – A CloudWatch Metrics Insights query.
2123
+ #
2124
+ # * `METRIC_MATH` – A metric math expression.
2125
+ # @return [String]
2126
+ #
2127
+ # @!attribute [rw] created_at
2128
+ # The date and time when you created the metric data query definition.
2129
+ # @return [Time]
2130
+ #
2131
+ # @!attribute [rw] updated_at
2132
+ # The date and time when you last updated the metric data query
2133
+ # definition.
2134
+ # @return [Time]
2135
+ #
2136
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricDataQueryDefinitionOutput AWS API Documentation
2137
+ #
2138
+ class GetMetricDataQueryDefinitionOutput < Struct.new(
2139
+ :id,
2140
+ :arn,
2141
+ :path,
2142
+ :expression,
2143
+ :type,
2144
+ :created_at,
2145
+ :updated_at)
2146
+ SENSITIVE = [:expression]
2147
+ include Aws::Structure
2148
+ end
2149
+
2073
2150
  # @!attribute [rw] namespace
2074
2151
  # The namespace of the metric, with or without spaces.
2075
2152
  # @return [String]
@@ -2990,6 +3067,43 @@ module Aws::CloudWatch
2990
3067
  include Aws::Structure
2991
3068
  end
2992
3069
 
3070
+ # @!attribute [rw] max_results
3071
+ # The maximum number of metric data query definitions to return in one
3072
+ # call. The default is 100.
3073
+ # @return [Integer]
3074
+ #
3075
+ # @!attribute [rw] next_token
3076
+ # The token returned by a previous call to indicate where to continue
3077
+ # retrieving results.
3078
+ # @return [String]
3079
+ #
3080
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetricDataQueryDefinitionsInput AWS API Documentation
3081
+ #
3082
+ class ListMetricDataQueryDefinitionsInput < Struct.new(
3083
+ :max_results,
3084
+ :next_token)
3085
+ SENSITIVE = []
3086
+ include Aws::Structure
3087
+ end
3088
+
3089
+ # @!attribute [rw] items
3090
+ # A list of metric data query definition summaries.
3091
+ # @return [Array<Types::MetricDataQueryDefinitionSummary>]
3092
+ #
3093
+ # @!attribute [rw] next_token
3094
+ # The token to use when requesting the next set of results. If this
3095
+ # field is absent, there are no more results to retrieve.
3096
+ # @return [String]
3097
+ #
3098
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetricDataQueryDefinitionsOutput AWS API Documentation
3099
+ #
3100
+ class ListMetricDataQueryDefinitionsOutput < Struct.new(
3101
+ :items,
3102
+ :next_token)
3103
+ SENSITIVE = []
3104
+ include Aws::Structure
3105
+ end
3106
+
2993
3107
  # @!attribute [rw] next_token
2994
3108
  # Include this value, if it was returned by the previous call, to get
2995
3109
  # the next set of metric streams.
@@ -3886,6 +4000,43 @@ module Aws::CloudWatch
3886
4000
  include Aws::Structure
3887
4001
  end
3888
4002
 
4003
+ # Summary information about a metric data query definition. To get the
4004
+ # expression, call `GetMetricDataQueryDefinition`.
4005
+ #
4006
+ # @!attribute [rw] id
4007
+ # The ID of the metric data query definition.
4008
+ # @return [String]
4009
+ #
4010
+ # @!attribute [rw] path
4011
+ # The path of the metric data query definition.
4012
+ # @return [String]
4013
+ #
4014
+ # @!attribute [rw] type
4015
+ # The language of the expression. Valid values are the following:
4016
+ #
4017
+ # * `PROMQL` – A PromQL query.
4018
+ #
4019
+ # * `SQL` – A CloudWatch Metrics Insights query.
4020
+ #
4021
+ # * `METRIC_MATH` – A metric math expression.
4022
+ # @return [String]
4023
+ #
4024
+ # @!attribute [rw] updated_at
4025
+ # The date and time when you last updated the metric data query
4026
+ # definition.
4027
+ # @return [Time]
4028
+ #
4029
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/MetricDataQueryDefinitionSummary AWS API Documentation
4030
+ #
4031
+ class MetricDataQueryDefinitionSummary < Struct.new(
4032
+ :id,
4033
+ :path,
4034
+ :type,
4035
+ :updated_at)
4036
+ SENSITIVE = []
4037
+ include Aws::Structure
4038
+ end
4039
+
3889
4040
  # A `GetMetricData` call returns an array of `MetricDataResult`
3890
4041
  # structures. Each of these structures includes the data points for that
3891
4042
  # metric, along with the timestamps of those data points and other
@@ -5764,6 +5915,105 @@ module Aws::CloudWatch
5764
5915
  include Aws::Structure
5765
5916
  end
5766
5917
 
5918
+ # @!attribute [rw] id
5919
+ # The ID of the metric data query definition to update. Omit this
5920
+ # parameter to create a definition. CloudWatch then generates the ID
5921
+ # and returns it in the response.
5922
+ # @return [String]
5923
+ #
5924
+ # @!attribute [rw] path
5925
+ # The name of the metric data query definition. Use slashes (`/`) to
5926
+ # organize definitions into folders, for example `team/web/latency`.
5927
+ # The path must meet the following requirements:
5928
+ #
5929
+ # * It must be unique in your account and Region.
5930
+ #
5931
+ # * It can't start or end with a slash.
5932
+ #
5933
+ # * It can't contain an empty folder name (`//`).
5934
+ #
5935
+ # * It can be at most 1,015 bytes when encoded as UTF-8.
5936
+ # @return [String]
5937
+ #
5938
+ # @!attribute [rw] expression
5939
+ # The query expression, in the language that `Type` specifies.
5940
+ # CloudWatch doesn't validate or run the expression when you save it.
5941
+ # @return [String]
5942
+ #
5943
+ # @!attribute [rw] type
5944
+ # The language of the expression. Valid values are the following:
5945
+ #
5946
+ # * `PROMQL` – A PromQL query.
5947
+ #
5948
+ # * `SQL` – A CloudWatch Metrics Insights query.
5949
+ #
5950
+ # * `METRIC_MATH` – A metric math expression.
5951
+ # @return [String]
5952
+ #
5953
+ # @!attribute [rw] tags
5954
+ # A list of key-value pairs to associate with the metric data query
5955
+ # definition. You can use tags to categorize definitions and to
5956
+ # control access to them. Tags are applied only when the request
5957
+ # creates a definition, that is, when you omit `Id`. To change the
5958
+ # tags of an existing definition, use `TagResource` and
5959
+ # `UntagResource`.
5960
+ # @return [Array<Types::Tag>]
5961
+ #
5962
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricDataQueryDefinitionInput AWS API Documentation
5963
+ #
5964
+ class PutMetricDataQueryDefinitionInput < Struct.new(
5965
+ :id,
5966
+ :path,
5967
+ :expression,
5968
+ :type,
5969
+ :tags)
5970
+ SENSITIVE = [:expression]
5971
+ include Aws::Structure
5972
+ end
5973
+
5974
+ # @!attribute [rw] id
5975
+ # The ID of the metric data query definition.
5976
+ # @return [String]
5977
+ #
5978
+ # @!attribute [rw] arn
5979
+ # The Amazon Resource Name (ARN) of the metric data query definition.
5980
+ # @return [String]
5981
+ #
5982
+ # @!attribute [rw] path
5983
+ # The path of the metric data query definition.
5984
+ # @return [String]
5985
+ #
5986
+ # @!attribute [rw] expression
5987
+ # The query expression.
5988
+ # @return [String]
5989
+ #
5990
+ # @!attribute [rw] type
5991
+ # The language of the expression.
5992
+ # @return [String]
5993
+ #
5994
+ # @!attribute [rw] created_at
5995
+ # The date and time when you created the metric data query definition.
5996
+ # @return [Time]
5997
+ #
5998
+ # @!attribute [rw] updated_at
5999
+ # The date and time when you last updated the metric data query
6000
+ # definition.
6001
+ # @return [Time]
6002
+ #
6003
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricDataQueryDefinitionOutput AWS API Documentation
6004
+ #
6005
+ class PutMetricDataQueryDefinitionOutput < Struct.new(
6006
+ :id,
6007
+ :arn,
6008
+ :path,
6009
+ :expression,
6010
+ :type,
6011
+ :created_at,
6012
+ :updated_at)
6013
+ SENSITIVE = [:expression]
6014
+ include Aws::Structure
6015
+ end
6016
+
5767
6017
  # @!attribute [rw] name
5768
6018
  # If you are creating a new metric stream, this is the name for the
5769
6019
  # new stream. The name must be different than the names of other
@@ -58,7 +58,7 @@ module Aws::CloudWatch
58
58
  autoload :CompositeAlarm, 'aws-sdk-cloudwatch/composite_alarm'
59
59
  autoload :Metric, 'aws-sdk-cloudwatch/metric'
60
60
 
61
- GEM_VERSION = '1.159.0'
61
+ GEM_VERSION = '1.160.0'
62
62
 
63
63
  end
64
64
 
data/sig/client.rbs CHANGED
@@ -156,6 +156,15 @@ module Aws
156
156
  ) -> _DeleteInsightRulesResponseSuccess
157
157
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _DeleteInsightRulesResponseSuccess
158
158
 
159
+ interface _DeleteMetricDataQueryDefinitionResponseSuccess
160
+ include ::Seahorse::Client::_ResponseSuccess[Types::DeleteMetricDataQueryDefinitionOutput]
161
+ end
162
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/CloudWatch/Client.html#delete_metric_data_query_definition-instance_method
163
+ def delete_metric_data_query_definition: (
164
+ id: ::String
165
+ ) -> _DeleteMetricDataQueryDefinitionResponseSuccess
166
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _DeleteMetricDataQueryDefinitionResponseSuccess
167
+
159
168
  interface _DeleteMetricStreamResponseSuccess
160
169
  include ::Seahorse::Client::_ResponseSuccess[Types::DeleteMetricStreamOutput]
161
170
  end
@@ -408,6 +417,22 @@ module Aws
408
417
  ) -> _GetMetricDataResponseSuccess
409
418
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetMetricDataResponseSuccess
410
419
 
420
+ interface _GetMetricDataQueryDefinitionResponseSuccess
421
+ include ::Seahorse::Client::_ResponseSuccess[Types::GetMetricDataQueryDefinitionOutput]
422
+ def id: () -> ::String
423
+ def arn: () -> ::String
424
+ def path: () -> ::String
425
+ def expression: () -> ::String
426
+ def type: () -> ("PROMQL" | "SQL" | "METRIC_MATH")
427
+ def created_at: () -> ::Time
428
+ def updated_at: () -> ::Time
429
+ end
430
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/CloudWatch/Client.html#get_metric_data_query_definition-instance_method
431
+ def get_metric_data_query_definition: (
432
+ id: ::String
433
+ ) -> _GetMetricDataQueryDefinitionResponseSuccess
434
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetMetricDataQueryDefinitionResponseSuccess
435
+
411
436
  interface _GetMetricStatisticsResponseSuccess
412
437
  include ::Seahorse::Client::_ResponseSuccess[Types::GetMetricStatisticsOutput]
413
438
  def label: () -> ::String
@@ -526,6 +551,18 @@ module Aws
526
551
  ) -> _ListManagedInsightRulesResponseSuccess
527
552
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ListManagedInsightRulesResponseSuccess
528
553
 
554
+ interface _ListMetricDataQueryDefinitionsResponseSuccess
555
+ include ::Seahorse::Client::_ResponseSuccess[Types::ListMetricDataQueryDefinitionsOutput]
556
+ def items: () -> ::Array[Types::MetricDataQueryDefinitionSummary]
557
+ def next_token: () -> ::String
558
+ end
559
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/CloudWatch/Client.html#list_metric_data_query_definitions-instance_method
560
+ def list_metric_data_query_definitions: (
561
+ ?max_results: ::Integer,
562
+ ?next_token: ::String
563
+ ) -> _ListMetricDataQueryDefinitionsResponseSuccess
564
+ | (?Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ListMetricDataQueryDefinitionsResponseSuccess
565
+
529
566
  interface _ListMetricStreamsResponseSuccess
530
567
  include ::Seahorse::Client::_ResponseSuccess[Types::ListMetricStreamsOutput]
531
568
  def next_token: () -> ::String
@@ -853,6 +890,31 @@ module Aws
853
890
  ) -> ::Seahorse::Client::_ResponseSuccess[::Aws::EmptyStructure]
854
891
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> ::Seahorse::Client::_ResponseSuccess[::Aws::EmptyStructure]
855
892
 
893
+ interface _PutMetricDataQueryDefinitionResponseSuccess
894
+ include ::Seahorse::Client::_ResponseSuccess[Types::PutMetricDataQueryDefinitionOutput]
895
+ def id: () -> ::String
896
+ def arn: () -> ::String
897
+ def path: () -> ::String
898
+ def expression: () -> ::String
899
+ def type: () -> ("PROMQL" | "SQL" | "METRIC_MATH")
900
+ def created_at: () -> ::Time
901
+ def updated_at: () -> ::Time
902
+ end
903
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/CloudWatch/Client.html#put_metric_data_query_definition-instance_method
904
+ def put_metric_data_query_definition: (
905
+ ?id: ::String,
906
+ path: ::String,
907
+ expression: ::String,
908
+ type: ("PROMQL" | "SQL" | "METRIC_MATH"),
909
+ ?tags: Array[
910
+ {
911
+ key: ::String,
912
+ value: ::String
913
+ }
914
+ ]
915
+ ) -> _PutMetricDataQueryDefinitionResponseSuccess
916
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _PutMetricDataQueryDefinitionResponseSuccess
917
+
856
918
  interface _PutMetricStreamResponseSuccess
857
919
  include ::Seahorse::Client::_ResponseSuccess[Types::PutMetricStreamOutput]
858
920
  def arn: () -> ::String
data/sig/types.rbs CHANGED
@@ -209,6 +209,14 @@ module Aws::CloudWatch
209
209
  SENSITIVE: []
210
210
  end
211
211
 
212
+ class DeleteMetricDataQueryDefinitionInput
213
+ attr_accessor id: ::String
214
+ SENSITIVE: []
215
+ end
216
+
217
+ class DeleteMetricDataQueryDefinitionOutput < Aws::EmptyStructure
218
+ end
219
+
212
220
  class DeleteMetricStreamInput
213
221
  attr_accessor name: ::String
214
222
  SENSITIVE: []
@@ -491,6 +499,22 @@ module Aws::CloudWatch
491
499
  SENSITIVE: []
492
500
  end
493
501
 
502
+ class GetMetricDataQueryDefinitionInput
503
+ attr_accessor id: ::String
504
+ SENSITIVE: []
505
+ end
506
+
507
+ class GetMetricDataQueryDefinitionOutput
508
+ attr_accessor id: ::String
509
+ attr_accessor arn: ::String
510
+ attr_accessor path: ::String
511
+ attr_accessor expression: ::String
512
+ attr_accessor type: ("PROMQL" | "SQL" | "METRIC_MATH")
513
+ attr_accessor created_at: ::Time
514
+ attr_accessor updated_at: ::Time
515
+ SENSITIVE: [:expression]
516
+ end
517
+
494
518
  class GetMetricStatisticsInput
495
519
  attr_accessor namespace: ::String
496
520
  attr_accessor metric_name: ::String
@@ -691,6 +715,18 @@ module Aws::CloudWatch
691
715
  SENSITIVE: []
692
716
  end
693
717
 
718
+ class ListMetricDataQueryDefinitionsInput
719
+ attr_accessor max_results: ::Integer
720
+ attr_accessor next_token: ::String
721
+ SENSITIVE: []
722
+ end
723
+
724
+ class ListMetricDataQueryDefinitionsOutput
725
+ attr_accessor items: ::Array[Types::MetricDataQueryDefinitionSummary]
726
+ attr_accessor next_token: ::String
727
+ SENSITIVE: []
728
+ end
729
+
694
730
  class ListMetricStreamsInput
695
731
  attr_accessor next_token: ::String
696
732
  attr_accessor max_results: ::Integer
@@ -846,6 +882,14 @@ module Aws::CloudWatch
846
882
  SENSITIVE: []
847
883
  end
848
884
 
885
+ class MetricDataQueryDefinitionSummary
886
+ attr_accessor id: ::String
887
+ attr_accessor path: ::String
888
+ attr_accessor type: ("PROMQL" | "SQL" | "METRIC_MATH")
889
+ attr_accessor updated_at: ::Time
890
+ SENSITIVE: []
891
+ end
892
+
849
893
  class MetricDataResult
850
894
  attr_accessor id: ::String
851
895
  attr_accessor label: ::String
@@ -1073,6 +1117,26 @@ module Aws::CloudWatch
1073
1117
  SENSITIVE: []
1074
1118
  end
1075
1119
 
1120
+ class PutMetricDataQueryDefinitionInput
1121
+ attr_accessor id: ::String
1122
+ attr_accessor path: ::String
1123
+ attr_accessor expression: ::String
1124
+ attr_accessor type: ("PROMQL" | "SQL" | "METRIC_MATH")
1125
+ attr_accessor tags: ::Array[Types::Tag]
1126
+ SENSITIVE: [:expression]
1127
+ end
1128
+
1129
+ class PutMetricDataQueryDefinitionOutput
1130
+ attr_accessor id: ::String
1131
+ attr_accessor arn: ::String
1132
+ attr_accessor path: ::String
1133
+ attr_accessor expression: ::String
1134
+ attr_accessor type: ("PROMQL" | "SQL" | "METRIC_MATH")
1135
+ attr_accessor created_at: ::Time
1136
+ attr_accessor updated_at: ::Time
1137
+ SENSITIVE: [:expression]
1138
+ end
1139
+
1076
1140
  class PutMetricStreamInput
1077
1141
  attr_accessor name: ::String
1078
1142
  attr_accessor include_filters: ::Array[Types::MetricStreamFilter]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-cloudwatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.159.0
4
+ version: 1.160.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services