aws-sdk-prometheusservice 1.6.0 → 1.10.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.
@@ -275,6 +275,15 @@ module Aws::PrometheusService
275
275
  # ** Please note ** When response stubbing is enabled, no HTTP
276
276
  # requests are made, and retries are disabled.
277
277
  #
278
+ # @option options [Boolean] :use_dualstack_endpoint
279
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
280
+ # will be used if available.
281
+ #
282
+ # @option options [Boolean] :use_fips_endpoint
283
+ # When set to `true`, fips compatible endpoints will be used if available.
284
+ # When a `fips` region is used, the region is normalized and this config
285
+ # is set to `true`.
286
+ #
278
287
  # @option options [Boolean] :validate_params (true)
279
288
  # When `true`, request parameters are validated before
280
289
  # sending the request.
@@ -327,6 +336,106 @@ module Aws::PrometheusService
327
336
 
328
337
  # @!group API Operations
329
338
 
339
+ # Create an alert manager definition.
340
+ #
341
+ # @option params [String] :client_token
342
+ # Optional, unique, case-sensitive, user-provided identifier to ensure
343
+ # the idempotency of the request.
344
+ #
345
+ # **A suitable default value is auto-generated.** You should normally
346
+ # not need to pass this option.**
347
+ #
348
+ # @option params [required, String, StringIO, File] :data
349
+ # The alert manager definition data.
350
+ #
351
+ # @option params [required, String] :workspace_id
352
+ # The ID of the workspace in which to create the alert manager
353
+ # definition.
354
+ #
355
+ # @return [Types::CreateAlertManagerDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
356
+ #
357
+ # * {Types::CreateAlertManagerDefinitionResponse#status #status} => Types::AlertManagerDefinitionStatus
358
+ #
359
+ # @example Request syntax with placeholder values
360
+ #
361
+ # resp = client.create_alert_manager_definition({
362
+ # client_token: "IdempotencyToken",
363
+ # data: "data", # required
364
+ # workspace_id: "WorkspaceId", # required
365
+ # })
366
+ #
367
+ # @example Response structure
368
+ #
369
+ # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
370
+ # resp.status.status_reason #=> String
371
+ #
372
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateAlertManagerDefinition AWS API Documentation
373
+ #
374
+ # @overload create_alert_manager_definition(params = {})
375
+ # @param [Hash] params ({})
376
+ def create_alert_manager_definition(params = {}, options = {})
377
+ req = build_request(:create_alert_manager_definition, params)
378
+ req.send_request(options)
379
+ end
380
+
381
+ # Create a rule group namespace.
382
+ #
383
+ # @option params [String] :client_token
384
+ # Optional, unique, case-sensitive, user-provided identifier to ensure
385
+ # the idempotency of the request.
386
+ #
387
+ # **A suitable default value is auto-generated.** You should normally
388
+ # not need to pass this option.**
389
+ #
390
+ # @option params [required, String, StringIO, File] :data
391
+ # The namespace data that define the rule groups.
392
+ #
393
+ # @option params [required, String] :name
394
+ # The rule groups namespace name.
395
+ #
396
+ # @option params [Hash<String,String>] :tags
397
+ # Optional, user-provided tags for this rule groups namespace.
398
+ #
399
+ # @option params [required, String] :workspace_id
400
+ # The ID of the workspace in which to create the rule group namespace.
401
+ #
402
+ # @return [Types::CreateRuleGroupsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
403
+ #
404
+ # * {Types::CreateRuleGroupsNamespaceResponse#arn #arn} => String
405
+ # * {Types::CreateRuleGroupsNamespaceResponse#name #name} => String
406
+ # * {Types::CreateRuleGroupsNamespaceResponse#status #status} => Types::RuleGroupsNamespaceStatus
407
+ # * {Types::CreateRuleGroupsNamespaceResponse#tags #tags} => Hash&lt;String,String&gt;
408
+ #
409
+ # @example Request syntax with placeholder values
410
+ #
411
+ # resp = client.create_rule_groups_namespace({
412
+ # client_token: "IdempotencyToken",
413
+ # data: "data", # required
414
+ # name: "RuleGroupsNamespaceName", # required
415
+ # tags: {
416
+ # "TagKey" => "TagValue",
417
+ # },
418
+ # workspace_id: "WorkspaceId", # required
419
+ # })
420
+ #
421
+ # @example Response structure
422
+ #
423
+ # resp.arn #=> String
424
+ # resp.name #=> String
425
+ # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
426
+ # resp.status.status_reason #=> String
427
+ # resp.tags #=> Hash
428
+ # resp.tags["TagKey"] #=> String
429
+ #
430
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateRuleGroupsNamespace AWS API Documentation
431
+ #
432
+ # @overload create_rule_groups_namespace(params = {})
433
+ # @param [Hash] params ({})
434
+ def create_rule_groups_namespace(params = {}, options = {})
435
+ req = build_request(:create_rule_groups_namespace, params)
436
+ req.send_request(options)
437
+ end
438
+
330
439
  # Creates a new AMP workspace.
