aws-sdk-prometheusservice 1.56.0 → 1.57.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.
@@ -481,12 +481,8 @@ module Aws::PrometheusService
481
481
  # definition, don't use this operation to update it. Instead, use
482
482
  # `PutAlertManagerDefinition`.
483
483
  #
484
- # @option params [String] :client_token
485
- # A unique identifier that you can provide to ensure the idempotency of
486
- # the request. Case-sensitive.
487
- #
488
- # **A suitable default value is auto-generated.** You should normally
489
- # not need to pass this option.**
484
+ # @option params [required, String] :workspace_id
485
+ # The ID of the workspace to add the alert manager definition to.
490
486
  #
491
487
  # @option params [required, String, StringIO, File] :data
492
488
  # The alert manager definition to add. A base64-encoded version of the
@@ -499,8 +495,12 @@ module Aws::PrometheusService
499
495
  #
500
496
  # [1]: https://docs.aws.amazon.com/prometheus/latest/APIReference/yaml-AlertManagerDefinitionData.html
501
497
  #
502
- # @option params [required, String] :workspace_id
503
- # The ID of the workspace to add the alert manager definition to.
498
+ # @option params [String] :client_token
499
+ # A unique identifier that you can provide to ensure the idempotency of
500
+ # the request. Case-sensitive.
501
+ #
502
+ # **A suitable default value is auto-generated.** You should normally
503
+ # not need to pass this option.**
504
504
  #
505
505
  # @return [Types::CreateAlertManagerDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
506
506
  #
@@ -509,9 +509,9 @@ module Aws::PrometheusService
509
509
  # @example Request syntax with placeholder values
510
510
  #
511
511
  # resp = client.create_alert_manager_definition({
512
- # client_token: "IdempotencyToken",
513
- # data: "data", # required
514
512
  # workspace_id: "WorkspaceId", # required
513
+ # data: "data", # required
514
+ # client_token: "IdempotencyToken",
515
515
  # })
516
516
  #
517
517
  # @example Response structure
@@ -536,20 +536,20 @@ module Aws::PrometheusService
536
536
  #
537
537
  # </note>
538
538
  #
539
- # @option params [String] :client_token
540
- # A unique identifier that you can provide to ensure the idempotency of
541
- # the request. Case-sensitive.
542
- #
543
- # **A suitable default value is auto-generated.** You should normally
544
- # not need to pass this option.**
539
+ # @option params [required, String] :workspace_id
540
+ # The ID of the workspace to create the logging configuration for.
545
541
  #
546
542
  # @option params [required, String] :log_group_arn
547
543
  # The ARN of the CloudWatch log group to which the vended log data will
548
544
  # be published. This log group must exist prior to calling this
549
545
  # operation.
550
546
  #
551
- # @option params [required, String] :workspace_id
552
- # The ID of the workspace to create the logging configuration for.
547
+ # @option params [String] :client_token
548
+ # A unique identifier that you can provide to ensure the idempotency of
549
+ # the request. Case-sensitive.
550
+ #
551
+ # **A suitable default value is auto-generated.** You should normally
552
+ # not need to pass this option.**
553
553
  #
554
554
  # @return [Types::CreateLoggingConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
555
555
  #
@@ -558,9 +558,9 @@ module Aws::PrometheusService
558
558
  # @example Request syntax with placeholder values
559
559
  #
560
560
  # resp = client.create_logging_configuration({
561
- # client_token: "IdempotencyToken",
562
- # log_group_arn: "LogGroupArn", # required
563
561
  # workspace_id: "WorkspaceId", # required
562
+ # log_group_arn: "LogGroupArn", # required
563
+ # client_token: "IdempotencyToken",
564
564
  # })
565
565
  #
566
566
  # @example Response structure
@@ -581,6 +581,14 @@ module Aws::PrometheusService
581
581
  # This operation enables logging of queries that exceed the specified
582
582
  # QSP threshold.
583
583
  #
584
+ # @option params [required, String] :workspace_id
585
+ # The ID of the workspace for which to create the query logging
586
+ # configuration.
587
+ #
588
+ # @option params [required, Array<Types::LoggingDestination>] :destinations
589
+ # The destinations where query logs will be sent. Only CloudWatch Logs
590
+ # destination is supported. The list must contain exactly one element.
591
+ #
584
592
  # @option params [String] :client_token
585
593
  # (Optional) A unique, case-sensitive identifier that you can provide to
586
594
  # ensure the idempotency of the request.
@@ -588,14 +596,6 @@ module Aws::PrometheusService
588
596
  # **A suitable default value is auto-generated.** You should normally
589
597
  # not need to pass this option.**
590
598
  #
591
- # @option params [required, Array<Types::LoggingDestination>] :destinations
592
- # The destinations where query logs will be sent. Only CloudWatch Logs
593
- # destination is supported. The list must contain exactly one element.
594
- #
595
- # @option params [required, String] :workspace_id
596
- # The ID of the workspace for which to create the query logging
597
- # configuration.
598
- #
599
599
  # @return [Types::CreateQueryLoggingConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
600
600
  #
601
601
  # * {Types::CreateQueryLoggingConfigurationResponse#status #status} => Types::QueryLoggingConfigurationStatus
@@ -603,7 +603,7 @@ module Aws::PrometheusService
603
603
  # @example Request syntax with placeholder values
604
604
  #
605
605
  # resp = client.create_query_logging_configuration({
606
- # client_token: "IdempotencyToken",
606
+ # workspace_id: "WorkspaceId", # required
607
607
  # destinations: [ # required
608
608
  # {
609
609
  # cloud_watch_logs: { # required
@@ -614,7 +614,7 @@ module Aws::PrometheusService
614
614
  # },
615
615
  # },
616
616
  # ],
617
- # workspace_id: "WorkspaceId", # required
617
+ # client_token: "IdempotencyToken",
618
618
  # })
619
619
  #
620
620
  # @example Response structure
@@ -640,12 +640,11 @@ module Aws::PrometheusService
640
640
  # update an existing rule groups namespace, use
641
641
  # `PutRuleGroupsNamespace`.
642
642
  #
643
- # @option params [String] :client_token
644
- # A unique identifier that you can provide to ensure the idempotency of
645
- # the request. Case-sensitive.
643
+ # @option params [required, String] :workspace_id
644
+ # The ID of the workspace to add the rule groups namespace.
646
645
  #
647
- # **A suitable default value is auto-generated.** You should normally
648
- # not need to pass this option.**
646
+ # @option params [required, String] :name
647
+ # The name for the new rule groups namespace.
649
648
  #
650
649
  # @option params [required, String, StringIO, File] :data
651
650
  # The rules file to use in the new namespace.
@@ -659,39 +658,40 @@ module Aws::PrometheusService
659
658
  #
660
659
  # [1]: https://docs.aws.amazon.com/prometheus/latest/APIReference/yaml-RuleGroupsNamespaceData.html
661
660
  #
662
- # @option params [required, String] :name
663
- # The name for the new rule groups namespace.
661
+ # @option params [String] :client_token
662
+ # A unique identifier that you can provide to ensure the idempotency of
663
+ # the request. Case-sensitive.
664
+ #
665
+ # **A suitable default value is auto-generated.** You should normally
666
+ # not need to pass this option.**
664
667
  #
665
668
  # @option params [Hash<String,String>] :tags
666
669
  # The list of tag keys and values to associate with the rule groups
667
670
  # namespace.
668
671
  #
669
- # @option params [required, String] :workspace_id
670
- # The ID of the workspace to add the rule groups namespace.
671
- #
672
672
  # @return [Types::CreateRuleGroupsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
673
673
  #
674
- # * {Types::CreateRuleGroupsNamespaceResponse#arn #arn} => String
675
674
  # * {Types::CreateRuleGroupsNamespaceResponse#name #name} => String
675
+ # * {Types::CreateRuleGroupsNamespaceResponse#arn #arn} => String
676
676
  # * {Types::CreateRuleGroupsNamespaceResponse#status #status} => Types::RuleGroupsNamespaceStatus
677
677
  # * {Types::CreateRuleGroupsNamespaceResponse#tags #tags} => Hash&lt;String,String&gt;
678
678
  #
679
679
  # @example Request syntax with placeholder values
680
680
  #
681
681
  # resp = client.create_rule_groups_namespace({
682
- # client_token: "IdempotencyToken",
683
- # data: "data", # required
682
+ # workspace_id: "WorkspaceId", # required
684
683
  # name: "RuleGroupsNamespaceName", # required
684
+ # data: "data", # required
685
+ # client_token: "IdempotencyToken",
685
686
  # tags: {
686
687
  # "TagKey" => "TagValue",
687
688
  # },
688
- # workspace_id: "WorkspaceId", # required
689
689
  # })
690
690
  #
691
691
  # @example Response structure
692
692
  #
693
- # resp.arn #=> String
694
693
  # resp.name #=> String
694
+ # resp.arn #=> String
695
695
  # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
696
696
  # resp.status.status_reason #=> String
697
697
  # resp.tags #=> Hash
@@ -744,21 +744,6 @@ module Aws::PrometheusService
744
744
  # (optional) An alias to associate with the scraper. This is for your
745
745
  # use, and does not need to be unique.
746
746
  #
747
- # @option params [String] :client_token
748
- # (Optional) A unique, case-sensitive identifier that you can provide to
749
- # ensure the idempotency of the request.
750
- #
751
- # **A suitable default value is auto-generated.** You should normally
752
- # not need to pass this option.**
753
- #
754
- # @option params [required, Types::Destination] :destination
755
- # The Amazon Managed Service for Prometheus workspace to send metrics
756
- # to.
757
- #
758
- # @option params [Types::RoleConfiguration] :role_configuration
759
- # Use this structure to enable cross-account access, so that you can use
760
- # a target account to access Prometheus metrics from source accounts.
761
- #
762
747
  # @option params [required, Types::ScrapeConfiguration] :scrape_configuration
763
748
  # The configuration file to use in the new scraper. For more
764
749
  # information, see [Scraper configuration][1] in the *Amazon Managed
