aws-sdk-prometheusservice 1.62.0 → 1.63.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: 1b697b6cc911216035d928c1dff41f5ca7e811d9f189cde251d24ceb9e09aa9c
4
- data.tar.gz: baa0a8a21fc3d5032d0f829ce50838e4ec58712014e7e28f58f2bab968a0dab4
3
+ metadata.gz: c813f50173402d78a19064616104f61e3637b5d25c7101d67cda299835600b41
4
+ data.tar.gz: '06139c65fa0de7918400e723e2f1c86d9af99a4d1943523eae3345ec895624c2'
5
5
  SHA512:
6
- metadata.gz: cfcb48ebe94773a88b2352d751d5639770bfba632b6c348b82001f4b6fa0f0d00ad3f99f3757173c6104386b319b74b07b18aa85564b8ea49570e80be23383ca
7
- data.tar.gz: d6667aca76f6db7b05ea64620ef9a9c22493b8b694cd7698cefb032f9a520a6ff3da0ea687069c44d766c57664fd3168c33a80114ec93fbcdac45fc1a831606e
6
+ metadata.gz: f1bcd18e9ad24f10b8d3279e3daf1956d1dcd0dea576baa15d0c29fe0f38df61772b642a69ad8d24f2ca5a7ef3f7db84cfdb344ea85953e863eb232072dc5b13
7
+ data.tar.gz: 6cbf722f7129422366348443f7fc7fedac148425873ad8019b32563ad63041be13f7ccd473c9ac6965f1e588652410bb13ddc303074c03537de1ec6949f98c07
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.63.0 (2025-10-30)
5
+ ------------------
6
+
7
+ * Feature - Add Anomaly Detection APIs for Amazon Managed Prometheus
8
+
4
9
  1.62.0 (2025-10-21)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.62.0
1
+ 1.63.0
@@ -528,6 +528,102 @@ module Aws::PrometheusService
528
528
  req.send_request(options)
529
529
  end
530
530
 
531
+ # Creates an anomaly detector within a workspace using the Random Cut
532
+ # Forest algorithm for time-series analysis. The anomaly detector
533
+ # analyzes Amazon Managed Service for Prometheus metrics to identify
534
+ # unusual patterns and behaviors.
535
+ #
536
+ # @option params [required, String] :workspace_id
537
+ # The identifier of the workspace where the anomaly detector will be
538
+ # created.
539
+ #
540
+ # @option params [required, String] :alias
541
+ # A user-friendly name for the anomaly detector.
542
+ #
543
+ # @option params [Integer] :evaluation_interval_in_seconds
544
+ # The frequency, in seconds, at which the anomaly detector evaluates
545
+ # metrics. The default value is 60 seconds.
546
+ #
547
+ # @option params [Types::AnomalyDetectorMissingDataAction] :missing_data_action
548
+ # Specifies the action to take when data is missing during evaluation.
549
+ #
550
+ # @option params [required, Types::AnomalyDetectorConfiguration] :configuration
551
+ # The algorithm configuration for the anomaly detector.
552
+ #
553
+ # @option params [Hash<String,String>] :labels
554
+ # The Amazon Managed Service for Prometheus metric labels to associate
555
+ # with the anomaly detector.
556
+ #
557
+ # @option params [String] :client_token
558
+ # A unique, case-sensitive identifier that you provide to ensure the
559
+ # idempotency of the request.
560
+ #
561
+ # **A suitable default value is auto-generated.** You should normally
562
+ # not need to pass this option.**
563
+ #
564
+ # @option params [Hash<String,String>] :tags
565
+ # The metadata to apply to the anomaly detector to assist with
566
+ # categorization and organization.
567
+ #
568
+ # @return [Types::CreateAnomalyDetectorResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
569
+ #
570
+ # * {Types::CreateAnomalyDetectorResponse#anomaly_detector_id #anomaly_detector_id} => String
571
+ # * {Types::CreateAnomalyDetectorResponse#arn #arn} => String
572
+ # * {Types::CreateAnomalyDetectorResponse#status #status} => Types::AnomalyDetectorStatus
573
+ # * {Types::CreateAnomalyDetectorResponse#tags #tags} => Hash&lt;String,String&gt;
574
+ #
575
+ # @example Request syntax with placeholder values
576
+ #
577
+ # resp = client.create_anomaly_detector({
578
+ # workspace_id: "WorkspaceId", # required
579
+ # alias: "AnomalyDetectorAlias", # required
580
+ # evaluation_interval_in_seconds: 1,
581
+ # missing_data_action: {
582
+ # mark_as_anomaly: false,
583
+ # skip: false,
584
+ # },
585
+ # configuration: { # required
586
+ # random_cut_forest: {
587
+ # query: "RandomCutForestQuery", # required
588
+ # shingle_size: 1,
589
+ # sample_size: 1,
590
+ # ignore_near_expected_from_above: {
591
+ # amount: 1.0,
592
+ # ratio: 1.0,
593
+ # },
594
+ # ignore_near_expected_from_below: {
595
+ # amount: 1.0,
596
+ # ratio: 1.0,
597
+ # },
598
+ # },
599
+ # },
600
+ # labels: {
601
+ # "PrometheusMetricLabelKey" => "PrometheusMetricLabelValue",
602
+ # },
603
+ # client_token: "IdempotencyToken",
604
+ # tags: {
605
+ # "TagKey" => "TagValue",
606
+ # },
607
+ # })
608
+ #
609
+ # @example Response structure
610
+ #
611
+ # resp.anomaly_detector_id #=> String
612
+ # resp.arn #=> String
613
+ # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
614
+ # resp.status.status_reason #=> String
615
+ # resp.tags #=> Hash
616
+ # resp.tags["TagKey"] #=> String
617
+ #
618
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateAnomalyDetector AWS API Documentation
619
+ #
620
+ # @overload create_anomaly_detector(params = {})
621
+ # @param [Hash] params ({})
622
+ def create_anomaly_detector(params = {}, options = {})
623
+ req = build_request(:create_anomaly_detector, params)
624
+ req.send_request(options)
625
+ end
626
+
531
627
  # The `CreateLoggingConfiguration` operation creates rules and alerting