331
440
  #
332
441
  # @option params [String] :alias
@@ -340,10 +449,14 @@ module Aws::PrometheusService
340
449
  # **A suitable default value is auto-generated.** You should normally
341
450
  # not need to pass this option.**
342
451
  #
452
+ # @option params [Hash<String,String>] :tags
453
+ # Optional, user-provided tags for this workspace.
454
+ #
343
455
  # @return [Types::CreateWorkspaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
344
456
  #
345
457
  # * {Types::CreateWorkspaceResponse#arn #arn} => String
346
458
  # * {Types::CreateWorkspaceResponse#status #status} => Types::WorkspaceStatus
459
+ # * {Types::CreateWorkspaceResponse#tags #tags} => Hash&lt;String,String&gt;
347
460
  # * {Types::CreateWorkspaceResponse#workspace_id #workspace_id} => String
348
461
  #
349
462
  # @example Request syntax with placeholder values
@@ -351,12 +464,17 @@ module Aws::PrometheusService
351
464
  # resp = client.create_workspace({
352
465
  # alias: "WorkspaceAlias",
353
466
  # client_token: "IdempotencyToken",
467
+ # tags: {
468
+ # "TagKey" => "TagValue",
469
+ # },
354
470
  # })
355
471
  #
356
472
  # @example Response structure
357
473
  #
358
474
  # resp.arn #=> String
359
475
  # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED"
476
+ # resp.tags #=> Hash
477
+ # resp.tags["TagKey"] #=> String
360
478
  # resp.workspace_id #=> String
361
479
  #
362
480
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateWorkspace AWS API Documentation
@@ -368,6 +486,71 @@ module Aws::PrometheusService
368
486
  req.send_request(options)
369
487
  end
370
488
 
489
+ # Deletes an alert manager definition.
490
+ #
491
+ # @option params [String] :client_token
492
+ # Optional, unique, case-sensitive, user-provided identifier to ensure
493
+ # the idempotency of the request.
494
+ #
495
+ # **A suitable default value is auto-generated.** You should normally
496
+ # not need to pass this option.**
497
+ #
498
+ # @option params [required, String] :workspace_id
499
+ # The ID of the workspace in which to delete the alert manager
500
+ # definition.
501
+ #
502
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
503
+ #
504
+ # @example Request syntax with placeholder values
505
+ #
506
+ # resp = client.delete_alert_manager_definition({
507
+ # client_token: "IdempotencyToken",
508
+ # workspace_id: "WorkspaceId", # required
509
+ # })
510
+ #
511
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteAlertManagerDefinition AWS API Documentation
512
+ #
513
+ # @overload delete_alert_manager_definition(params = {})
514
+ # @param [Hash] params ({})
515
+ def delete_alert_manager_definition(params = {}, options = {})
516
+ req = build_request(:delete_alert_manager_definition, params)
517
+ req.send_request(options)
518
+ end
519
+
520
+ # Delete a rule groups namespace.
521
+ #
522
+ # @option params [String] :client_token
523
+ # Optional, unique, case-sensitive, user-provided identifier to ensure
524
+ # the idempotency of the request.
525
+ #
526
+ # **A suitable default value is auto-generated.** You should normally
527
+ # not need to pass this option.**
528
+ #
529
+ # @option params [required, String] :name
530
+ # The rule groups namespace name.
531
+ #
532
+ # @option params [required, String] :workspace_id
533
+ # The ID of the workspace to delete rule group definition.
534
+ #
535
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
536
+ #
537
+ # @example Request syntax with placeholder values
538
+ #
539
+ # resp = client.delete_rule_groups_namespace({
540
+ # client_token: "IdempotencyToken",
541
+ # name: "RuleGroupsNamespaceName", # required
542
+ # workspace_id: "WorkspaceId", # required
543
+ # })
544
+ #
545
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteRuleGroupsNamespace AWS API Documentation
546
+ #
547
+ # @overload delete_rule_groups_namespace(params = {})
548
+ # @param [Hash] params ({})
549
+ def delete_rule_groups_namespace(params = {}, options = {})
550
+ req = build_request(:delete_rule_groups_namespace, params)
551
+ req.send_request(options)
552
+ end
553
+
371
554
  # Deletes an AMP workspace.