@@ -771,31 +756,78 @@ module Aws::PrometheusService
771
756
  # @option params [required, Types::Source] :source
772
757
  # The Amazon EKS cluster from which the scraper will collect metrics.
773
758
  #
759
+ # @option params [required, Types::Destination] :destination
760
+ # The Amazon Managed Service for Prometheus workspace to send metrics
761
+ # to.
762
+ #
763
+ # @option params [Types::RoleConfiguration] :role_configuration
764
+ # Use this structure to enable cross-account access, so that you can use
765
+ # a target account to access Prometheus metrics from source accounts.
766
+ #
767
+ # @option params [String] :client_token
768
+ # (Optional) A unique, case-sensitive identifier that you can provide to
769
+ # ensure the idempotency of the request.
770
+ #
771
+ # **A suitable default value is auto-generated.** You should normally
772
+ # not need to pass this option.**
773
+ #
774
774
  # @option params [Hash<String,String>] :tags
775
775
  # (Optional) The list of tag keys and values to associate with the
776
776
  # scraper.
777
777
  #
778
778
  # @return [Types::CreateScraperResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
779
779
  #
780
- # * {Types::CreateScraperResponse#arn #arn} => String
781
780
  # * {Types::CreateScraperResponse#scraper_id #scraper_id} => String
781
+ # * {Types::CreateScraperResponse#arn #arn} => String
782
782
  # * {Types::CreateScraperResponse#status #status} => Types::ScraperStatus
783
783
  # * {Types::CreateScraperResponse#tags #tags} => Hash&lt;String,String&gt;
784
784
  #
785
+ #
786
+ # @example Example: CreateScraper with optional alias input, optional clientToken input, and one set of tags
787
+ #
788
+ # resp = client.create_scraper({
789
+ # alias: "alias",
790
+ # client_token: "token",
791
+ # destination: {
792
+ # amp_configuration: {
793
+ # workspace_arn: "arn:aws:aps:us-west-2:123456789012:workspace/ws-ogh2u499-ce12-hg89-v6c7-123412341234",
794
+ # },
795
+ # },
796
+ # scrape_configuration: {
797
+ # configuration_blob: "blob",
798
+ # },
799
+ # source: {
800
+ # eks_configuration: {
801
+ # cluster_arn: "arn:aws:eks:us-west-2:123456789012:cluster/example",
802
+ # security_group_ids: [
803
+ # "sg-abc123",
804
+ # ],
805
+ # subnet_ids: [
806
+ # "subnet-abc123",
807
+ # ],
808
+ # },
809
+ # },
810
+ # tags: {
811
+ # "exampleTag" => "exampleValue",
812
+ # },
813
+ # })
814
+ #
815
+ # resp.to_h outputs the following:
816
+ # {
817
+ # arn: "arn:aws:aps:us-west-2:123456789012:scraper/scraper-123",
818
+ # scraper_id: "scraper-123",
819
+ # status: {
820
+ # status_code: "CREATING",
821
+ # },
822
+ # tags: {
823
+ # "exampleTag" => "exampleValue",
824
+ # },
825
+ # }
826
+ #
785
827
  # @example Request syntax with placeholder values
786
828
  #
787
829
  # resp = client.create_scraper({
788
830
  # alias: "ScraperAlias",
789
- # client_token: "IdempotencyToken",
790
- # destination: { # required
791
- # amp_configuration: {
792
- # workspace_arn: "WorkspaceArn", # required
793
- # },
794
- # },
795
- # role_configuration: {
796
- # source_role_arn: "IamRoleArn",
797
- # target_role_arn: "IamRoleArn",
798
- # },
799
831
  # scrape_configuration: { # required
800
832
  # configuration_blob: "data",
801
833
  # },
@@ -806,6 +838,16 @@ module Aws::PrometheusService
806
838
  # subnet_ids: ["SubnetId"], # required
807
839
  # },
808
840
  # },
841
+ # destination: { # required
842
+ # amp_configuration: {
843
+ # workspace_arn: "WorkspaceArn", # required
844
+ # },
845
+ # },
846
+ # role_configuration: {
847
+ # source_role_arn: "IamRoleArn",
848
+ # target_role_arn: "IamRoleArn",
849
+ # },
850
+ # client_token: "IdempotencyToken",
809
851
  # tags: {
810
852
  # "TagKey" => "TagValue",
811
853
  # },
@@ -813,8 +855,8 @@ module Aws::PrometheusService
813
855
  #
814
856
  # @example Response structure
815
857
  #
816
- # resp.arn #=> String
817
858
  # resp.scraper_id #=> String
859
+ # resp.arn #=> String
818
860
  # resp.status.status_code #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
819
861
  # resp.tags #=> Hash
820
862
  # resp.tags["TagKey"] #=> String
@@ -846,6 +888,9 @@ module Aws::PrometheusService
846
888
  # **A suitable default value is auto-generated.** You should normally
847
889
  # not need to pass this option.**
848
890
  #
891
+ # @option params [Hash<String,String>] :tags
892
+ # The list of tag keys and values to associate with the workspace.
893
+ #
849
894
  # @option params [String] :kms_key_arn
850
895
  # (optional) The ARN for a customer managed KMS key to use for
851
896
  # encrypting data within your workspace. For more information about
@@ -856,36 +901,33 @@ module Aws::PrometheusService
856
901
  #
857
902
  # [1]: https://docs.aws.amazon.com/prometheus/latest/userguide/encryption-at-rest-Amazon-Service-Prometheus.html
858
903
  #
859
- # @option params [Hash<String,String>] :tags
860
- # The list of tag keys and values to associate with the workspace.
861
- #
862
904
  # @return [Types::CreateWorkspaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
863
905
  #
906
+ # * {Types::CreateWorkspaceResponse#workspace_id #workspace_id} => String
864
907
  # * {Types::CreateWorkspaceResponse#arn #arn} => String
865
- # * {Types::CreateWorkspaceResponse#kms_key_arn #kms_key_arn} => String
866
908
  # * {Types::CreateWorkspaceResponse#status #status} => Types::WorkspaceStatus
867
909
  # * {Types::CreateWorkspaceResponse#tags #tags} => Hash&lt;String,String&gt;
868
- # * {Types::CreateWorkspaceResponse#workspace_id #workspace_id} => String
910
+ # * {Types::CreateWorkspaceResponse#kms_key_arn #kms_key_arn} => String
869
911
  #
870
912
  # @example Request syntax with placeholder values
871
913
  #
872
914
  # resp = client.create_workspace({
873
915
  # alias: "WorkspaceAlias",
874
916
  # client_token: "IdempotencyToken",
875
- # kms_key_arn: "KmsKeyArn",
876
917
  # tags: {
877
918
  # "TagKey" => "TagValue",
878
919
  # },
920
+ # kms_key_arn: "KmsKeyArn",
879
921
  # })
880
922
  #
881
923
  # @example Response structure
882
924
  #
925
+ # resp.workspace_id #=> String
883
926
  # resp.arn #=> String
884
- # resp.kms_key_arn #=> String
885
927
  # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED"
886
928
  # resp.tags #=> Hash
887
929
  # resp.tags["TagKey"] #=> String
888
- # resp.workspace_id #=> String
930
+ # resp.kms_key_arn #=> String
889
931
  #
890
932
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateWorkspace AWS API Documentation
891
933
  #
@@ -898,6 +940,9 @@ module Aws::PrometheusService
898
940
 
899
941
  # Deletes the alert manager definition from a workspace.
900
942
  #
943
+ # @option params [required, String] :workspace_id
944
+ # The ID of the workspace to delete the alert manager definition from.
945
+ #
901
946
  # @option params [String] :client_token
902
947
  # A unique identifier that you can provide to ensure the idempotency of
903
948
  # the request. Case-sensitive.
@@ -905,16 +950,13 @@ module Aws::PrometheusService
905
950
  # **A suitable default value is auto-generated.** You should normally
906
951
  # not need to pass this option.**
907
952
  #
908
- # @option params [required, String] :workspace_id
909
- # The ID of the workspace to delete the alert manager definition from.
910
- #
911
953
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
912
954
  #
913
955
  # @example Request syntax with placeholder values
914
956
  #
915
957
  # resp = client.delete_alert_manager_definition({
916
- # client_token: "IdempotencyToken",
917
958
  # workspace_id: "WorkspaceId", # required
959
+ # client_token: "IdempotencyToken",
918
960
  # })
919
961
  #
920
962
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteAlertManagerDefinition AWS API Documentation
@@ -932,6 +974,10 @@ module Aws::PrometheusService
932
974
  #
933
975
  # </note>
934
976
  #
977
+ # @option params [required, String] :workspace_id
978
+ # The ID of the workspace containing the logging configuration to
979
+ # delete.
980
+ #
935
981
  # @option params [String] :client_token
936
982
  # A unique identifier that you can provide to ensure the idempotency of
937
983
  # the request. Case-sensitive.
@@ -939,17 +985,13 @@ module Aws::PrometheusService
939
985
  # **A suitable default value is auto-generated.** You should normally
940
986
  # not need to pass this option.**
941
987
  #
942
- # @option params [required, String] :workspace_id
943
- # The ID of the workspace containing the logging configuration to
944
- # delete.
945
- #
946
988
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
947
989
  #
948
990
  # @example Request syntax with placeholder values
949
991
  #
950
992
  # resp = client.delete_logging_configuration({
951
- # client_token: "IdempotencyToken",
952
993
  # workspace_id: "WorkspaceId", # required
994
+ # client_token: "IdempotencyToken",
953
995
  # })
954
996
  #
955
997
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteLoggingConfiguration AWS API Documentation
@@ -963,6 +1005,10 @@ module Aws::PrometheusService
963
1005
 
964
1006
  # Deletes the query logging configuration for the specified workspace.
965
1007
  #
1008
+ # @option params [required, String] :workspace_id
1009
+ # The ID of the workspace from which to delete the query logging
1010
+ # configuration.
1011
+ #
966
1012
  # @option params [String] :client_token