532
628
  # logging configuration for the workspace. Use this operation to set the
533
629
  # CloudWatch log group to which the logs will be published to.
@@ -968,6 +1064,42 @@ module Aws::PrometheusService
968
1064
  req.send_request(options)
969
1065
  end
970
1066
 
1067
+ # Removes an anomaly detector from a workspace. This operation is
1068
+ # idempotent.
1069
+ #
1070
+ # @option params [required, String] :workspace_id
1071
+ # The identifier of the workspace containing the anomaly detector to
1072
+ # delete.
1073
+ #
1074
+ # @option params [required, String] :anomaly_detector_id
1075
+ # The identifier of the anomaly detector to delete.
1076
+ #
1077
+ # @option params [String] :client_token
1078
+ # A unique, case-sensitive identifier that you provide to ensure the
1079
+ # idempotency of the request.
1080
+ #
1081
+ # **A suitable default value is auto-generated.** You should normally
1082
+ # not need to pass this option.**
1083
+ #
1084
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1085
+ #
1086
+ # @example Request syntax with placeholder values
1087
+ #
1088
+ # resp = client.delete_anomaly_detector({
1089
+ # workspace_id: "WorkspaceId", # required
1090
+ # anomaly_detector_id: "AnomalyDetectorId", # required
1091
+ # client_token: "IdempotencyToken",
1092
+ # })
1093
+ #
1094
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteAnomalyDetector AWS API Documentation
1095
+ #
1096
+ # @overload delete_anomaly_detector(params = {})
1097
+ # @param [Hash] params ({})
1098
+ def delete_anomaly_detector(params = {}, options = {})
1099
+ req = build_request(:delete_anomaly_detector, params)
1100
+ req.send_request(options)
1101
+ end
1102
+
971
1103
  # Deletes the rules and alerting logging configuration for a workspace.
972
1104
  #
973
1105
  # <note markdown="1"> These logging configurations are only for rules and alerting logs.
@@ -1262,6 +1394,65 @@ module Aws::PrometheusService
1262
1394
  req.send_request(options)
1263
1395
  end
1264
1396
 