372
555
  #
373
556
  # @option params [String] :client_token
@@ -398,6 +581,78 @@ module Aws::PrometheusService
398
581
  req.send_request(options)
399
582
  end
400
583
 
584
+ # Describes an alert manager definition.
585
+ #
586
+ # @option params [required, String] :workspace_id
587
+ # The ID of the workspace to describe.
588
+ #
589
+ # @return [Types::DescribeAlertManagerDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
590
+ #
591
+ # * {Types::DescribeAlertManagerDefinitionResponse#alert_manager_definition #alert_manager_definition} => Types::AlertManagerDefinitionDescription
592
+ #
593
+ # @example Request syntax with placeholder values
594
+ #
595
+ # resp = client.describe_alert_manager_definition({
596
+ # workspace_id: "WorkspaceId", # required
597
+ # })
598
+ #
599
+ # @example Response structure
600
+ #
601
+ # resp.alert_manager_definition.created_at #=> Time
602
+ # resp.alert_manager_definition.data #=> String
603
+ # resp.alert_manager_definition.modified_at #=> Time
604
+ # resp.alert_manager_definition.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
605
+ # resp.alert_manager_definition.status.status_reason #=> String
606
+ #
607
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeAlertManagerDefinition AWS API Documentation
608
+ #
609
+ # @overload describe_alert_manager_definition(params = {})
610
+ # @param [Hash] params ({})
611
+ def describe_alert_manager_definition(params = {}, options = {})
612
+ req = build_request(:describe_alert_manager_definition, params)
613
+ req.send_request(options)
614
+ end
615
+
616
+ # Describe a rule groups namespace.
617
+ #
618
+ # @option params [required, String] :name
619
+ # The rule groups namespace.
620
+ #
621
+ # @option params [required, String] :workspace_id
622
+ # The ID of the workspace to describe.
623
+ #
624
+ # @return [Types::DescribeRuleGroupsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
625
+ #
626
+ # * {Types::DescribeRuleGroupsNamespaceResponse#rule_groups_namespace #rule_groups_namespace} => Types::RuleGroupsNamespaceDescription
627
+ #
628
+ # @example Request syntax with placeholder values
629
+ #
630
+ # resp = client.describe_rule_groups_namespace({
631
+ # name: "RuleGroupsNamespaceName", # required
632
+ # workspace_id: "WorkspaceId", # required
633
+ # })
634
+ #
635
+ # @example Response structure
636
+ #
637
+ # resp.rule_groups_namespace.arn #=> String
638
+ # resp.rule_groups_namespace.created_at #=> Time
639
+ # resp.rule_groups_namespace.data #=> String
640
+ # resp.rule_groups_namespace.modified_at #=> Time
641
+ # resp.rule_groups_namespace.name #=> String
642
+ # resp.rule_groups_namespace.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
643
+ # resp.rule_groups_namespace.status.status_reason #=> String
644
+ # resp.rule_groups_namespace.tags #=> Hash
645
+ # resp.rule_groups_namespace.tags["TagKey"] #=> String
646
+ #
647
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeRuleGroupsNamespace AWS API Documentation
648
+ #
649
+ # @overload describe_rule_groups_namespace(params = {})
650
+ # @param [Hash] params ({})
651
+ def describe_rule_groups_namespace(params = {}, options = {})
652
+ req = build_request(:describe_rule_groups_namespace, params)
653
+ req.send_request(options)
654
+ end
655
+
401
656
  # Describes an existing AMP workspace.