967
1013
  # (Optional) A unique, case-sensitive identifier that you can provide to
968
1014
  # ensure the idempotency of the request.
@@ -970,17 +1016,13 @@ module Aws::PrometheusService
970
1016
  # **A suitable default value is auto-generated.** You should normally
971
1017
  # not need to pass this option.**
972
1018
  #
973
- # @option params [required, String] :workspace_id
974
- # The ID of the workspace from which to delete the query logging
975
- # configuration.
976
- #
977
1019
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
978
1020
  #
979
1021
  # @example Request syntax with placeholder values
980
1022
  #
981
1023
  # resp = client.delete_query_logging_configuration({
982
- # client_token: "IdempotencyToken",
983
1024
  # workspace_id: "WorkspaceId", # required
1025
+ # client_token: "IdempotencyToken",
984
1026
  # })
985
1027
  #
986
1028
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteQueryLoggingConfiguration AWS API Documentation
@@ -992,31 +1034,68 @@ module Aws::PrometheusService
992
1034
  req.send_request(options)
993
1035
  end
994
1036
 
995
- # Deletes one rule groups namespace and its associated rule groups
996
- # definition.
1037
+ # Deletes the resource-based policy attached to an Amazon Managed
1038
+ # Service for Prometheus workspace.
1039
+ #
1040
+ # @option params [required, String] :workspace_id
1041
+ # The ID of the workspace from which to delete the resource-based
1042
+ # policy.
997
1043
  #
998
1044
  # @option params [String] :client_token
999
- # A unique identifier that you can provide to ensure the idempotency of
1000
- # the request. Case-sensitive.
1045
+ # A unique, case-sensitive identifier that you provide to ensure the
1046
+ # request is safe to retry (idempotent).
1001
1047
  #
1002
1048
  # **A suitable default value is auto-generated.** You should normally
1003
1049
  # not need to pass this option.**
1004
1050
  #
1005
- # @option params [required, String] :name
1006
- # The name of the rule groups namespace to delete.
1051
+ # @option params [String] :revision_id
1052
+ # The revision ID of the policy to delete. Use this parameter to ensure
1053
+ # that you are deleting the correct version of the policy.
1054
+ #
1055
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1056
+ #
1057
+ # @example Request syntax with placeholder values
1058
+ #
1059
+ # resp = client.delete_resource_policy({
1060
+ # workspace_id: "WorkspaceId", # required
1061
+ # client_token: "IdempotencyToken",
1062
+ # revision_id: "String",
1063
+ # })
1064
+ #
1065
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteResourcePolicy AWS API Documentation
1066
+ #
1067
+ # @overload delete_resource_policy(params = {})
1068
+ # @param [Hash] params ({})
1069
+ def delete_resource_policy(params = {}, options = {})
1070
+ req = build_request(:delete_resource_policy, params)
1071
+ req.send_request(options)
1072
+ end
1073
+
1074
+ # Deletes one rule groups namespace and its associated rule groups
1075
+ # definition.
1007
1076
  #
1008
1077
  # @option params [required, String] :workspace_id
1009
1078
  # The ID of the workspace containing the rule groups namespace and
1010
1079
  # definition to delete.
1011
1080
  #
1081
+ # @option params [required, String] :name
1082
+ # The name of the rule groups namespace to delete.
1083
+ #
1084
+ # @option params [String] :client_token
1085
+ # A unique identifier that you can provide to ensure the idempotency of
1086
+ # the request. Case-sensitive.
1087
+ #
1088
+ # **A suitable default value is auto-generated.** You should normally
1089
+ # not need to pass this option.**
1090
+ #
1012
1091
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1013
1092
  #
1014
1093
  # @example Request syntax with placeholder values
1015
1094
  #
1016
1095
  # resp = client.delete_rule_groups_namespace({
1017
- # client_token: "IdempotencyToken",
1018
- # name: "RuleGroupsNamespaceName", # required
1019
1096
  # workspace_id: "WorkspaceId", # required
1097
+ # name: "RuleGroupsNamespaceName", # required
1098
+ # client_token: "IdempotencyToken",
1020
1099
  # })
1021
1100
  #
1022
1101
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteRuleGroupsNamespace AWS API Documentation
@@ -1031,6 +1110,9 @@ module Aws::PrometheusService
1031
1110
  # The `DeleteScraper` operation deletes one scraper, and stops any
1032
1111
  # metrics collection that the scraper performs.
1033
1112
  #
1113
+ # @option params [required, String] :scraper_id
1114
+ # The ID of the scraper to delete.
1115
+ #
1034
1116
  # @option params [String] :client_token
1035
1117
  # (Optional) A unique, case-sensitive identifier that you can provide to
1036
1118
  # ensure the idempotency of the request.
@@ -1038,19 +1120,32 @@ module Aws::PrometheusService
1038
1120
  # **A suitable default value is auto-generated.** You should normally
1039
1121
  # not need to pass this option.**
1040
1122
  #
1041
- # @option params [required, String] :scraper_id
1042
- # The ID of the scraper to delete.
1043
- #
1044
1123
  # @return [Types::DeleteScraperResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1045
1124
  #
1046
1125
  # * {Types::DeleteScraperResponse#scraper_id #scraper_id} => String
1047
1126
  # * {Types::DeleteScraperResponse#status #status} => Types::ScraperStatus
1048
1127
  #
1128
+ #
1129
+ # @example Example: DeleteScraper with optional clientToken input
1130
+ #
1131
+ # resp = client.delete_scraper({
1132
+ # client_token: "token",
1133
+ # scraper_id: "scraper-123",
1134
+ # })
1135
+ #
1136
+ # resp.to_h outputs the following:
1137
+ # {
1138
+ # scraper_id: "scraper-123",
1139
+ # status: {
1140
+ # status_code: "DELETING",
1141
+ # },
1142
+ # }
1143
+ #
1049
1144
  # @example Request syntax with placeholder values
1050
1145
  #
1051
1146
  # resp = client.delete_scraper({
1052
- # client_token: "IdempotencyToken",
1053
1147
  # scraper_id: "ScraperId", # required
1148
+ # client_token: "IdempotencyToken",
1054
1149
  # })
1055
1150
  #
1056
1151
  # @example Response structure
@@ -1075,6 +1170,9 @@ module Aws::PrometheusService
1075
1170
  #
1076
1171
  # </note>
1077
1172
  #
1173
+ # @option params [required, String] :workspace_id
1174
+ # The ID of the workspace to delete.
1175
+ #
1078
1176
  # @option params [String] :client_token
1079
1177
  # A unique identifier that you can provide to ensure the idempotency of
1080
1178
  # the request. Case-sensitive.
@@ -1082,16 +1180,13 @@ module Aws::PrometheusService
1082
1180
  # **A suitable default value is auto-generated.** You should normally
1083
1181
  # not need to pass this option.**
1084
1182
  #
1085
- # @option params [required, String] :workspace_id
1086
- # The ID of the workspace to delete.
1087
- #
1088
1183
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1089
1184
  #
1090
1185
  # @example Request syntax with placeholder values
1091
1186
  #
1092
1187
  # resp = client.delete_workspace({
1093
- # client_token: "IdempotencyToken",
1094
1188
  # workspace_id: "WorkspaceId", # required
1189
+ # client_token: "IdempotencyToken",
1095
1190
  # })
1096
1191
  #
1097
1192
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteWorkspace AWS API Documentation
@@ -1121,11 +1216,11 @@ module Aws::PrometheusService
1121
1216
  #
1122
1217
  # @example Response structure
1123
1218
  #
1124
- # resp.alert_manager_definition.created_at #=> Time
1125
- # resp.alert_manager_definition.data #=> String
1126
- # resp.alert_manager_definition.modified_at #=> Time
1127
1219
  # resp.alert_manager_definition.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1128
1220
  # resp.alert_manager_definition.status.status_reason #=> String
1221
+ # resp.alert_manager_definition.data #=> String
1222
+ # resp.alert_manager_definition.created_at #=> Time
1223
+ # resp.alert_manager_definition.modified_at #=> Time
1129
1224
  #
1130
1225
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeAlertManagerDefinition AWS API Documentation
1131
1226
  #
@@ -1158,12 +1253,12 @@ module Aws::PrometheusService
1158
1253
  #
1159
1254
  # @example Response structure
1160
1255
  #
1161
- # resp.logging_configuration.created_at #=> Time
1162
- # resp.logging_configuration.log_group_arn #=> String
1163
- # resp.logging_configuration.modified_at #=> Time
1164
1256
  # resp.logging_configuration.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1165
1257
  # resp.logging_configuration.status.status_reason #=> String
1166
1258
  # resp.logging_configuration.workspace #=> String
1259
+ # resp.logging_configuration.log_group_arn #=> String
1260
+ # resp.logging_configuration.created_at #=> Time
1261
+ # resp.logging_configuration.modified_at #=> Time
1167
1262
  #
1168
1263
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeLoggingConfiguration AWS API Documentation
1169
1264
  #
@@ -1193,14 +1288,14 @@ module Aws::PrometheusService
1193
1288
  #
1194
1289
  # @example Response structure
1195
1290
  #
1196
- # resp.query_logging_configuration.created_at #=> Time
1291
+ # resp.query_logging_configuration.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1292
+ # resp.query_logging_configuration.status.status_reason #=> String
1293
+ # resp.query_logging_configuration.workspace #=> String
1197
1294
  # resp.query_logging_configuration.destinations #=> Array
1198
1295
  # resp.query_logging_configuration.destinations[0].cloud_watch_logs.log_group_arn #=> String
1199
1296
  # resp.query_logging_configuration.destinations[0].filters.qsp_threshold #=> Integer
1297
+ # resp.query_logging_configuration.created_at #=> Time
1200
1298
  # resp.query_logging_configuration.modified_at #=> Time
1201
- # resp.query_logging_configuration.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1202
- # resp.query_logging_configuration.status.status_reason #=> String
1203
- # resp.query_logging_configuration.workspace #=> String
1204
1299
  #