1397
+ # Retrieves detailed information about a specific anomaly detector,
1398
+ # including its status and configuration.
1399
+ #
1400
+ # @option params [required, String] :workspace_id
1401
+ # The identifier of the workspace containing the anomaly detector.
1402
+ #
1403
+ # @option params [required, String] :anomaly_detector_id
1404
+ # The identifier of the anomaly detector to describe.
1405
+ #
1406
+ # @return [Types::DescribeAnomalyDetectorResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1407
+ #
1408
+ # * {Types::DescribeAnomalyDetectorResponse#anomaly_detector #anomaly_detector} => Types::AnomalyDetectorDescription
1409
+ #
1410
+ # @example Request syntax with placeholder values
1411
+ #
1412
+ # resp = client.describe_anomaly_detector({
1413
+ # workspace_id: "WorkspaceId", # required
1414
+ # anomaly_detector_id: "AnomalyDetectorId", # required
1415
+ # })
1416
+ #
1417
+ # @example Response structure
1418
+ #
1419
+ # resp.anomaly_detector.arn #=> String
1420
+ # resp.anomaly_detector.anomaly_detector_id #=> String
1421
+ # resp.anomaly_detector.alias #=> String
1422
+ # resp.anomaly_detector.evaluation_interval_in_seconds #=> Integer
1423
+ # resp.anomaly_detector.missing_data_action.mark_as_anomaly #=> Boolean
1424
+ # resp.anomaly_detector.missing_data_action.skip #=> Boolean
1425
+ # resp.anomaly_detector.configuration.random_cut_forest.query #=> String
1426
+ # resp.anomaly_detector.configuration.random_cut_forest.shingle_size #=> Integer
1427
+ # resp.anomaly_detector.configuration.random_cut_forest.sample_size #=> Integer
1428
+ # resp.anomaly_detector.configuration.random_cut_forest.ignore_near_expected_from_above.amount #=> Float
1429
+ # resp.anomaly_detector.configuration.random_cut_forest.ignore_near_expected_from_above.ratio #=> Float
1430
+ # resp.anomaly_detector.configuration.random_cut_forest.ignore_near_expected_from_below.amount #=> Float
1431
+ # resp.anomaly_detector.configuration.random_cut_forest.ignore_near_expected_from_below.ratio #=> Float
1432
+ # resp.anomaly_detector.labels #=> Hash
1433
+ # resp.anomaly_detector.labels["PrometheusMetricLabelKey"] #=> String
1434
+ # resp.anomaly_detector.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
1435
+ # resp.anomaly_detector.status.status_reason #=> String
1436
+ # resp.anomaly_detector.created_at #=> Time
1437
+ # resp.anomaly_detector.modified_at #=> Time
1438
+ # resp.anomaly_detector.tags #=> Hash
1439
+ # resp.anomaly_detector.tags["TagKey"] #=> String
1440
+ #
1441
+ #
1442
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
1443
+ #
1444
+ # * anomaly_detector_active
1445
+ # * anomaly_detector_deleted
1446
+ #
1447
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeAnomalyDetector AWS API Documentation
1448
+ #
1449
+ # @overload describe_anomaly_detector(params = {})
1450
+ # @param [Hash] params ({})
1451
+ def describe_anomaly_detector(params = {}, options = {})
1452
+ req = build_request(:describe_anomaly_detector, params)
1453
+ req.send_request(options)
1454
+ end
1455
+
1265
1456
  # Returns complete information about the current rules and alerting
1266
1457
  # logging configuration of the workspace.
1267
1458
  #
@@ -1665,6 +1856,62 @@ module Aws::PrometheusService
1665
1856
  req.send_request(options)
1666
1857
  end
1667
1858
 