402
657
  #
403
658
  # @option params [required, String] :workspace_id
@@ -420,8 +675,16 @@ module Aws::PrometheusService
420
675
  # resp.workspace.created_at #=> Time
421
676
  # resp.workspace.prometheus_endpoint #=> String
422
677
  # resp.workspace.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED"
678
+ # resp.workspace.tags #=> Hash
679
+ # resp.workspace.tags["TagKey"] #=> String
423
680
  # resp.workspace.workspace_id #=> String
424
681
  #
682
+ #
683
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
684
+ #
685
+ # * workspace_active
686
+ # * workspace_deleted
687
+ #
425
688
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeWorkspace AWS API Documentation
426
689
  #
427
690
  # @overload describe_workspace(params = {})
@@ -431,6 +694,90 @@ module Aws::PrometheusService
431
694
  req.send_request(options)
432
695
  end
433
696
 
697
+ # Lists rule groups namespaces.
698
+ #
699
+ # @option params [Integer] :max_results
700
+ # Maximum results to return in response (default=100, maximum=1000).
701
+ #
702
+ # @option params [String] :name
703
+ # Optional filter for rule groups namespace name. Only the rule groups
704
+ # namespace that begin with this value will be returned.
705
+ #
706
+ # @option params [String] :next_token
707
+ # Pagination token to request the next page in a paginated list. This
708
+ # token is obtained from the output of the previous
709
+ # ListRuleGroupsNamespaces request.
710
+ #
711
+ # @option params [required, String] :workspace_id
712
+ # The ID of the workspace.
713
+ #
714
+ # @return [Types::ListRuleGroupsNamespacesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
715
+ #
716
+ # * {Types::ListRuleGroupsNamespacesResponse#next_token #next_token} => String
717
+ # * {Types::ListRuleGroupsNamespacesResponse#rule_groups_namespaces #rule_groups_namespaces} => Array&lt;Types::RuleGroupsNamespaceSummary&gt;
718
+ #
719
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
720
+ #
721
+ # @example Request syntax with placeholder values
722
+ #
723
+ # resp = client.list_rule_groups_namespaces({
724
+ # max_results: 1,
725
+ # name: "RuleGroupsNamespaceName",
726
+ # next_token: "PaginationToken",
727
+ # workspace_id: "WorkspaceId", # required
728
+ # })
729
+ #
730
+ # @example Response structure
731
+ #
732
+ # resp.next_token #=> String
733
+ # resp.rule_groups_namespaces #=> Array
734
+ # resp.rule_groups_namespaces[0].arn #=> String
735
+ # resp.rule_groups_namespaces[0].created_at #=> Time
736
+ # resp.rule_groups_namespaces[0].modified_at #=> Time
737
+ # resp.rule_groups_namespaces[0].name #=> String
738
+ # resp.rule_groups_namespaces[0].status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
739
+ # resp.rule_groups_namespaces[0].status.status_reason #=> String
740
+ # resp.rule_groups_namespaces[0].tags #=> Hash
741
+ # resp.rule_groups_namespaces[0].tags["TagKey"] #=> String
742
+ #
743
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListRuleGroupsNamespaces AWS API Documentation
744
+ #
745
+ # @overload list_rule_groups_namespaces(params = {})
746
+ # @param [Hash] params ({})
747
+ def list_rule_groups_namespaces(params = {}, options = {})
748
+ req = build_request(:list_rule_groups_namespaces, params)
749
+ req.send_request(options)
750
+ end
751
+
752
+ # Lists the tags you have assigned to the resource.
753
+ #
754
+ # @option params [required, String] :resource_arn
755
+ # The ARN of the resource.
756
+ #
757
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
758
+ #
759
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Hash&lt;String,String&gt;
760
+ #
761
+ # @example Request syntax with placeholder values
762
+ #
763
+ # resp = client.list_tags_for_resource({
764
+ # resource_arn: "String", # required
765
+ # })
766
+ #
767
+ # @example Response structure
768
+ #
769
+ # resp.tags #=> Hash
770
+ # resp.tags["TagKey"] #=> String
771
+ #
772
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListTagsForResource AWS API Documentation
773
+ #
774
+ # @overload list_tags_for_resource(params = {})
775
+ # @param [Hash] params ({})
776
+ def list_tags_for_resource(params = {}, options = {})
777
+ req = build_request(:list_tags_for_resource, params)
778
+ req.send_request(options)
779
+ end
780
+
434
781
  # Lists all AMP workspaces, including workspaces being created or