1205
1300
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeQueryLoggingConfiguration AWS API Documentation
1206
1301
  #
@@ -1211,16 +1306,49 @@ module Aws::PrometheusService
1211
1306
  req.send_request(options)
1212
1307
  end
1213
1308
 
1309
+ # Returns information about the resource-based policy attached to an
1310
+ # Amazon Managed Service for Prometheus workspace.
1311
+ #
1312
+ # @option params [required, String] :workspace_id
1313
+ # The ID of the workspace to describe the resource-based policy for.
1314
+ #
1315
+ # @return [Types::DescribeResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1316
+ #
1317
+ # * {Types::DescribeResourcePolicyResponse#policy_document #policy_document} => String
1318
+ # * {Types::DescribeResourcePolicyResponse#policy_status #policy_status} => String
1319
+ # * {Types::DescribeResourcePolicyResponse#revision_id #revision_id} => String
1320
+ #
1321
+ # @example Request syntax with placeholder values
1322
+ #
1323
+ # resp = client.describe_resource_policy({
1324
+ # workspace_id: "WorkspaceId", # required
1325
+ # })
1326
+ #
1327
+ # @example Response structure
1328
+ #
1329
+ # resp.policy_document #=> String
1330
+ # resp.policy_status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING"
1331
+ # resp.revision_id #=> String
1332
+ #
1333
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeResourcePolicy AWS API Documentation
1334
+ #
1335
+ # @overload describe_resource_policy(params = {})
1336
+ # @param [Hash] params ({})
1337
+ def describe_resource_policy(params = {}, options = {})
1338
+ req = build_request(:describe_resource_policy, params)
1339
+ req.send_request(options)
1340
+ end
1341
+
1214
1342
  # Returns complete information about one rule groups namespace. To
1215
1343
  # retrieve a list of rule groups namespaces, use
1216
1344
  # `ListRuleGroupsNamespaces`.
1217
1345
  #
1218
- # @option params [required, String] :name
1219
- # The name of the rule groups namespace that you want information for.
1220
- #
1221
1346
  # @option params [required, String] :workspace_id
1222
1347
  # The ID of the workspace containing the rule groups namespace.
1223
1348
  #
1349
+ # @option params [required, String] :name
1350
+ # The name of the rule groups namespace that you want information for.
1351
+ #
1224
1352
  # @return [Types::DescribeRuleGroupsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1225
1353
  #
1226
1354
  # * {Types::DescribeRuleGroupsNamespaceResponse#rule_groups_namespace #rule_groups_namespace} => Types::RuleGroupsNamespaceDescription
@@ -1228,19 +1356,19 @@ module Aws::PrometheusService
1228
1356
  # @example Request syntax with placeholder values
1229
1357
  #
1230
1358
  # resp = client.describe_rule_groups_namespace({
1231
- # name: "RuleGroupsNamespaceName", # required
1232
1359
  # workspace_id: "WorkspaceId", # required
1360
+ # name: "RuleGroupsNamespaceName", # required
1233
1361
  # })
1234
1362
  #
1235
1363
  # @example Response structure
1236
1364
  #
1237
1365
  # resp.rule_groups_namespace.arn #=> String
1238
- # resp.rule_groups_namespace.created_at #=> Time
1239
- # resp.rule_groups_namespace.data #=> String
1240
- # resp.rule_groups_namespace.modified_at #=> Time
1241
1366
  # resp.rule_groups_namespace.name #=> String
1242
1367
  # resp.rule_groups_namespace.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1243
1368
  # resp.rule_groups_namespace.status.status_reason #=> String
1369
+ # resp.rule_groups_namespace.data #=> String
1370
+ # resp.rule_groups_namespace.created_at #=> Time
1371
+ # resp.rule_groups_namespace.modified_at #=> Time
1244
1372
  # resp.rule_groups_namespace.tags #=> Hash
1245
1373
  # resp.rule_groups_namespace.tags["TagKey"] #=> String
1246
1374
  #
@@ -1263,6 +1391,50 @@ module Aws::PrometheusService
1263
1391
  #
1264
1392
  # * {Types::DescribeScraperResponse#scraper #scraper} => Types::ScraperDescription
1265
1393
  #
1394
+ #
1395
+ # @example Example: DescribeScraper, with no statusReason to report
1396
+ #
1397
+ # resp = client.describe_scraper({
1398
+ # scraper_id: "scraper-123",
1399
+ # })
1400
+ #
1401
+ # resp.to_h outputs the following:
1402
+ # {
1403
+ # scraper: {
1404
+ # alias: "alias",
1405
+ # arn: "arn:aws:aps:us-west-2:123456789012:scraper/scraper-123",
1406
+ # created_at: Time.parse("2023-01-01T00:00:00Z"),
1407
+ # destination: {
1408
+ # amp_configuration: {
1409
+ # workspace_arn: "arn:aws:aps:us-west-2:123456789012:workspace/ws-ogh2u499-ce12-hg89-v6c7-123412341234",
1410
+ # },
1411
+ # },
1412
+ # last_modified_at: Time.parse("2020-01-02T00:00:00Z"),
1413
+ # role_arn: "arn:aws:iam::123456789012:role/exampleRole",
1414
+ # scrape_configuration: {
1415
+ # configuration_blob: "blob",
1416
+ # },
1417
+ # scraper_id: "scraper-123",
1418
+ # source: {
1419
+ # eks_configuration: {
1420
+ # cluster_arn: "arn:aws:eks:us-west-2:123456789012:cluster/example",
1421
+ # security_group_ids: [
1422
+ # "sg-abc123",
1423
+ # ],
1424
+ # subnet_ids: [
1425
+ # "subnet-abc123",
1426
+ # ],
1427
+ # },
1428
+ # },
1429
+ # status: {
1430
+ # status_code: "ACTIVE",
1431
+ # },
1432
+ # tags: {
1433
+ # "exampleTag" => "exampleValue",
1434
+ # },
1435
+ # },
1436
+ # }
1437
+ #
1266
1438
  # @example Request syntax with placeholder values
1267
1439
  #
1268
1440
  # resp = client.describe_scraper({
@@ -1272,24 +1444,24 @@ module Aws::PrometheusService
1272
1444
  # @example Response structure
1273
1445
  #
1274
1446
  # resp.scraper.alias #=> String
1447
+ # resp.scraper.scraper_id #=> String
1275
1448
  # resp.scraper.arn #=> String
1449
+ # resp.scraper.role_arn #=> String
1450
+ # resp.scraper.status.status_code #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
1276
1451
  # resp.scraper.created_at #=> Time
1277
- # resp.scraper.destination.amp_configuration.workspace_arn #=> String
1278
1452
  # resp.scraper.last_modified_at #=> Time
1279
- # resp.scraper.role_arn #=> String
1280
- # resp.scraper.role_configuration.source_role_arn #=> String
1281
- # resp.scraper.role_configuration.target_role_arn #=> String
1453
+ # resp.scraper.tags #=> Hash
1454
+ # resp.scraper.tags["TagKey"] #=> String
1455
+ # resp.scraper.status_reason #=> String
1282
1456
  # resp.scraper.scrape_configuration.configuration_blob #=> String
1283
- # resp.scraper.scraper_id #=> String
1284
1457
  # resp.scraper.source.eks_configuration.cluster_arn #=> String
1285
1458
  # resp.scraper.source.eks_configuration.security_group_ids #=> Array
1286
1459
  # resp.scraper.source.eks_configuration.security_group_ids[0] #=> String
1287
1460
  # resp.scraper.source.eks_configuration.subnet_ids #=> Array
1288
1461
  # resp.scraper.source.eks_configuration.subnet_ids[0] #=> String
1289
- # resp.scraper.status.status_code #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
1290
- # resp.scraper.status_reason #=> String
1291
- # resp.scraper.tags #=> Hash
1292
- # resp.scraper.tags["TagKey"] #=> String
1462
+ # resp.scraper.destination.amp_configuration.workspace_arn #=> String
1463
+ # resp.scraper.role_configuration.source_role_arn #=> String
1464
+ # resp.scraper.role_configuration.target_role_arn #=> String
1293
1465
  #
1294
1466
  #
1295
1467
  # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
@@ -1323,15 +1495,15 @@ module Aws::PrometheusService
1323
1495
  #
1324
1496
  # @example Response structure
1325
1497
  #
1498
+ # resp.workspace.workspace_id #=> String
1326
1499
  # resp.workspace.alias #=> String
1327
1500
  # resp.workspace.arn #=> String
1328
- # resp.workspace.created_at #=> Time
1329
- # resp.workspace.kms_key_arn #=> String
1330
- # resp.workspace.prometheus_endpoint #=> String
1331
1501
  # resp.workspace.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED"
1502
+ # resp.workspace.prometheus_endpoint #=> String
1503
+ # resp.workspace.created_at #=> Time
1332
1504
  # resp.workspace.tags #=> Hash
1333
1505
  # resp.workspace.tags["TagKey"] #=> String
1334
- # resp.workspace.workspace_id #=> String
1506
+ # resp.workspace.kms_key_arn #=> String
1335
1507
  #
1336
1508
  #
1337
1509
  # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
@@ -1373,13 +1545,13 @@ module Aws::PrometheusService
1373
1545
  #
1374
1546
  # @example Response structure
1375
1547
  #
1548
+ # resp.workspace_configuration.status.status_code #=> String, one of "ACTIVE", "UPDATING", "UPDATE_FAILED"
1549
+ # resp.workspace_configuration.status.status_reason #=> String
1376
1550
  # resp.workspace_configuration.limits_per_label_set #=> Array
1551
+ # resp.workspace_configuration.limits_per_label_set[0].limits.max_series #=> Integer
1377
1552
  # resp.workspace_configuration.limits_per_label_set[0].label_set #=> Hash
1378
1553
  # resp.workspace_configuration.limits_per_label_set[0].label_set["LabelName"] #=> String
1379
- # resp.workspace_configuration.limits_per_label_set[0].limits.max_series #=> Integer
1380
1554
  # resp.workspace_configuration.retention_period_in_days #=> Integer