1859
+ # Returns a paginated list of anomaly detectors for a workspace with
1860
+ # optional filtering by alias.
1861
+ #
1862
+ # @option params [required, String] :workspace_id
1863
+ # The identifier of the workspace containing the anomaly detectors to
1864
+ # list.
1865
+ #
1866
+ # @option params [String] :alias
1867
+ # Filters the results to anomaly detectors with the specified alias.
1868
+ #
1869
+ # @option params [Integer] :max_results
1870
+ # The maximum number of results to return in a single call. Valid range
1871
+ # is 1 to 1000.
1872
+ #
1873
+ # @option params [String] :next_token
1874
+ # The pagination token to continue retrieving results.
1875
+ #
1876
+ # @return [Types::ListAnomalyDetectorsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1877
+ #
1878
+ # * {Types::ListAnomalyDetectorsResponse#anomaly_detectors #anomaly_detectors} => Array&lt;Types::AnomalyDetectorSummary&gt;
1879
+ # * {Types::ListAnomalyDetectorsResponse#next_token #next_token} => String
1880
+ #
1881
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1882
+ #
1883
+ # @example Request syntax with placeholder values
1884
+ #
1885
+ # resp = client.list_anomaly_detectors({
1886
+ # workspace_id: "WorkspaceId", # required
1887
+ # alias: "AnomalyDetectorAlias",
1888
+ # max_results: 1,
1889
+ # next_token: "PaginationToken",
1890
+ # })
1891
+ #
1892
+ # @example Response structure
1893
+ #
1894
+ # resp.anomaly_detectors #=> Array
1895
+ # resp.anomaly_detectors[0].arn #=> String
1896
+ # resp.anomaly_detectors[0].anomaly_detector_id #=> String
1897
+ # resp.anomaly_detectors[0].alias #=> String
1898
+ # resp.anomaly_detectors[0].status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
1899
+ # resp.anomaly_detectors[0].status.status_reason #=> String
1900
+ # resp.anomaly_detectors[0].created_at #=> Time
1901
+ # resp.anomaly_detectors[0].modified_at #=> Time
1902
+ # resp.anomaly_detectors[0].tags #=> Hash
1903
+ # resp.anomaly_detectors[0].tags["TagKey"] #=> String
1904
+ # resp.next_token #=> String
1905
+ #
1906
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListAnomalyDetectors AWS API Documentation
1907
+ #
1908
+ # @overload list_anomaly_detectors(params = {})
1909
+ # @param [Hash] params ({})
1910
+ def list_anomaly_detectors(params = {}, options = {})
1911
+ req = build_request(:list_anomaly_detectors, params)
1912
+ req.send_request(options)
1913
+ end
1914
+
1668
1915
  # Returns a list of rule groups namespaces in a workspace.
1669
1916
  #
1670
1917
  # @option params [required, String] :workspace_id
@@ -2080,6 +2327,100 @@ module Aws::PrometheusService
2080
2327
  req.send_request(options)
2081
2328
  end
2082
2329
 
2330
+ # When you call `PutAnomalyDetector`, the operation creates a new
2331
+ # anomaly detector if one doesn't exist, or updates an existing one.
2332
+ # Each call to this operation triggers a complete retraining of the
2333
+ # detector, which includes querying the minimum required samples and
2334
+ # backfilling the detector with historical data. This process occurs
2335
+ # regardless of whether you're making a minor change like updating the
2336
+ # evaluation interval or making more substantial modifications. The
2337
+ # operation serves as the single method for creating, updating, and
2338
+ # retraining anomaly detectors.
2339
+ #
2340
+ # @option params [required, String] :workspace_id
2341
+ # The identifier of the workspace containing the anomaly detector to
2342
+ # update.
2343
+ #
2344
+ # @option params [required, String] :anomaly_detector_id
2345
+ # The identifier of the anomaly detector to update.
2346
+ #
2347
+ # @option params [Integer] :evaluation_interval_in_seconds
2348
+ # The frequency, in seconds, at which the anomaly detector evaluates
2349
+ # metrics.
2350
+ #
2351
+ # @option params [Types::AnomalyDetectorMissingDataAction] :missing_data_action
2352
+ # Specifies the action to take when data is missing during evaluation.
2353
+ #
2354
+ # @option params [required, Types::AnomalyDetectorConfiguration] :configuration
2355
+ # The algorithm configuration for the anomaly detector.
2356
+ #
2357
+ # @option params [Hash<String,String>] :labels
2358
+ # The Amazon Managed Service for Prometheus metric labels to associate
2359
+ # with the anomaly detector.
2360
+ #
2361
+ # @option params [String] :client_token
2362
+ # A unique, case-sensitive identifier that you provide to ensure the
2363
+ # idempotency of the request.
2364
+ #
2365
+ # **A suitable default value is auto-generated.** You should normally
2366
+ # not need to pass this option.**
2367
+ #
2368
+ # @return [Types::PutAnomalyDetectorResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2369
+ #
2370
+ # * {Types::PutAnomalyDetectorResponse#anomaly_detector_id #anomaly_detector_id} => String
2371
+ # * {Types::PutAnomalyDetectorResponse#arn #arn} => String
2372
+ # * {Types::PutAnomalyDetectorResponse#status #status} => Types::AnomalyDetectorStatus
2373
+ # * {Types::PutAnomalyDetectorResponse#tags #tags} => Hash&lt;String,String&gt;
2374
+ #
2375
+ # @example Request syntax with placeholder values
2376
+ #
2377
+ # resp = client.put_anomaly_detector({
2378
+ # workspace_id: "WorkspaceId", # required
2379
+ # anomaly_detector_id: "AnomalyDetectorId", # required
2380
+ # evaluation_interval_in_seconds: 1,
2381
+ # missing_data_action: {
2382
+ # mark_as_anomaly: false,
2383
+ # skip: false,
2384
+ # },
2385
+ # configuration: { # required
2386
+ # random_cut_forest: {
2387
+ # query: "RandomCutForestQuery", # required
2388
+ # shingle_size: 1,
2389
+ # sample_size: 1,
2390
+ # ignore_near_expected_from_above: {
2391
+ # amount: 1.0,
2392
+ # ratio: 1.0,
2393
+ # },
2394
+ # ignore_near_expected_from_below: {
2395
+ # amount: 1.0,
2396
+ # ratio: 1.0,
2397
+ # },
2398
+ # },
2399
+ # },
2400
+ # labels: {
2401
+ # "PrometheusMetricLabelKey" => "PrometheusMetricLabelValue",
2402
+ # },
2403
+ # client_token: "IdempotencyToken",
2404
+ # })
2405
+ #
2406
+ # @example Response structure
2407
+ #
2408
+ # resp.anomaly_detector_id #=> String
2409
+ # resp.arn #=> String
2410
+ # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
2411
+ # resp.status.status_reason #=> String
2412
+ # resp.tags #=> Hash
2413
+ # resp.tags["TagKey"] #=> String
2414
+ #
2415
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/PutAnomalyDetector AWS API Documentation
2416
+ #
2417
+ # @overload put_anomaly_detector(params = {})
2418
+ # @param [Hash] params ({})
2419
+ def put_anomaly_detector(params = {}, options = {})
2420
+ req = build_request(:put_anomaly_detector, params)
2421
+ req.send_request(options)
2422
+ end
2423
+
2083
2424
  # Creates or updates a resource-based policy for an Amazon Managed