435
782
  # deleted.
436
783
  #
@@ -469,6 +816,8 @@ module Aws::PrometheusService
469
816
  # resp.workspaces[0].arn #=> String
470
817
  # resp.workspaces[0].created_at #=> Time
471
818
  # resp.workspaces[0].status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED"
819
+ # resp.workspaces[0].tags #=> Hash
820
+ # resp.workspaces[0].tags["TagKey"] #=> String
472
821
  # resp.workspaces[0].workspace_id #=> String
473
822
  #
474
823
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListWorkspaces AWS API Documentation
@@ -480,6 +829,154 @@ module Aws::PrometheusService
480
829
  req.send_request(options)
481
830
  end
482
831
 
832
+ # Update an alert manager definition.
833
+ #
834
+ # @option params [String] :client_token
835
+ # Optional, unique, case-sensitive, user-provided identifier to ensure
836
+ # the idempotency of the request.
837
+ #
838
+ # **A suitable default value is auto-generated.** You should normally
839
+ # not need to pass this option.**
840
+ #
841
+ # @option params [required, String, StringIO, File] :data
842
+ # The alert manager definition data.
843
+ #
844
+ # @option params [required, String] :workspace_id
845
+ # The ID of the workspace in which to update the alert manager
846
+ # definition.
847
+ #
848
+ # @return [Types::PutAlertManagerDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
849
+ #
850
+ # * {Types::PutAlertManagerDefinitionResponse#status #status} => Types::AlertManagerDefinitionStatus
851
+ #
852
+ # @example Request syntax with placeholder values
853
+ #
854
+ # resp = client.put_alert_manager_definition({
855
+ # client_token: "IdempotencyToken",
856
+ # data: "data", # required
857
+ # workspace_id: "WorkspaceId", # required
858
+ # })
859
+ #
860
+ # @example Response structure
861
+ #
862
+ # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
863
+ # resp.status.status_reason #=> String
864
+ #
865
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/PutAlertManagerDefinition AWS API Documentation
866
+ #
867
+ # @overload put_alert_manager_definition(params = {})
868
+ # @param [Hash] params ({})
869
+ def put_alert_manager_definition(params = {}, options = {})
870
+ req = build_request(:put_alert_manager_definition, params)
871
+ req.send_request(options)
872
+ end
873
+
874
+ # Update a rule groups namespace.
875
+ #
876
+ # @option params [String] :client_token
877
+ # Optional, unique, case-sensitive, user-provided identifier to ensure
878
+ # the idempotency of the request.
879
+ #
880
+ # **A suitable default value is auto-generated.** You should normally
881
+ # not need to pass this option.**
882
+ #
883
+ # @option params [required, String, StringIO, File] :data
884
+ # The namespace data that define the rule groups.
885
+ #
886
+ # @option params [required, String] :name
887
+ # The rule groups namespace name.
888
+ #
889
+ # @option params [required, String] :workspace_id
890
+ # The ID of the workspace in which to update the rule group namespace.
891
+ #
892
+ # @return [Types::PutRuleGroupsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
893
+ #
894
+ # * {Types::PutRuleGroupsNamespaceResponse#arn #arn} => String
895
+ # * {Types::PutRuleGroupsNamespaceResponse#name #name} => String
896
+ # * {Types::PutRuleGroupsNamespaceResponse#status #status} => Types::RuleGroupsNamespaceStatus
897
+ # * {Types::PutRuleGroupsNamespaceResponse#tags #tags} => Hash&lt;String,String&gt;
898
+ #
899
+ # @example Request syntax with placeholder values
900
+ #
901
+ # resp = client.put_rule_groups_namespace({
902
+ # client_token: "IdempotencyToken",
903
+ # data: "data", # required
904
+ # name: "RuleGroupsNamespaceName", # required
905
+ # workspace_id: "WorkspaceId", # required
906
+ # })
907
+ #
908
+ # @example Response structure
909
+ #
910
+ # resp.arn #=> String
911
+ # resp.name #=> String
912
+ # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
913
+ # resp.status.status_reason #=> String
914
+ # resp.tags #=> Hash
915
+ # resp.tags["TagKey"] #=> String
916
+ #
917
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/PutRuleGroupsNamespace AWS API Documentation
918
+ #
919
+ # @overload put_rule_groups_namespace(params = {})
920
+ # @param [Hash] params ({})
921
+ def put_rule_groups_namespace(params = {}, options = {})
922
+ req = build_request(:put_rule_groups_namespace, params)
923
+ req.send_request(options)
924
+ end
925
+
926
+ # Creates tags for the specified resource.
927
+ #
928
+ # @option params [required, String] :resource_arn
929
+ # The ARN of the resource.
930
+ #
931
+ # @option params [required, Hash<String,String>] :tags
932
+ # The list of tags assigned to the resource.
933
+ #
934
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
935
+ #
936
+ # @example Request syntax with placeholder values
937
+ #
938
+ # resp = client.tag_resource({
939
+ # resource_arn: "String", # required
940
+ # tags: { # required
941
+ # "TagKey" => "TagValue",
942
+ # },
943
+ # })
944
+ #
945
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/TagResource AWS API Documentation
946
+ #
947
+ # @overload tag_resource(params = {})
948
+ # @param [Hash] params ({})
949
+ def tag_resource(params = {}, options = {})
950
+ req = build_request(:tag_resource, params)
951
+ req.send_request(options)
952
+ end
953
+
954
+ # Deletes tags from the specified resource.
955
+ #
956
+ # @option params [required, String] :resource_arn
957
+ # The ARN of the resource.
958
+ #
959
+ # @option params [required, Array<String>] :tag_keys
960
+ # One or more tag keys
961
+ #
962
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
963
+ #
964
+ # @example Request syntax with placeholder values
965
+ #
966
+ # resp = client.untag_resource({
967
+ # resource_arn: "String", # required
968
+ # tag_keys: ["TagKey"], # required
969
+ # })
970
+ #
971
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/UntagResource AWS API Documentation
972
+ #
973
+ # @overload untag_resource(params = {})
974
+ # @param [Hash] params ({})
975
+ def untag_resource(params = {}, options = {})
976
+ req = build_request(:untag_resource, params)
977
+ req.send_request(options)
978
+ end
979
+
483
980
  # Updates an AMP workspace alias.