1381
- # resp.workspace_configuration.status.status_code #=> String, one of "ACTIVE", "UPDATING", "UPDATE_FAILED"
1382
- # resp.workspace_configuration.status.status_reason #=> String
1383
1555
  #
1384
1556
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeWorkspaceConfiguration AWS API Documentation
1385
1557
  #
@@ -1397,6 +1569,17 @@ module Aws::PrometheusService
1397
1569
  #
1398
1570
  # * {Types::GetDefaultScraperConfigurationResponse#configuration #configuration} => String
1399
1571
  #
1572
+ #
1573
+ # @example Example: GetDefaultScraperConfiguration
1574
+ #
1575
+ # resp = client.get_default_scraper_configuration({
1576
+ # })
1577
+ #
1578
+ # resp.to_h outputs the following:
1579
+ # {
1580
+ # configuration: "blob",
1581
+ # }
1582
+ #
1400
1583
  # @example Response structure
1401
1584
  #
1402
1585
  # resp.configuration #=> String
@@ -1412,8 +1595,8 @@ module Aws::PrometheusService
1412
1595
 
1413
1596
  # Returns a list of rule groups namespaces in a workspace.
1414
1597
  #
1415
- # @option params [Integer] :max_results
1416
- # The maximum number of results to return. The default is 100.
1598
+ # @option params [required, String] :workspace_id
1599
+ # The ID of the workspace containing the rule groups namespaces.
1417
1600
  #
1418
1601
  # @option params [String] :name
1419
1602
  # Use this parameter to filter the rule groups namespaces that are
@@ -1430,37 +1613,37 @@ module Aws::PrometheusService
1430
1613
  # will return 10 and a `nextToken`. Using the next token in a subsequent
1431
1614
  # call will return the remaining 2 namespaces.
1432
1615
  #
1433
- # @option params [required, String] :workspace_id
1434
- # The ID of the workspace containing the rule groups namespaces.
1616
+ # @option params [Integer] :max_results
1617
+ # The maximum number of results to return. The default is 100.
1435
1618
  #
1436
1619
  # @return [Types::ListRuleGroupsNamespacesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1437
1620
  #
1438
- # * {Types::ListRuleGroupsNamespacesResponse#next_token #next_token} => String
1439
1621
  # * {Types::ListRuleGroupsNamespacesResponse#rule_groups_namespaces #rule_groups_namespaces} => Array&lt;Types::RuleGroupsNamespaceSummary&gt;
1622
+ # * {Types::ListRuleGroupsNamespacesResponse#next_token #next_token} => String
1440
1623
  #
1441
1624
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1442
1625
  #
1443
1626
  # @example Request syntax with placeholder values
1444
1627
  #
1445
1628
  # resp = client.list_rule_groups_namespaces({
1446
- # max_results: 1,
1629
+ # workspace_id: "WorkspaceId", # required
1447
1630
  # name: "RuleGroupsNamespaceName",
1448
1631
  # next_token: "PaginationToken",
1449
- # workspace_id: "WorkspaceId", # required
1632
+ # max_results: 1,
1450
1633
  # })
1451
1634
  #
1452
1635
  # @example Response structure
1453
1636
  #
1454
- # resp.next_token #=> String
1455
1637
  # resp.rule_groups_namespaces #=> Array
1456
1638
  # resp.rule_groups_namespaces[0].arn #=> String
1457
- # resp.rule_groups_namespaces[0].created_at #=> Time
1458
- # resp.rule_groups_namespaces[0].modified_at #=> Time
1459
1639
  # resp.rule_groups_namespaces[0].name #=> String
1460
1640
  # resp.rule_groups_namespaces[0].status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1461
1641
  # resp.rule_groups_namespaces[0].status.status_reason #=> String
1642
+ # resp.rule_groups_namespaces[0].created_at #=> Time
1643
+ # resp.rule_groups_namespaces[0].modified_at #=> Time
1462
1644
  # resp.rule_groups_namespaces[0].tags #=> Hash
1463
1645
  # resp.rule_groups_namespaces[0].tags["TagKey"] #=> String
1646
+ # resp.next_token #=> String
1464
1647
  #
1465
1648
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListRuleGroupsNamespaces AWS API Documentation
1466
1649
  #
@@ -1494,55 +1677,181 @@ module Aws::PrometheusService
1494
1677
  # If this is included, it filters the results to only the scrapers that
1495
1678
  # match the filter.
1496
1679
  #
1680
+ # @option params [String] :next_token
1681
+ # (Optional) The token for the next set of items to return. (You
1682
+ # received this token from a previous call.)
1683
+ #
1497
1684
  # @option params [Integer] :max_results
1498
1685
  # Optional) The maximum number of scrapers to return in one
1499
1686
  # `ListScrapers` operation. The range is 1-1000.
1500
1687
  #
1501
1688
  # If you omit this parameter, the default of 100 is used.
1502
1689
  #
1503
- # @option params [String] :next_token
1504
- # (Optional) The token for the next set of items to return. (You
1505
- # received this token from a previous call.)
1506
- #
1507
1690
  # @return [Types::ListScrapersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1508
1691
  #
1509
- # * {Types::ListScrapersResponse#next_token #next_token} => String
1510
1692
  # * {Types::ListScrapersResponse#scrapers #scrapers} => Array&lt;Types::ScraperSummary&gt;
1693
+ # * {Types::ListScrapersResponse#next_token #next_token} => String
1511
1694
  #
1512
1695
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1513
1696
  #
1697
+ #
1698
+ # @example Example: ListScrapers, with a max result of 2, using a pagination token from a previous call to ListScrapers
1699
+ #
1700
+ # resp = client.list_scrapers({
1701
+ # max_results: 2,
1702
+ # next_token: "previouslyGeneratedToken",
1703
+ # })
1704
+ #
1705
+ # resp.to_h outputs the following:
1706
+ # {
1707
+ # scrapers: [
1708
+ # {
1709
+ # alias: "alias1",
1710
+ # arn: "arn:aws:aps:us-west-2:123456789012:scraper/scraper-123",
1711
+ # created_at: Time.parse("2023-01-01T00:00:00Z"),
1712
+ # destination: {
1713
+ # amp_configuration: {
1714
+ # workspace_arn: "arn:aws:aps:us-west-2:123456789012:workspace/ws-ogh2u499-ce12-hg89-v6c7-123412341234",
1715
+ # },
1716
+ # },
1717
+ # last_modified_at: Time.parse("2020-01-02T00:00:00Z"),
1718
+ # role_arn: "arn:aws:iam::123456789012:role/exampleRole",
1719
+ # scraper_id: "scraper-123",
1720
+ # source: {
1721
+ # eks_configuration: {
1722
+ # cluster_arn: "arn:aws:eks:us-west-2:123456789012:cluster/example1",
1723
+ # security_group_ids: [
1724
+ # "sg-abc123",
1725
+ # ],
1726
+ # subnet_ids: [
1727
+ # "subnet-abc123",
1728
+ # ],
1729
+ # },
1730
+ # },
1731
+ # status: {
1732
+ # status_code: "ACTIVE",
1733
+ # },
1734
+ # tags: {
1735
+ # "exampleTag" => "exampleValue",
1736
+ # },
1737
+ # },
1738
+ # {
1739
+ # alias: "alias2",
1740
+ # arn: "arn:aws:aps:us-west-2:123456789012:scraper/scraper-456",
1741
+ # created_at: Time.parse("2023-01-01T00:00:00Z"),
1742
+ # destination: {
1743
+ # amp_configuration: {
1744
+ # workspace_arn: "arn:aws:aps:us-west-2:123456789012:workspace/ws-ogh2u499-ce12-hg89-v6c7-123412341234",
1745
+ # },
1746
+ # },
1747
+ # last_modified_at: Time.parse("2020-01-02T00:00:00Z"),
1748
+ # role_arn: "arn:aws:iam::123456789012:role/exampleRole",
1749
+ # scraper_id: "scraper-456",
1750
+ # source: {
1751
+ # eks_configuration: {
1752
+ # cluster_arn: "arn:aws:eks:us-west-2:123456789012:cluster/example2",
1753
+ # security_group_ids: [
1754
+ # "sg-abc456",
1755
+ # ],
1756
+ # subnet_ids: [
1757
+ # "subnet-abc456",
1758
+ # ],
1759
+ # },
1760
+ # },
1761
+ # status: {
1762
+ # status_code: "CREATING",
1763
+ # },
1764
+ # tags: {
1765
+ # "exampleTag" => "exampleValue",
1766
+ # },
1767
+ # },
1768
+ # ],
1769
+ # }
1770
+ #
1771
+ # @example Example: ListScrapers, with filters
1772
+ #
1773
+ # resp = client.list_scrapers({
1774
+ # filters: {
1775
+ # "alias" => [
1776
+ # "alias1",
1777
+ # ],
1778
+ # "sourceArn" => [
1779
+ # "arn:aws:eks:us-west-2:123456789012:cluster/example1",
1780
+ # ],
1781
+ # "status" => [
1782
+ # "ACTIVE",
1783
+ # ],
1784
+ # },
1785
+ # })
1786
+ #
1787
+ # resp.to_h outputs the following:
1788
+ # {
1789
+ # scrapers: [
1790
+ # {
1791
+ # alias: "alias1",
1792
+ # arn: "arn:aws:aps:us-west-2:123456789012:scraper/scraper-123",
1793
+ # created_at: Time.parse("2023-01-01T00:00:00Z"),
1794
+ # destination: {
1795
+ # amp_configuration: {
1796
+ # workspace_arn: "arn:aws:aps:us-west-2:123456789012:workspace/ws-ogh2u499-ce12-hg89-v6c7-123412341234",
1797
+ # },
1798
+ # },
1799
+ # last_modified_at: Time.parse("2020-01-02T00:00:00Z"),
1800
+ # role_arn: "arn:aws:iam::123456789012:role/exampleRole",
1801
+ # scraper_id: "scraper-123",
1802
+ # source: {
1803
+ # eks_configuration: {
1804
+ # cluster_arn: "arn:aws:eks:us-west-2:123456789012:cluster/example1",
1805
+ # security_group_ids: [
1806
+ # "sg-abc123",
1807
+ # ],
1808
+ # subnet_ids: [
1809
+ # "subnet-abc123",
1810
+ # ],
1811
+ # },
1812
+ # },
1813
+ # status: {
1814
+ # status_code: "ACTIVE",
1815
+ # },
1816
+ # tags: {
1817
+ # "exampleTag" => "exampleValue",
1818
+ # },
1819
+ # },
1820
+ # ],
1821
+ # }
1822
+ #
1514
1823
  # @example Request syntax with placeholder values