2084
2425
  # Service for Prometheus workspace. Use resource-based policies to grant
2085
2426
  # permissions to other AWS accounts or services to access your
@@ -2681,7 +3022,7 @@ module Aws::PrometheusService
2681
3022
  tracer: tracer
2682
3023
  )
2683
3024
  context[:gem_name] = 'aws-sdk-prometheusservice'
2684
- context[:gem_version] = '1.62.0'
3025
+ context[:gem_version] = '1.63.0'
2685
3026
  Seahorse::Client::Request.new(handlers, context)
2686
3027
  end
2687
3028
 
@@ -2747,12 +3088,14 @@ module Aws::PrometheusService
2747
3088
  # The following table lists the valid waiter names, the operations they call,
2748
3089
  # and the default `:delay` and `:max_attempts` values.
2749
3090
  #
2750
- # | waiter_name | params | :delay | :max_attempts |
2751
- # | ----------------- | --------------------------- | -------- | ------------- |
2752
- # | scraper_active | {Client#describe_scraper} | 2 | 60 |
2753
- # | scraper_deleted | {Client#describe_scraper} | 2 | 60 |
2754
- # | workspace_active | {Client#describe_workspace} | 2 | 60 |
2755
- # | workspace_deleted | {Client#describe_workspace} | 2 | 60 |
3091
+ # | waiter_name | params | :delay | :max_attempts |
3092
+ # | ------------------------ | ---------------------------------- | -------- | ------------- |
3093
+ # | anomaly_detector_active | {Client#describe_anomaly_detector} | 2 | 60 |
3094
+ # | anomaly_detector_deleted | {Client#describe_anomaly_detector} | 2 | 60 |
3095
+ # | scraper_active | {Client#describe_scraper} | 2 | 60 |
3096
+ # | scraper_deleted | {Client#describe_scraper} | 2 | 60 |
3097
+ # | workspace_active | {Client#describe_workspace} | 2 | 60 |
3098
+ # | workspace_deleted | {Client#describe_workspace} | 2 | 60 |
2756
3099
  #
2757
3100
  # @raise [Errors::FailureStateError] Raised when the waiter terminates
2758
3101
  # because the waiter has entered a state that it will not transition
@@ -2803,6 +3146,8 @@ module Aws::PrometheusService
2803
3146
 
2804
3147
  def waiters
2805
3148
  {
3149
+ anomaly_detector_active: Waiters::AnomalyDetectorActive,
3150
+ anomaly_detector_deleted: Waiters::AnomalyDetectorDeleted,
2806
3151
  scraper_active: Waiters::ScraperActive,
2807
3152
  scraper_deleted: Waiters::ScraperDeleted,
2808
3153
  workspace_active: Waiters::WorkspaceActive,