484
981
  #
485
982
  # @option params [String] :alias
@@ -527,14 +1024,129 @@ module Aws::PrometheusService
527
1024
  params: params,
528
1025
  config: config)
529
1026
  context[:gem_name] = 'aws-sdk-prometheusservice'
530
- context[:gem_version] = '1.6.0'
1027
+ context[:gem_version] = '1.10.0'
531
1028
  Seahorse::Client::Request.new(handlers, context)
532
1029
  end
533
1030
 
1031
+ # Polls an API operation until a resource enters a desired state.
1032
+ #
1033
+ # ## Basic Usage
1034
+ #
1035
+ # A waiter will call an API operation until:
1036
+ #
1037
+ # * It is successful
1038
+ # * It enters a terminal state
1039
+ # * It makes the maximum number of attempts
1040
+ #
1041
+ # In between attempts, the waiter will sleep.
1042
+ #
1043
+ # # polls in a loop, sleeping between attempts
1044
+ # client.wait_until(waiter_name, params)
1045
+ #
1046
+ # ## Configuration
1047
+ #
1048
+ # You can configure the maximum number of polling attempts, and the
1049
+ # delay (in seconds) between each polling attempt. You can pass
1050
+ # configuration as the final arguments hash.
1051
+ #
1052
+ # # poll for ~25 seconds
1053
+ # client.wait_until(waiter_name, params, {
1054
+ # max_attempts: 5,
1055
+ # delay: 5,
1056
+ # })
1057
+ #
1058
+ # ## Callbacks
1059
+ #
1060
+ # You can be notified before each polling attempt and before each
1061
+ # delay. If you throw `:success` or `:failure` from these callbacks,
1062
+ # it will terminate the waiter.
1063
+ #
1064
+ # started_at = Time.now
1065
+ # client.wait_until(waiter_name, params, {
1066
+ #
1067
+ # # disable max attempts
1068
+ # max_attempts: nil,
1069
+ #
1070
+ # # poll for 1 hour, instead of a number of attempts
1071
+ # before_wait: -> (attempts, response) do
1072
+ # throw :failure if Time.now - started_at > 3600
1073
+ # end
1074
+ # })
1075
+ #
1076
+ # ## Handling Errors
1077
+ #
1078
+ # When a waiter is unsuccessful, it will raise an error.
1079
+ # All of the failure errors extend from
1080
+ # {Aws::Waiters::Errors::WaiterFailed}.
1081
+ #
1082
+ # begin
1083
+ # client.wait_until(...)
1084
+ # rescue Aws::Waiters::Errors::WaiterFailed
1085
+ # # resource did not enter the desired state in time
1086
+ # end
1087
+ #
1088
+ # ## Valid Waiters
1089
+ #
1090
+ # The following table lists the valid waiter names, the operations they call,
1091
+ # and the default `:delay` and `:max_attempts` values.
1092
+ #
1093
+ # | waiter_name | params | :delay | :max_attempts |
1094
+ # | ----------------- | --------------------------- | -------- | ------------- |
1095
+ # | workspace_active | {Client#describe_workspace} | 2 | 60 |
1096
+ # | workspace_deleted | {Client#describe_workspace} | 2 | 60 |
1097
+ #
1098
+ # @raise [Errors::FailureStateError] Raised when the waiter terminates
1099
+ # because the waiter has entered a state that it will not transition
1100
+ # out of, preventing success.
1101
+ #
1102
+ # @raise [Errors::TooManyAttemptsError] Raised when the configured
1103
+ # maximum number of attempts have been made, and the waiter is not
1104
+ # yet successful.
1105
+ #
1106
+ # @raise [Errors::UnexpectedError] Raised when an error is encounted
1107
+ # while polling for a resource that is not expected.
1108
+ #
1109
+ # @raise [Errors::NoSuchWaiterError] Raised when you request to wait
1110
+ # for an unknown state.
1111
+ #
1112
+ # @return [Boolean] Returns `true` if the waiter was successful.
1113
+ # @param [Symbol] waiter_name
1114
+ # @param [Hash] params ({})
1115
+ # @param [Hash] options ({})
1116
+ # @option options [Integer] :max_attempts
1117
+ # @option options [Integer] :delay
1118
+ # @option options [Proc] :before_attempt
1119
+ # @option options [Proc] :before_wait
1120
+ def wait_until(waiter_name, params = {}, options = {})
1121
+ w = waiter(waiter_name, options)
1122
+ yield(w.waiter) if block_given? # deprecated
1123
+ w.wait(params)
1124
+ end
1125
+
534
1126
  # @api private
535
1127
  # @deprecated
536
1128
  def waiter_names
537
- []
1129
+ waiters.keys
1130
+ end
1131
+
1132
+ private
1133
+
1134
+ # @param [Symbol] waiter_name
1135
+ # @param [Hash] options ({})
1136
+ def waiter(waiter_name, options = {})
1137
+ waiter_class = waiters[waiter_name]
1138
+ if waiter_class
1139
+ waiter_class.new(options.merge(client: self))
1140
+ else
1141
+ raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
1142
+ end
1143
+ end
1144
+
1145
+ def waiters
1146
+ {
1147
+ workspace_active: Waiters::WorkspaceActive,
1148
+ workspace_deleted: Waiters::WorkspaceDeleted
1149
+ }
538
1150
  end
539
1151
 
540
1152
  class << self