1515
1824
  #
1516
1825
  # resp = client.list_scrapers({
1517
1826
  # filters: {
1518
1827
  # "FilterKey" => ["FilterValue"],
1519
1828
  # },
1520
- # max_results: 1,
1521
1829
  # next_token: "PaginationToken",
1830
+ # max_results: 1,
1522
1831
  # })
1523
1832
  #
1524
1833
  # @example Response structure
1525
1834
  #
1526
- # resp.next_token #=> String
1527
1835
  # resp.scrapers #=> Array
1528
1836
  # resp.scrapers[0].alias #=> String
1837
+ # resp.scrapers[0].scraper_id #=> String
1529
1838
  # resp.scrapers[0].arn #=> String
1839
+ # resp.scrapers[0].role_arn #=> String
1840
+ # resp.scrapers[0].status.status_code #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
1530
1841
  # resp.scrapers[0].created_at #=> Time
1531
- # resp.scrapers[0].destination.amp_configuration.workspace_arn #=> String
1532
1842
  # resp.scrapers[0].last_modified_at #=> Time
1533
- # resp.scrapers[0].role_arn #=> String
1534
- # resp.scrapers[0].role_configuration.source_role_arn #=> String
1535
- # resp.scrapers[0].role_configuration.target_role_arn #=> String
1536
- # resp.scrapers[0].scraper_id #=> String
1843
+ # resp.scrapers[0].tags #=> Hash
1844
+ # resp.scrapers[0].tags["TagKey"] #=> String
1845
+ # resp.scrapers[0].status_reason #=> String
1537
1846
  # resp.scrapers[0].source.eks_configuration.cluster_arn #=> String
1538
1847
  # resp.scrapers[0].source.eks_configuration.security_group_ids #=> Array
1539
1848
  # resp.scrapers[0].source.eks_configuration.security_group_ids[0] #=> String
1540
1849
  # resp.scrapers[0].source.eks_configuration.subnet_ids #=> Array
1541
1850
  # resp.scrapers[0].source.eks_configuration.subnet_ids[0] #=> String
1542
- # resp.scrapers[0].status.status_code #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
1543
- # resp.scrapers[0].status_reason #=> String
1544
- # resp.scrapers[0].tags #=> Hash
1545
- # resp.scrapers[0].tags["TagKey"] #=> String
1851
+ # resp.scrapers[0].destination.amp_configuration.workspace_arn #=> String
1852
+ # resp.scrapers[0].role_configuration.source_role_arn #=> String
1853
+ # resp.scrapers[0].role_configuration.target_role_arn #=> String
1854
+ # resp.next_token #=> String
1546
1855
  #
1547
1856
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListScrapers AWS API Documentation
1548
1857
  #
@@ -1589,6 +1898,16 @@ module Aws::PrometheusService
1589
1898
  # Lists all of the Amazon Managed Service for Prometheus workspaces in
1590
1899
  # your account. This includes workspaces being created or deleted.
1591
1900
  #
1901
+ # @option params [String] :next_token
1902
+ # The token for the next set of items to return. You receive this token
1903
+ # from a previous call, and use it to get the next page of results. The
1904
+ # other parameters must be the same as the initial call.
1905
+ #
1906
+ # For example, if your initial request has `maxResults` of 10, and there
1907
+ # are 12 workspaces to return, then your initial request will return 10
1908
+ # and a `nextToken`. Using the next token in a subsequent call will
1909
+ # return the remaining 2 workspaces.
1910
+ #
1592
1911
  # @option params [String] :alias
1593
1912
  # If this is included, it filters the results to only the workspaces
1594
1913
  # with names that start with the value that you specify here.
@@ -1600,43 +1919,33 @@ module Aws::PrometheusService
1600
1919
  # The maximum number of workspaces to return per request. The default is
1601
1920
  # 100.
1602
1921
  #
1603
- # @option params [String] :next_token
1604
- # The token for the next set of items to return. You receive this token
1605
- # from a previous call, and use it to get the next page of results. The
1606
- # other parameters must be the same as the initial call.
1607
- #
1608
- # For example, if your initial request has `maxResults` of 10, and there
1609
- # are 12 workspaces to return, then your initial request will return 10
1610
- # and a `nextToken`. Using the next token in a subsequent call will
1611
- # return the remaining 2 workspaces.
1612
- #
1613
1922
  # @return [Types::ListWorkspacesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1614
1923
  #
1615
- # * {Types::ListWorkspacesResponse#next_token #next_token} => String
1616
1924
  # * {Types::ListWorkspacesResponse#workspaces #workspaces} => Array&lt;Types::WorkspaceSummary&gt;
1925
+ # * {Types::ListWorkspacesResponse#next_token #next_token} => String
1617
1926
  #
1618
1927
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1619
1928
  #
1620
1929
  # @example Request syntax with placeholder values
1621
1930
  #
1622
1931
  # resp = client.list_workspaces({
1932
+ # next_token: "PaginationToken",
1623
1933
  # alias: "WorkspaceAlias",
1624
1934
  # max_results: 1,
1625
- # next_token: "PaginationToken",
1626
1935
  # })
1627
1936
  #
1628
1937
  # @example Response structure
1629
1938
  #
1630
- # resp.next_token #=> String
1631
1939
  # resp.workspaces #=> Array
1940
+ # resp.workspaces[0].workspace_id #=> String
1632
1941
  # resp.workspaces[0].alias #=> String
1633
1942
  # resp.workspaces[0].arn #=> String
1634
- # resp.workspaces[0].created_at #=> Time
1635
- # resp.workspaces[0].kms_key_arn #=> String
1636
1943
  # resp.workspaces[0].status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED"
1944
+ # resp.workspaces[0].created_at #=> Time
1637
1945
  # resp.workspaces[0].tags #=> Hash
1638
1946
  # resp.workspaces[0].tags["TagKey"] #=> String
1639
- # resp.workspaces[0].workspace_id #=> String
1947
+ # resp.workspaces[0].kms_key_arn #=> String
1948
+ # resp.next_token #=> String
1640
1949
  #
1641
1950
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListWorkspaces AWS API Documentation
1642
1951
  #
@@ -1652,12 +1961,8 @@ module Aws::PrometheusService
1652
1961
  # use this operation to create it. Instead, use
1653
1962
  # `CreateAlertManagerDefinition`.
1654
1963
  #
1655
- # @option params [String] :client_token
1656
- # A unique identifier that you can provide to ensure the idempotency of
1657
- # the request. Case-sensitive.
1658
- #
1659
- # **A suitable default value is auto-generated.** You should normally
1660
- # not need to pass this option.**
1964
+ # @option params [required, String] :workspace_id
1965
+ # The ID of the workspace to update the alert manager definition in.
1661
1966
  #
1662
1967
  # @option params [required, String, StringIO, File] :data
1663
1968
  # The alert manager definition to use. A base64-encoded version of the
@@ -1670,8 +1975,12 @@ module Aws::PrometheusService
1670
1975
  #
1671
1976
  # [1]: https://docs.aws.amazon.com/prometheus/latest/APIReference/yaml-AlertManagerDefinitionData.html
1672
1977
  #
1673
- # @option params [required, String] :workspace_id
1674
- # The ID of the workspace to update the alert manager definition in.
1978
+ # @option params [String] :client_token
1979
+ # A unique identifier that you can provide to ensure the idempotency of
1980
+ # the request. Case-sensitive.
1981
+ #
1982
+ # **A suitable default value is auto-generated.** You should normally
1983
+ # not need to pass this option.**
1675
1984
  #
1676
1985
  # @return [Types::PutAlertManagerDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1677
1986
  #
@@ -1680,9 +1989,9 @@ module Aws::PrometheusService
1680
1989
  # @example Request syntax with placeholder values
1681
1990
  #
1682
1991
  # resp = client.put_alert_manager_definition({
1683
- # client_token: "IdempotencyToken",
1684
- # data: "data", # required
1685
1992
  # workspace_id: "WorkspaceId", # required
1993
+ # data: "data", # required
1994
+ # client_token: "IdempotencyToken",
1686
1995
  # })
1687
1996
  #
1688
1997
  # @example Response structure
@@ -1699,6 +2008,87 @@ module Aws::PrometheusService
1699
2008
  req.send_request(options)
1700
2009
  end
1701
2010
 
2011
+ # Creates or updates a resource-based policy for an Amazon Managed
2012
+ # Service for Prometheus workspace. Use resource-based policies to grant
2013
+ # permissions to other AWS accounts or services to access your
2014
+ # workspace.
2015
+ #
2016
+ # Only Prometheus-compatible APIs can be used for workspace sharing. You
2017
+ # can add non-Prometheus-compatible APIs to the policy, but they will be
2018
+ # ignored. For more information, see [Prometheus-compatible APIs][1] in
2019
+ # the *Amazon Managed Service for Prometheus User Guide*.
2020
+ #
2021
+ # If your workspace uses customer-managed KMS keys for encryption, you
2022
+ # must grant the principals in your resource-based policy access to
2023
+ # those KMS keys. You can do this by creating KMS grants. For more
2024
+ # information, see [CreateGrant][2] in the *AWS Key Management Service
2025
+ # API Reference* and [Encryption at rest][3] in the *Amazon Managed
2026
+ # Service for Prometheus User Guide*.
2027
+ #
2028
+ # For more information about working with IAM, see [Using Amazon Managed
2029
+ # Service for Prometheus with IAM][4] in the *Amazon Managed Service for
2030
+ # Prometheus User Guide*.
2031
+ #
2032
+ #
2033
+ #
2034
+ # [1]: https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-APIReference-Prometheus-Compatible-Apis.html
2035
+ # [2]: https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateGrant.html
2036
+ # [3]: https://docs.aws.amazon.com/prometheus/latest/userguide/encryption-at-rest-Amazon-Service-Prometheus.html
2037
+ # [4]: https://docs.aws.amazon.com/prometheus/latest/userguide/security_iam_service-with-iam.html
2038
+ #
2039
+ # @option params [required, String] :workspace_id
2040
+ # The ID of the workspace to attach the resource-based policy to.
2041
+ #
2042
+ # @option params [required, String] :policy_document
2043
+ # The JSON policy document to use as the resource-based policy. This
2044
+ # policy defines the permissions that other AWS accounts or services
2045
+ # have to access your workspace.
2046
+ #
2047
+ # @option params [String] :client_token
2048
+ # A unique, case-sensitive identifier that you provide to ensure the
2049
+ # request is safe to retry (idempotent).
2050
+ #
2051
+ # **A suitable default value is auto-generated.** You should normally
2052
+ # not need to pass this option.**
2053
+ #
2054
+ # @option params [String] :revision_id
2055
+ # The revision ID of the policy to update. Use this parameter to ensure
2056
+ # that you are updating the correct version of the policy. If you don't
2057
+ # specify a revision ID, the policy is updated regardless of its current
2058
+ # revision.
2059
+ #
2060
+ # For the first **PUT** request on a workspace that doesn't have an
2061
+ # existing resource policy, you can specify `NO_POLICY` as the revision
2062
+ # ID.
2063
+ #
2064
+ # @return [Types::PutResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2065
+ #
2066
+ # * {Types::PutResourcePolicyResponse#policy_status #policy_status} => String
2067
+ # * {Types::PutResourcePolicyResponse#revision_id #revision_id} => String
2068
+ #
2069
+ # @example Request syntax with placeholder values
2070
+ #
2071
+ # resp = client.put_resource_policy({
2072
+ # workspace_id: "WorkspaceId", # required
2073
+ # policy_document: "String", # required
2074
+ # client_token: "IdempotencyToken",
2075
+ # revision_id: "String",
2076
+ # })
2077
+ #
2078
+ # @example Response structure
2079
+ #
2080
+ # resp.policy_status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING"
2081
+ # resp.revision_id #=> String
2082
+ #
2083
+ # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/PutResourcePolicy AWS API Documentation
2084
+ #
2085
+ # @overload put_resource_policy(params = {})
2086
+ # @param [Hash] params ({})
2087
+ def put_resource_policy(params = {}, options = {})
2088
+ req = build_request(:put_resource_policy, params)
2089
+ req.send_request(options)
2090
+ end
2091
+
1702
2092
  # Updates an existing rule groups namespace within a workspace. A rule
1703
2093
  # groups namespace is associated with exactly one rules file. A
1704
2094
  # workspace can have multiple rule groups namespaces.
@@ -1709,12 +2099,12 @@ module Aws::PrometheusService
1709
2099
  # You can't use this operation to add tags to an existing rule groups
1710
2100
  # namespace. Instead, use `TagResource`.
1711
2101
  #
1712
- # @option params [String] :client_token
1713
- # A unique identifier that you can provide to ensure the idempotency of
1714
- # the request. Case-sensitive.
2102
+ # @option params [required, String] :workspace_id
2103
+ # The ID of the workspace where you are updating the rule groups
2104
+ # namespace.
1715
2105
  #
1716
- # **A suitable default value is auto-generated.** You should normally
1717
- # not need to pass this option.**
2106
+ # @option params [required, String] :name
2107
+ # The name of the rule groups namespace that you are updating.
1718
2108
  #
1719
2109
  # @option params [required, String, StringIO, File] :data
1720
2110
  # The new rules file to use in the namespace. A base64-encoded version
@@ -1727,33 +2117,33 @@ module Aws::PrometheusService
1727
2117
  #
1728
2118
  # [1]: https://docs.aws.amazon.com/prometheus/latest/APIReference/yaml-RuleGroupsNamespaceData.html
1729
2119
  #
1730
- # @option params [required, String] :name
1731
- # The name of the rule groups namespace that you are updating.
2120
+ # @option params [String] :client_token
2121
+ # A unique identifier that you can provide to ensure the idempotency of
2122
+ # the request. Case-sensitive.
1732
2123
  #
1733
- # @option params [required, String] :workspace_id
1734
- # The ID of the workspace where you are updating the rule groups
1735
- # namespace.
2124
+ # **A suitable default value is auto-generated.** You should normally
2125
+ # not need to pass this option.**
1736
2126
  #
1737
2127
  # @return [Types::PutRuleGroupsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1738
2128
  #
1739
- # * {Types::PutRuleGroupsNamespaceResponse#arn #arn} => String
1740
2129
  # * {Types::PutRuleGroupsNamespaceResponse#name #name} => String
2130
+ # * {Types::PutRuleGroupsNamespaceResponse#arn #arn} => String
1741
2131
  # * {Types::PutRuleGroupsNamespaceResponse#status #status} => Types::RuleGroupsNamespaceStatus
1742
2132
  # * {Types::PutRuleGroupsNamespaceResponse#tags #tags} => Hash&lt;String,String&gt;
1743
2133
  #
1744
2134
  # @example Request syntax with placeholder values
1745
2135
  #
1746
2136
  # resp = client.put_rule_groups_namespace({
1747
- # client_token: "IdempotencyToken",
1748
- # data: "data", # required
1749
- # name: "RuleGroupsNamespaceName", # required
1750
2137
  # workspace_id: "WorkspaceId", # required
2138
+ # name: "RuleGroupsNamespaceName", # required
2139
+ # data: "data", # required
2140
+ # client_token: "IdempotencyToken",
1751
2141
  # })
1752
2142
  #
1753
2143
  # @example Response structure
1754
2144
  #
1755
- # resp.arn #=> String
1756
2145
  # resp.name #=> String
2146
+ # resp.arn #=> String
1757
2147
  # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1758
2148
  # resp.status.status_reason #=> String
1759
2149
  # resp.tags #=> Hash
@@ -1841,6 +2231,13 @@ module Aws::PrometheusService
1841
2231
  #
1842
2232
  # </note>
1843
2233
  #
2234
+ # @option params [required, String] :workspace_id
2235
+ # The ID of the workspace to update the logging configuration for.
2236
+ #
2237
+ # @option params [required, String] :log_group_arn
2238
+ # The ARN of the CloudWatch log group to which the vended log data will
2239
+ # be published.
2240
+ #
1844
2241
  # @option params [String] :client_token
1845
2242
  # A unique identifier that you can provide to ensure the idempotency of
1846
2243
  # the request. Case-sensitive.
@@ -1848,13 +2245,6 @@ module Aws::PrometheusService
1848
2245
  # **A suitable default value is auto-generated.** You should normally
1849
2246
  # not need to pass this option.**
1850
2247
  #
1851
- # @option params [required, String] :log_group_arn
1852
- # The ARN of the CloudWatch log group to which the vended log data will
1853
- # be published.
1854
- #
1855
- # @option params [required, String] :workspace_id
1856
- # The ID of the workspace to update the logging configuration for.
1857
- #
1858
2248
  # @return [Types::UpdateLoggingConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1859
2249
  #
1860
2250
  # * {Types::UpdateLoggingConfigurationResponse#status #status} => Types::LoggingConfigurationStatus
@@ -1862,9 +2252,9 @@ module Aws::PrometheusService
1862
2252
  # @example Request syntax with placeholder values
1863
2253
  #
1864
2254
  # resp = client.update_logging_configuration({
1865
- # client_token: "IdempotencyToken",
1866
- # log_group_arn: "LogGroupArn", # required
1867
2255
  # workspace_id: "WorkspaceId", # required
2256
+ # log_group_arn: "LogGroupArn", # required
2257
+ # client_token: "IdempotencyToken",
1868
2258
  # })
1869
2259
  #
1870
2260
  # @example Response structure
@@ -1883,6 +2273,14 @@ module Aws::PrometheusService
1883
2273
 
1884
2274
  # Updates the query logging configuration for the specified workspace.
1885
2275
  #
2276
+ # @option params [required, String] :workspace_id
2277
+ # The ID of the workspace for which to update the query logging
2278
+ # configuration.
2279
+ #
2280
+ # @option params [required, Array<Types::LoggingDestination>] :destinations
2281
+ # The destinations where query logs will be sent. Only CloudWatch Logs
2282
+ # destination is supported. The list must contain exactly one element.
2283
+ #
1886
2284
  # @option params [String] :client_token
1887
2285
  # (Optional) A unique, case-sensitive identifier that you can provide to
1888
2286
  # ensure the idempotency of the request.
@@ -1890,14 +2288,6 @@ module Aws::PrometheusService
1890
2288
  # **A suitable default value is auto-generated.** You should normally
1891
2289
  # not need to pass this option.**
1892
2290
  #
1893
- # @option params [required, Array<Types::LoggingDestination>] :destinations
1894
- # The destinations where query logs will be sent. Only CloudWatch Logs
1895
- # destination is supported. The list must contain exactly one element.
1896
- #
1897
- # @option params [required, String] :workspace_id
1898
- # The ID of the workspace for which to update the query logging
1899
- # configuration.
1900
- #
1901
2291
  # @return [Types::UpdateQueryLoggingConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1902
2292
  #
1903
2293
  # * {Types::UpdateQueryLoggingConfigurationResponse#status #status} => Types::QueryLoggingConfigurationStatus
@@ -1905,7 +2295,7 @@ module Aws::PrometheusService
1905
2295
  # @example Request syntax with placeholder values
1906
2296
  #
1907
2297
  # resp = client.update_query_logging_configuration({
1908
- # client_token: "IdempotencyToken",
2298
+ # workspace_id: "WorkspaceId", # required
1909
2299
  # destinations: [ # required
1910
2300
  # {
1911
2301
  # cloud_watch_logs: { # required
@@ -1916,7 +2306,7 @@ module Aws::PrometheusService
1916
2306
  # },
1917
2307
  # },
1918
2308
  # ],
1919
- # workspace_id: "WorkspaceId", # required
2309
+ # client_token: "IdempotencyToken",
1920
2310
  # })
1921
2311
  #
1922
2312
  # @example Response structure
@@ -1939,24 +2329,12 @@ module Aws::PrometheusService
1939
2329
  # scraper is collecting metrics. To change the source, delete the
1940
2330
  # scraper and create a new one.
1941
2331
  #
2332
+ # @option params [required, String] :scraper_id
2333
+ # The ID of the scraper to update.
2334
+ #
1942
2335
  # @option params [String] :alias
1943
2336
  # The new alias of the scraper.
1944
2337
  #
1945
- # @option params [String] :client_token
1946
- # A unique identifier that you can provide to ensure the idempotency of
1947
- # the request. Case-sensitive.
1948
- #
1949
- # **A suitable default value is auto-generated.** You should normally
1950
- # not need to pass this option.**
1951
- #
1952
- # @option params [Types::Destination] :destination
1953
- # The new Amazon Managed Service for Prometheus workspace to send
1954
- # metrics to.
1955
- #
1956
- # @option params [Types::RoleConfiguration] :role_configuration
1957
- # Use this structure to enable cross-account access, so that you can use
1958
- # a target account to access Prometheus metrics from source accounts.
1959
- #
1960
2338
  # @option params [Types::ScrapeConfiguration] :scrape_configuration
1961
2339
  # Contains the base-64 encoded YAML configuration for the scraper.
1962
2340
  #
@@ -1970,21 +2348,65 @@ module Aws::PrometheusService
1970
2348
  #
1971
2349
  # [1]: https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html
1972
2350
  #
1973
- # @option params [required, String] :scraper_id
1974
- # The ID of the scraper to update.
2351
+ # @option params [Types::Destination] :destination
2352
+ # The new Amazon Managed Service for Prometheus workspace to send
2353
+ # metrics to.
2354
+ #
2355
+ # @option params [Types::RoleConfiguration] :role_configuration
2356
+ # Use this structure to enable cross-account access, so that you can use
2357
+ # a target account to access Prometheus metrics from source accounts.
2358
+ #
2359
+ # @option params [String] :client_token
2360
+ # A unique identifier that you can provide to ensure the idempotency of
2361
+ # the request. Case-sensitive.
2362
+ #
2363
+ # **A suitable default value is auto-generated.** You should normally
2364
+ # not need to pass this option.**
1975
2365
  #
1976
2366
  # @return [Types::UpdateScraperResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1977
2367
  #
1978
- # * {Types::UpdateScraperResponse#arn #arn} => String
1979
2368
  # * {Types::UpdateScraperResponse#scraper_id #scraper_id} => String
2369
+ # * {Types::UpdateScraperResponse#arn #arn} => String
1980
2370
  # * {Types::UpdateScraperResponse#status #status} => Types::ScraperStatus
1981
2371
  # * {Types::UpdateScraperResponse#tags #tags} => Hash&lt;String,String&gt;
1982
2372
  #
2373
+ #
2374
+ # @example Example: UpdateScraper with all optional parameters
2375
+ #
2376
+ # resp = client.update_scraper({
2377
+ # alias: "alias-update",
2378
+ # client_token: "token",
2379
+ # destination: {
2380
+ # amp_configuration: {
2381
+ # workspace_arn: "arn:aws:aps:us-west-2:123456789012:workspace/ws-ogh2u499-ce12-hg89-v6c7-123412341234-update",
2382
+ # },
2383
+ # },
2384
+ # scrape_configuration: {
2385
+ # configuration_blob: "blob-update",
2386
+ # },
2387
+ # scraper_id: "scraper-123",
2388
+ # })
2389
+ #
2390
+ # resp.to_h outputs the following:
2391
+ # {
2392
+ # arn: "arn:aws:aps:us-west-2:123456789012:scraper/scraper-123",
2393
+ # scraper_id: "scraper-123",
2394
+ # status: {
2395
+ # status_code: "UPDATING",
2396
+ # },
2397
+ # tags: {
2398
+ # "exampleTag" => "exampleValue",
2399
+ # },
2400
+ # }
2401
+ #
1983
2402
  # @example Request syntax with placeholder values
1984
2403
  #
1985
2404
  # resp = client.update_scraper({
2405
+ # scraper_id: "ScraperId", # required
1986
2406
  # alias: "ScraperAlias",
1987
- # client_token: "IdempotencyToken",
2407
+ # scrape_configuration: {
2408
+ # configuration_blob: "data",
2409
+ # },
1988
2410
  # destination: {
1989
2411
  # amp_configuration: {
1990
2412
  # workspace_arn: "WorkspaceArn", # required
@@ -1994,16 +2416,13 @@ module Aws::PrometheusService
1994
2416
  # source_role_arn: "IamRoleArn",
1995
2417
  # target_role_arn: "IamRoleArn",
1996
2418
  # },
1997
- # scrape_configuration: {
1998
- # configuration_blob: "data",
1999
- # },
2000
- # scraper_id: "ScraperId", # required
2419
+ # client_token: "IdempotencyToken",
2001
2420
  # })
2002
2421
  #
2003
2422
  # @example Response structure
2004
2423
  #
2005
- # resp.arn #=> String
2006
2424
  # resp.scraper_id #=> String
2425
+ # resp.arn #=> String
2007
2426
  # resp.status.status_code #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
2008
2427
  # resp.tags #=> Hash
2009
2428
  # resp.tags["TagKey"] #=> String
@@ -2019,6 +2438,9 @@ module Aws::PrometheusService
2019
2438
 
2020
2439
  # Updates the alias of an existing workspace.
2021
2440
  #
2441
+ # @option params [required, String] :workspace_id
2442
+ # The ID of the workspace to update.
2443
+ #
2022
2444
  # @option params [String] :alias
2023
2445
  # The new alias for the workspace. It does not need to be unique.
2024
2446
  #
@@ -2032,17 +2454,14 @@ module Aws::PrometheusService
2032
2454
  # **A suitable default value is auto-generated.** You should normally
2033
2455
  # not need to pass this option.**
2034
2456
  #
2035
- # @option params [required, String] :workspace_id
2036
- # The ID of the workspace to update.
2037
- #
2038
2457
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2039
2458
  #
2040
2459
  # @example Request syntax with placeholder values
2041
2460
  #
2042
2461
  # resp = client.update_workspace_alias({
2462
+ # workspace_id: "WorkspaceId", # required
2043
2463
  # alias: "WorkspaceAlias",
2044
2464
  # client_token: "IdempotencyToken",
2045
- # workspace_id: "WorkspaceId", # required
2046
2465
  # })
2047
2466
  #
2048
2467
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/UpdateWorkspaceAlias AWS API Documentation
@@ -2060,6 +2479,14 @@ module Aws::PrometheusService
2060
2479
  # You must specify at least one of `limitsPerLabelSet` or
2061
2480
  # `retentionPeriodInDays` for the request to be valid.
2062
2481
  #
2482
+ # @option params [required, String] :workspace_id
2483
+ # The ID of the workspace that you want to update. To find the IDs of
2484
+ # your workspaces, use the [ListWorkspaces][1] operation.
2485
+ #
2486
+ #
2487
+ #
2488
+ # [1]: https://docs.aws.amazon.com/prometheus/latest/APIReference/API_ListWorkspaces.htm
2489
+ #
2063
2490
  # @option params [String] :client_token
2064
2491
  # You can include a token in your operation to make it an idempotent
2065
2492
  # opeartion.
@@ -2077,14 +2504,6 @@ module Aws::PrometheusService
2077
2504
  # Specifies how many days that metrics will be retained in the
2078
2505
  # workspace.
2079
2506
  #
2080
- # @option params [required, String] :workspace_id
2081
- # The ID of the workspace that you want to update. To find the IDs of
2082
- # your workspaces, use the [ListWorkspaces][1] operation.
2083
- #
2084
- #
2085
- #
2086
- # [1]: https://docs.aws.amazon.com/prometheus/latest/APIReference/API_ListWorkspaces.htm
2087
- #
2088
2507
  # @return [Types::UpdateWorkspaceConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2089
2508
  #
2090
2509
  # * {Types::UpdateWorkspaceConfigurationResponse#status #status} => Types::WorkspaceConfigurationStatus
@@ -2092,19 +2511,19 @@ module Aws::PrometheusService
2092
2511
  # @example Request syntax with placeholder values
2093
2512
  #
2094
2513
  # resp = client.update_workspace_configuration({
2514
+ # workspace_id: "WorkspaceId", # required
2095
2515
  # client_token: "IdempotencyToken",
2096
2516
  # limits_per_label_set: [
2097
2517
  # {
2098
- # label_set: { # required
2099
- # "LabelName" => "LabelValue",
2100
- # },
2101
2518
  # limits: { # required
2102
2519
  # max_series: 1,
2103
2520
  # },
2521
+ # label_set: { # required
2522
+ # "LabelName" => "LabelValue",
2523
+ # },
2104
2524
  # },
2105
2525
  # ],
2106
2526
  # retention_period_in_days: 1,
2107
- # workspace_id: "WorkspaceId", # required
2108
2527
  # })
2109
2528
  #
2110
2529
  # @example Response structure
@@ -2139,7 +2558,7 @@ module Aws::PrometheusService
2139
2558
  tracer: tracer
2140
2559
  )
2141
2560
  context[:gem_name] = 'aws-sdk-prometheusservice'
2142
- context[:gem_version] = '1.56.0'
2561
+ context[:gem_version] = '1.57.0'
2143
2562
  Seahorse::Client::Request.new(handlers, context)
2144
2563
  end
2145
2564