aws-sdk-prometheusservice 1.55.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.
@@ -95,8 +95,8 @@ module Aws::PrometheusService
95
95
  # class name or an instance of a plugin class.
96
96
  #
97
97
  # @option options [required, Aws::CredentialProvider] :credentials
98
- # Your AWS credentials used for authentication. This can be an instance of any one of the
99
- # following classes:
98
+ # Your AWS credentials used for authentication. This can be any class that includes and implements
99
+ # `Aws::CredentialProvider`, or instance of any one of the following classes:
100
100
  #
101
101
  # * `Aws::Credentials` - Used for configuring static, non-refreshing
102
102
  # credentials.
@@ -124,8 +124,7 @@ module Aws::PrometheusService
124
124
  # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
125
125
  # from the Cognito Identity service.
126
126
  #
127
- # When `:credentials` are not configured directly, the following
128
- # locations will be searched for credentials:
127
+ # When `:credentials` are not configured directly, the following locations will be searched for credentials:
129
128
  #
130
129
  # * `Aws.config[:credentials]`
131
130
  #
@@ -139,12 +138,10 @@ module Aws::PrometheusService
139
138
  #
140
139
  # * `~/.aws/config`
141
140
  #
142
- # * EC2/ECS IMDS instance profile - When used by default, the timeouts
143
- # are very aggressive. Construct and pass an instance of
144
- # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
145
- # enable retries and extended timeouts. Instance profile credential
146
- # fetching can be disabled by setting `ENV['AWS_EC2_METADATA_DISABLED']`
147
- # to `true`.
141
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive.
142
+ # Construct and pass an instance of `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
143
+ # enable retries and extended timeouts. Instance profile credential fetching can be disabled by
144
+ # setting `ENV['AWS_EC2_METADATA_DISABLED']` to `true`.
148
145
  #
149
146
  # @option options [required, String] :region
150
147
  # The AWS region to connect to. The configured `:region` is
@@ -377,8 +374,8 @@ module Aws::PrometheusService
377
374
  # `Aws::Telemetry::OTelProvider` for telemetry provider.
378
375
  #
379
376
  # @option options [Aws::TokenProvider] :token_provider
380
- # Your Bearer token used for authentication. This can be an instance of any one of the
381
- # following classes:
377
+ # Your Bearer token used for authentication. This can be any class that includes and implements
378
+ # `Aws::TokenProvider`, or instance of any one of the following classes:
382
379
  #
383
380
  # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
384
381
  # tokens.
@@ -484,12 +481,8 @@ module Aws::PrometheusService
484
481
  # definition, don't use this operation to update it. Instead, use
485
482
  # `PutAlertManagerDefinition`.
486
483
  #
487
- # @option params [String] :client_token
488
- # A unique identifier that you can provide to ensure the idempotency of
489
- # the request. Case-sensitive.
490
- #
491
- # **A suitable default value is auto-generated.** You should normally
492
- # 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.
493
486
  #
494
487
  # @option params [required, String, StringIO, File] :data
495
488
  # The alert manager definition to add. A base64-encoded version of the
@@ -502,8 +495,12 @@ module Aws::PrometheusService
502
495
  #
503
496
  # [1]: https://docs.aws.amazon.com/prometheus/latest/APIReference/yaml-AlertManagerDefinitionData.html
504
497
  #
505
- # @option params [required, String] :workspace_id
506
- # 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.**
507
504
  #
508
505
  # @return [Types::CreateAlertManagerDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
509
506
  #
@@ -512,9 +509,9 @@ module Aws::PrometheusService
512
509
  # @example Request syntax with placeholder values
513
510
  #
514
511
  # resp = client.create_alert_manager_definition({
515
- # client_token: "IdempotencyToken",
516
- # data: "data", # required
517
512
  # workspace_id: "WorkspaceId", # required
513
+ # data: "data", # required
514
+ # client_token: "IdempotencyToken",
518
515
  # })
519
516
  #
520
517
  # @example Response structure
@@ -539,20 +536,20 @@ module Aws::PrometheusService
539
536
  #
540
537
  # </note>
541
538
  #
542
- # @option params [String] :client_token
543
- # A unique identifier that you can provide to ensure the idempotency of
544
- # the request. Case-sensitive.
545
- #
546
- # **A suitable default value is auto-generated.** You should normally
547
- # 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.
548
541
  #
549
542
  # @option params [required, String] :log_group_arn
550
543
  # The ARN of the CloudWatch log group to which the vended log data will
551
544
  # be published. This log group must exist prior to calling this
552
545
  # operation.
553
546
  #
554
- # @option params [required, String] :workspace_id
555
- # 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.**
556
553
  #
557
554
  # @return [Types::CreateLoggingConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
558
555
  #
@@ -561,9 +558,9 @@ module Aws::PrometheusService
561
558
  # @example Request syntax with placeholder values
562
559
  #
563
560
  # resp = client.create_logging_configuration({
564
- # client_token: "IdempotencyToken",
565
- # log_group_arn: "LogGroupArn", # required
566
561
  # workspace_id: "WorkspaceId", # required
562
+ # log_group_arn: "LogGroupArn", # required
563
+ # client_token: "IdempotencyToken",
567
564
  # })
568
565
  #
569
566
  # @example Response structure
@@ -584,6 +581,14 @@ module Aws::PrometheusService
584
581
  # This operation enables logging of queries that exceed the specified
585
582
  # QSP threshold.
586
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
+ #
587
592
  # @option params [String] :client_token
588
593
  # (Optional) A unique, case-sensitive identifier that you can provide to
589
594
  # ensure the idempotency of the request.
@@ -591,14 +596,6 @@ module Aws::PrometheusService
591
596
  # **A suitable default value is auto-generated.** You should normally
592
597
  # not need to pass this option.**
593
598
  #
594
- # @option params [required, Array<Types::LoggingDestination>] :destinations
595
- # The destinations where query logs will be sent. Only CloudWatch Logs
596
- # destination is supported. The list must contain exactly one element.
597
- #
598
- # @option params [required, String] :workspace_id
599
- # The ID of the workspace for which to create the query logging
600
- # configuration.
601
- #
602
599
  # @return [Types::CreateQueryLoggingConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
603
600
  #
604
601
  # * {Types::CreateQueryLoggingConfigurationResponse#status #status} => Types::QueryLoggingConfigurationStatus
@@ -606,7 +603,7 @@ module Aws::PrometheusService
606
603
  # @example Request syntax with placeholder values
607
604
  #
608
605
  # resp = client.create_query_logging_configuration({
609
- # client_token: "IdempotencyToken",
606
+ # workspace_id: "WorkspaceId", # required
610
607
  # destinations: [ # required
611
608
  # {
612
609
  # cloud_watch_logs: { # required
@@ -617,7 +614,7 @@ module Aws::PrometheusService
617
614
  # },
618
615
  # },
619
616
  # ],
620
- # workspace_id: "WorkspaceId", # required
617
+ # client_token: "IdempotencyToken",
621
618
  # })
622
619
  #
623
620
  # @example Response structure
@@ -643,12 +640,11 @@ module Aws::PrometheusService
643
640
  # update an existing rule groups namespace, use
644
641
  # `PutRuleGroupsNamespace`.
645
642
  #
646
- # @option params [String] :client_token
647
- # A unique identifier that you can provide to ensure the idempotency of
648
- # the request. Case-sensitive.
643
+ # @option params [required, String] :workspace_id
644
+ # The ID of the workspace to add the rule groups namespace.
649
645
  #
650
- # **A suitable default value is auto-generated.** You should normally
651
- # not need to pass this option.**
646
+ # @option params [required, String] :name
647
+ # The name for the new rule groups namespace.
652
648
  #
653
649
  # @option params [required, String, StringIO, File] :data
654
650
  # The rules file to use in the new namespace.
@@ -662,39 +658,40 @@ module Aws::PrometheusService
662
658
  #
663
659
  # [1]: https://docs.aws.amazon.com/prometheus/latest/APIReference/yaml-RuleGroupsNamespaceData.html
664
660
  #
665
- # @option params [required, String] :name
666
- # 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.**
667
667
  #
668
668
  # @option params [Hash<String,String>] :tags
669
669
  # The list of tag keys and values to associate with the rule groups
670
670
  # namespace.
671
671
  #
672
- # @option params [required, String] :workspace_id
673
- # The ID of the workspace to add the rule groups namespace.
674
- #
675
672
  # @return [Types::CreateRuleGroupsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
676
673
  #
677
- # * {Types::CreateRuleGroupsNamespaceResponse#arn #arn} => String
678
674
  # * {Types::CreateRuleGroupsNamespaceResponse#name #name} => String
675
+ # * {Types::CreateRuleGroupsNamespaceResponse#arn #arn} => String
679
676
  # * {Types::CreateRuleGroupsNamespaceResponse#status #status} => Types::RuleGroupsNamespaceStatus
680
677
  # * {Types::CreateRuleGroupsNamespaceResponse#tags #tags} => Hash&lt;String,String&gt;
681
678
  #
682
679
  # @example Request syntax with placeholder values
683
680
  #
684
681
  # resp = client.create_rule_groups_namespace({
685
- # client_token: "IdempotencyToken",
686
- # data: "data", # required
682
+ # workspace_id: "WorkspaceId", # required
687
683
  # name: "RuleGroupsNamespaceName", # required
684
+ # data: "data", # required
685
+ # client_token: "IdempotencyToken",
688
686
  # tags: {
689
687
  # "TagKey" => "TagValue",
690
688
  # },
691
- # workspace_id: "WorkspaceId", # required
692
689
  # })
693
690
  #
694
691
  # @example Response structure
695
692
  #
696
- # resp.arn #=> String
697
693
  # resp.name #=> String
694
+ # resp.arn #=> String
698
695
  # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
699
696
  # resp.status.status_reason #=> String
700
697
  # resp.tags #=> Hash
@@ -747,21 +744,6 @@ module Aws::PrometheusService
747
744
  # (optional) An alias to associate with the scraper. This is for your
748
745
  # use, and does not need to be unique.
749
746
  #
750
- # @option params [String] :client_token
751
- # (Optional) A unique, case-sensitive identifier that you can provide to
752
- # ensure the idempotency of the request.
753
- #
754
- # **A suitable default value is auto-generated.** You should normally
755
- # not need to pass this option.**
756
- #
757
- # @option params [required, Types::Destination] :destination
758
- # The Amazon Managed Service for Prometheus workspace to send metrics
759
- # to.
760
- #
761
- # @option params [Types::RoleConfiguration] :role_configuration
762
- # Use this structure to enable cross-account access, so that you can use
763
- # a target account to access Prometheus metrics from source accounts.
764
- #
765
747
  # @option params [required, Types::ScrapeConfiguration] :scrape_configuration
766
748
  # The configuration file to use in the new scraper. For more
767
749
  # information, see [Scraper configuration][1] in the *Amazon Managed
@@ -774,31 +756,78 @@ module Aws::PrometheusService
774
756
  # @option params [required, Types::Source] :source
775
757
  # The Amazon EKS cluster from which the scraper will collect metrics.
776
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
+ #
777
774
  # @option params [Hash<String,String>] :tags
778
775
  # (Optional) The list of tag keys and values to associate with the
779
776
  # scraper.
780
777
  #
781
778
  # @return [Types::CreateScraperResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
782
779
  #
783
- # * {Types::CreateScraperResponse#arn #arn} => String
784
780
  # * {Types::CreateScraperResponse#scraper_id #scraper_id} => String
781
+ # * {Types::CreateScraperResponse#arn #arn} => String
785
782
  # * {Types::CreateScraperResponse#status #status} => Types::ScraperStatus
786
783
  # * {Types::CreateScraperResponse#tags #tags} => Hash&lt;String,String&gt;
787
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
+ #
788
827
  # @example Request syntax with placeholder values
789
828
  #
790
829
  # resp = client.create_scraper({
791
830
  # alias: "ScraperAlias",
792
- # client_token: "IdempotencyToken",
793
- # destination: { # required
794
- # amp_configuration: {
795
- # workspace_arn: "WorkspaceArn", # required
796
- # },
797
- # },
798
- # role_configuration: {
799
- # source_role_arn: "IamRoleArn",
800
- # target_role_arn: "IamRoleArn",
801
- # },
802
831
  # scrape_configuration: { # required
803
832
  # configuration_blob: "data",
804
833
  # },
@@ -809,6 +838,16 @@ module Aws::PrometheusService
809
838
  # subnet_ids: ["SubnetId"], # required
810
839
  # },
811
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",
812
851
  # tags: {
813
852
  # "TagKey" => "TagValue",
814
853
  # },
@@ -816,8 +855,8 @@ module Aws::PrometheusService
816
855
  #
817
856
  # @example Response structure
818
857
  #
819
- # resp.arn #=> String
820
858
  # resp.scraper_id #=> String
859
+ # resp.arn #=> String
821
860
  # resp.status.status_code #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
822
861
  # resp.tags #=> Hash
823
862
  # resp.tags["TagKey"] #=> String
@@ -849,6 +888,9 @@ module Aws::PrometheusService
849
888
  # **A suitable default value is auto-generated.** You should normally
850
889
  # not need to pass this option.**
851
890
  #
891
+ # @option params [Hash<String,String>] :tags
892
+ # The list of tag keys and values to associate with the workspace.
893
+ #
852
894
  # @option params [String] :kms_key_arn
853
895
  # (optional) The ARN for a customer managed KMS key to use for
854
896
  # encrypting data within your workspace. For more information about
@@ -859,36 +901,33 @@ module Aws::PrometheusService
859
901
  #
860
902
  # [1]: https://docs.aws.amazon.com/prometheus/latest/userguide/encryption-at-rest-Amazon-Service-Prometheus.html
861
903
  #
862
- # @option params [Hash<String,String>] :tags
863
- # The list of tag keys and values to associate with the workspace.
864
- #
865
904
  # @return [Types::CreateWorkspaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
866
905
  #
906
+ # * {Types::CreateWorkspaceResponse#workspace_id #workspace_id} => String
867
907
  # * {Types::CreateWorkspaceResponse#arn #arn} => String
868
- # * {Types::CreateWorkspaceResponse#kms_key_arn #kms_key_arn} => String
869
908
  # * {Types::CreateWorkspaceResponse#status #status} => Types::WorkspaceStatus
870
909
  # * {Types::CreateWorkspaceResponse#tags #tags} => Hash&lt;String,String&gt;
871
- # * {Types::CreateWorkspaceResponse#workspace_id #workspace_id} => String
910
+ # * {Types::CreateWorkspaceResponse#kms_key_arn #kms_key_arn} => String
872
911
  #
873
912
  # @example Request syntax with placeholder values
874
913
  #
875
914
  # resp = client.create_workspace({
876
915
  # alias: "WorkspaceAlias",
877
916
  # client_token: "IdempotencyToken",
878
- # kms_key_arn: "KmsKeyArn",
879
917
  # tags: {
880
918
  # "TagKey" => "TagValue",
881
919
  # },
920
+ # kms_key_arn: "KmsKeyArn",
882
921
  # })
883
922
  #
884
923
  # @example Response structure
885
924
  #
925
+ # resp.workspace_id #=> String
886
926
  # resp.arn #=> String
887
- # resp.kms_key_arn #=> String
888
927
  # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED"
889
928
  # resp.tags #=> Hash
890
929
  # resp.tags["TagKey"] #=> String
891
- # resp.workspace_id #=> String
930
+ # resp.kms_key_arn #=> String
892
931
  #
893
932
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateWorkspace AWS API Documentation
894
933
  #
@@ -901,6 +940,9 @@ module Aws::PrometheusService
901
940
 
902
941
  # Deletes the alert manager definition from a workspace.
903
942
  #
943
+ # @option params [required, String] :workspace_id
944
+ # The ID of the workspace to delete the alert manager definition from.
945
+ #
904
946
  # @option params [String] :client_token
905
947
  # A unique identifier that you can provide to ensure the idempotency of
906
948
  # the request. Case-sensitive.
@@ -908,16 +950,13 @@ module Aws::PrometheusService
908
950
  # **A suitable default value is auto-generated.** You should normally
909
951
  # not need to pass this option.**
910
952
  #
911
- # @option params [required, String] :workspace_id
912
- # The ID of the workspace to delete the alert manager definition from.
913
- #
914
953
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
915
954
  #
916
955
  # @example Request syntax with placeholder values
917
956
  #
918
957
  # resp = client.delete_alert_manager_definition({
919
- # client_token: "IdempotencyToken",
920
958
  # workspace_id: "WorkspaceId", # required
959
+ # client_token: "IdempotencyToken",
921
960
  # })
922
961
  #
923
962
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteAlertManagerDefinition AWS API Documentation
@@ -935,6 +974,10 @@ module Aws::PrometheusService
935
974
  #
936
975
  # </note>
937
976
  #
977
+ # @option params [required, String] :workspace_id
978
+ # The ID of the workspace containing the logging configuration to
979
+ # delete.
980
+ #
938
981
  # @option params [String] :client_token
939
982
  # A unique identifier that you can provide to ensure the idempotency of
940
983
  # the request. Case-sensitive.
@@ -942,17 +985,13 @@ module Aws::PrometheusService
942
985
  # **A suitable default value is auto-generated.** You should normally
943
986
  # not need to pass this option.**
944
987
  #
945
- # @option params [required, String] :workspace_id
946
- # The ID of the workspace containing the logging configuration to
947
- # delete.
948
- #
949
988
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
950
989
  #
951
990
  # @example Request syntax with placeholder values
952
991
  #
953
992
  # resp = client.delete_logging_configuration({
954
- # client_token: "IdempotencyToken",
955
993
  # workspace_id: "WorkspaceId", # required
994
+ # client_token: "IdempotencyToken",
956
995
  # })
957
996
  #
958
997
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteLoggingConfiguration AWS API Documentation
@@ -966,6 +1005,10 @@ module Aws::PrometheusService
966
1005
 
967
1006
  # Deletes the query logging configuration for the specified workspace.
968
1007
  #
1008
+ # @option params [required, String] :workspace_id
1009
+ # The ID of the workspace from which to delete the query logging
1010
+ # configuration.
1011
+ #
969
1012
  # @option params [String] :client_token
970
1013
  # (Optional) A unique, case-sensitive identifier that you can provide to
971
1014
  # ensure the idempotency of the request.
@@ -973,17 +1016,13 @@ module Aws::PrometheusService
973
1016
  # **A suitable default value is auto-generated.** You should normally
974
1017
  # not need to pass this option.**
975
1018
  #
976
- # @option params [required, String] :workspace_id
977
- # The ID of the workspace from which to delete the query logging
978
- # configuration.
979
- #
980
1019
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
981
1020
  #
982
1021
  # @example Request syntax with placeholder values
983
1022
  #
984
1023
  # resp = client.delete_query_logging_configuration({
985
- # client_token: "IdempotencyToken",
986
1024
  # workspace_id: "WorkspaceId", # required
1025
+ # client_token: "IdempotencyToken",
987
1026
  # })
988
1027
  #
989
1028
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteQueryLoggingConfiguration AWS API Documentation
@@ -995,31 +1034,68 @@ module Aws::PrometheusService
995
1034
  req.send_request(options)
996
1035
  end
997
1036
 
998
- # Deletes one rule groups namespace and its associated rule groups
999
- # 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.
1000
1043
  #
1001
1044
  # @option params [String] :client_token
1002
- # A unique identifier that you can provide to ensure the idempotency of
1003
- # the request. Case-sensitive.
1045
+ # A unique, case-sensitive identifier that you provide to ensure the
1046
+ # request is safe to retry (idempotent).
1004
1047
  #
1005
1048
  # **A suitable default value is auto-generated.** You should normally
1006
1049
  # not need to pass this option.**
1007
1050
  #
1008
- # @option params [required, String] :name
1009
- # 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.
1010
1076
  #
1011
1077
  # @option params [required, String] :workspace_id
1012
1078
  # The ID of the workspace containing the rule groups namespace and
1013
1079
  # definition to delete.
1014
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
+ #
1015
1091
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1016
1092
  #
1017
1093
  # @example Request syntax with placeholder values
1018
1094
  #
1019
1095
  # resp = client.delete_rule_groups_namespace({
1020
- # client_token: "IdempotencyToken",
1021
- # name: "RuleGroupsNamespaceName", # required
1022
1096
  # workspace_id: "WorkspaceId", # required
1097
+ # name: "RuleGroupsNamespaceName", # required
1098
+ # client_token: "IdempotencyToken",
1023
1099
  # })
1024
1100
  #
1025
1101
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteRuleGroupsNamespace AWS API Documentation
@@ -1034,6 +1110,9 @@ module Aws::PrometheusService
1034
1110
  # The `DeleteScraper` operation deletes one scraper, and stops any
1035
1111
  # metrics collection that the scraper performs.
1036
1112
  #
1113
+ # @option params [required, String] :scraper_id
1114
+ # The ID of the scraper to delete.
1115
+ #
1037
1116
  # @option params [String] :client_token
1038
1117
  # (Optional) A unique, case-sensitive identifier that you can provide to
1039
1118
  # ensure the idempotency of the request.
@@ -1041,19 +1120,32 @@ module Aws::PrometheusService
1041
1120
  # **A suitable default value is auto-generated.** You should normally
1042
1121
  # not need to pass this option.**
1043
1122
  #
1044
- # @option params [required, String] :scraper_id
1045
- # The ID of the scraper to delete.
1046
- #
1047
1123
  # @return [Types::DeleteScraperResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1048
1124
  #
1049
1125
  # * {Types::DeleteScraperResponse#scraper_id #scraper_id} => String
1050
1126
  # * {Types::DeleteScraperResponse#status #status} => Types::ScraperStatus
1051
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
+ #
1052
1144
  # @example Request syntax with placeholder values
1053
1145
  #
1054
1146
  # resp = client.delete_scraper({
1055
- # client_token: "IdempotencyToken",
1056
1147
  # scraper_id: "ScraperId", # required
1148
+ # client_token: "IdempotencyToken",
1057
1149
  # })
1058
1150
  #
1059
1151
  # @example Response structure
@@ -1078,6 +1170,9 @@ module Aws::PrometheusService
1078
1170
  #
1079
1171
  # </note>
1080
1172
  #
1173
+ # @option params [required, String] :workspace_id
1174
+ # The ID of the workspace to delete.
1175
+ #
1081
1176
  # @option params [String] :client_token
1082
1177
  # A unique identifier that you can provide to ensure the idempotency of
1083
1178
  # the request. Case-sensitive.
@@ -1085,16 +1180,13 @@ module Aws::PrometheusService
1085
1180
  # **A suitable default value is auto-generated.** You should normally
1086
1181
  # not need to pass this option.**
1087
1182
  #
1088
- # @option params [required, String] :workspace_id
1089
- # The ID of the workspace to delete.
1090
- #
1091
1183
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1092
1184
  #
1093
1185
  # @example Request syntax with placeholder values
1094
1186
  #
1095
1187
  # resp = client.delete_workspace({
1096
- # client_token: "IdempotencyToken",
1097
1188
  # workspace_id: "WorkspaceId", # required
1189
+ # client_token: "IdempotencyToken",
1098
1190
  # })
1099
1191
  #
1100
1192
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DeleteWorkspace AWS API Documentation
@@ -1124,11 +1216,11 @@ module Aws::PrometheusService
1124
1216
  #
1125
1217
  # @example Response structure
1126
1218
  #
1127
- # resp.alert_manager_definition.created_at #=> Time
1128
- # resp.alert_manager_definition.data #=> String
1129
- # resp.alert_manager_definition.modified_at #=> Time
1130
1219
  # resp.alert_manager_definition.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1131
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
1132
1224
  #
1133
1225
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeAlertManagerDefinition AWS API Documentation
1134
1226
  #
@@ -1161,12 +1253,12 @@ module Aws::PrometheusService
1161
1253
  #
1162
1254
  # @example Response structure
1163
1255
  #
1164
- # resp.logging_configuration.created_at #=> Time
1165
- # resp.logging_configuration.log_group_arn #=> String
1166
- # resp.logging_configuration.modified_at #=> Time
1167
1256
  # resp.logging_configuration.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1168
1257
  # resp.logging_configuration.status.status_reason #=> String
1169
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
1170
1262
  #
1171
1263
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeLoggingConfiguration AWS API Documentation
1172
1264
  #
@@ -1196,14 +1288,14 @@ module Aws::PrometheusService
1196
1288
  #
1197
1289
  # @example Response structure
1198
1290
  #
1199
- # 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
1200
1294
  # resp.query_logging_configuration.destinations #=> Array
1201
1295
  # resp.query_logging_configuration.destinations[0].cloud_watch_logs.log_group_arn #=> String
1202
1296
  # resp.query_logging_configuration.destinations[0].filters.qsp_threshold #=> Integer
1297
+ # resp.query_logging_configuration.created_at #=> Time
1203
1298
  # resp.query_logging_configuration.modified_at #=> Time
1204
- # resp.query_logging_configuration.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1205
- # resp.query_logging_configuration.status.status_reason #=> String
1206
- # resp.query_logging_configuration.workspace #=> String
1207
1299
  #
1208
1300
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeQueryLoggingConfiguration AWS API Documentation
1209
1301
  #
@@ -1214,16 +1306,49 @@ module Aws::PrometheusService
1214
1306
  req.send_request(options)
1215
1307
  end
1216
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
+
1217
1342
  # Returns complete information about one rule groups namespace. To
1218
1343
  # retrieve a list of rule groups namespaces, use
1219
1344
  # `ListRuleGroupsNamespaces`.
1220
1345
  #
1221
- # @option params [required, String] :name
1222
- # The name of the rule groups namespace that you want information for.
1223
- #
1224
1346
  # @option params [required, String] :workspace_id
1225
1347
  # The ID of the workspace containing the rule groups namespace.
1226
1348
  #
1349
+ # @option params [required, String] :name
1350
+ # The name of the rule groups namespace that you want information for.
1351
+ #
1227
1352
  # @return [Types::DescribeRuleGroupsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1228
1353
  #
1229
1354
  # * {Types::DescribeRuleGroupsNamespaceResponse#rule_groups_namespace #rule_groups_namespace} => Types::RuleGroupsNamespaceDescription
@@ -1231,19 +1356,19 @@ module Aws::PrometheusService
1231
1356
  # @example Request syntax with placeholder values
1232
1357
  #
1233
1358
  # resp = client.describe_rule_groups_namespace({
1234
- # name: "RuleGroupsNamespaceName", # required
1235
1359
  # workspace_id: "WorkspaceId", # required
1360
+ # name: "RuleGroupsNamespaceName", # required
1236
1361
  # })
1237
1362
  #
1238
1363
  # @example Response structure
1239
1364
  #
1240
1365
  # resp.rule_groups_namespace.arn #=> String
1241
- # resp.rule_groups_namespace.created_at #=> Time
1242
- # resp.rule_groups_namespace.data #=> String
1243
- # resp.rule_groups_namespace.modified_at #=> Time
1244
1366
  # resp.rule_groups_namespace.name #=> String
1245
1367
  # resp.rule_groups_namespace.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1246
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
1247
1372
  # resp.rule_groups_namespace.tags #=> Hash
1248
1373
  # resp.rule_groups_namespace.tags["TagKey"] #=> String
1249
1374
  #
@@ -1266,6 +1391,50 @@ module Aws::PrometheusService
1266
1391
  #
1267
1392
  # * {Types::DescribeScraperResponse#scraper #scraper} => Types::ScraperDescription
1268
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
+ #
1269
1438
  # @example Request syntax with placeholder values
1270
1439
  #
1271
1440
  # resp = client.describe_scraper({
@@ -1275,24 +1444,24 @@ module Aws::PrometheusService
1275
1444
  # @example Response structure
1276
1445
  #
1277
1446
  # resp.scraper.alias #=> String
1447
+ # resp.scraper.scraper_id #=> String
1278
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"
1279
1451
  # resp.scraper.created_at #=> Time
1280
- # resp.scraper.destination.amp_configuration.workspace_arn #=> String
1281
1452
  # resp.scraper.last_modified_at #=> Time
1282
- # resp.scraper.role_arn #=> String
1283
- # resp.scraper.role_configuration.source_role_arn #=> String
1284
- # 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
1285
1456
  # resp.scraper.scrape_configuration.configuration_blob #=> String
1286
- # resp.scraper.scraper_id #=> String
1287
1457
  # resp.scraper.source.eks_configuration.cluster_arn #=> String
1288
1458
  # resp.scraper.source.eks_configuration.security_group_ids #=> Array
1289
1459
  # resp.scraper.source.eks_configuration.security_group_ids[0] #=> String
1290
1460
  # resp.scraper.source.eks_configuration.subnet_ids #=> Array
1291
1461
  # resp.scraper.source.eks_configuration.subnet_ids[0] #=> String
1292
- # resp.scraper.status.status_code #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
1293
- # resp.scraper.status_reason #=> String
1294
- # resp.scraper.tags #=> Hash
1295
- # 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
1296
1465
  #
1297
1466
  #
1298
1467
  # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
@@ -1326,15 +1495,15 @@ module Aws::PrometheusService
1326
1495
  #
1327
1496
  # @example Response structure
1328
1497
  #
1498
+ # resp.workspace.workspace_id #=> String
1329
1499
  # resp.workspace.alias #=> String
1330
1500
  # resp.workspace.arn #=> String
1331
- # resp.workspace.created_at #=> Time
1332
- # resp.workspace.kms_key_arn #=> String
1333
- # resp.workspace.prometheus_endpoint #=> String
1334
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
1335
1504
  # resp.workspace.tags #=> Hash
1336
1505
  # resp.workspace.tags["TagKey"] #=> String
1337
- # resp.workspace.workspace_id #=> String
1506
+ # resp.workspace.kms_key_arn #=> String
1338
1507
  #
1339
1508
  #
1340
1509
  # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
@@ -1376,13 +1545,13 @@ module Aws::PrometheusService
1376
1545
  #
1377
1546
  # @example Response structure
1378
1547
  #
1548
+ # resp.workspace_configuration.status.status_code #=> String, one of "ACTIVE", "UPDATING", "UPDATE_FAILED"
1549
+ # resp.workspace_configuration.status.status_reason #=> String
1379
1550
  # resp.workspace_configuration.limits_per_label_set #=> Array
1551
+ # resp.workspace_configuration.limits_per_label_set[0].limits.max_series #=> Integer
1380
1552
  # resp.workspace_configuration.limits_per_label_set[0].label_set #=> Hash
1381
1553
  # resp.workspace_configuration.limits_per_label_set[0].label_set["LabelName"] #=> String
1382
- # resp.workspace_configuration.limits_per_label_set[0].limits.max_series #=> Integer
1383
1554
  # resp.workspace_configuration.retention_period_in_days #=> Integer
1384
- # resp.workspace_configuration.status.status_code #=> String, one of "ACTIVE", "UPDATING", "UPDATE_FAILED"
1385
- # resp.workspace_configuration.status.status_reason #=> String
1386
1555
  #
1387
1556
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeWorkspaceConfiguration AWS API Documentation
1388
1557
  #
@@ -1400,6 +1569,17 @@ module Aws::PrometheusService
1400
1569
  #
1401
1570
  # * {Types::GetDefaultScraperConfigurationResponse#configuration #configuration} => String
1402
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
+ #
1403
1583
  # @example Response structure
1404
1584
  #
1405
1585
  # resp.configuration #=> String
@@ -1415,8 +1595,8 @@ module Aws::PrometheusService
1415
1595
 
1416
1596
  # Returns a list of rule groups namespaces in a workspace.
1417
1597
  #
1418
- # @option params [Integer] :max_results
1419
- # 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.
1420
1600
  #
1421
1601
  # @option params [String] :name
1422
1602
  # Use this parameter to filter the rule groups namespaces that are
@@ -1433,37 +1613,37 @@ module Aws::PrometheusService
1433
1613
  # will return 10 and a `nextToken`. Using the next token in a subsequent
1434
1614
  # call will return the remaining 2 namespaces.
1435
1615
  #
1436
- # @option params [required, String] :workspace_id
1437
- # 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.
1438
1618
  #
1439
1619
  # @return [Types::ListRuleGroupsNamespacesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1440
1620
  #
1441
- # * {Types::ListRuleGroupsNamespacesResponse#next_token #next_token} => String
1442
1621
  # * {Types::ListRuleGroupsNamespacesResponse#rule_groups_namespaces #rule_groups_namespaces} => Array&lt;Types::RuleGroupsNamespaceSummary&gt;
1622
+ # * {Types::ListRuleGroupsNamespacesResponse#next_token #next_token} => String
1443
1623
  #
1444
1624
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1445
1625
  #
1446
1626
  # @example Request syntax with placeholder values
1447
1627
  #
1448
1628
  # resp = client.list_rule_groups_namespaces({
1449
- # max_results: 1,
1629
+ # workspace_id: "WorkspaceId", # required
1450
1630
  # name: "RuleGroupsNamespaceName",
1451
1631
  # next_token: "PaginationToken",
1452
- # workspace_id: "WorkspaceId", # required
1632
+ # max_results: 1,
1453
1633
  # })
1454
1634
  #
1455
1635
  # @example Response structure
1456
1636
  #
1457
- # resp.next_token #=> String
1458
1637
  # resp.rule_groups_namespaces #=> Array
1459
1638
  # resp.rule_groups_namespaces[0].arn #=> String
1460
- # resp.rule_groups_namespaces[0].created_at #=> Time
1461
- # resp.rule_groups_namespaces[0].modified_at #=> Time
1462
1639
  # resp.rule_groups_namespaces[0].name #=> String
1463
1640
  # resp.rule_groups_namespaces[0].status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1464
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
1465
1644
  # resp.rule_groups_namespaces[0].tags #=> Hash
1466
1645
  # resp.rule_groups_namespaces[0].tags["TagKey"] #=> String
1646
+ # resp.next_token #=> String
1467
1647
  #
1468
1648
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListRuleGroupsNamespaces AWS API Documentation
1469
1649
  #
@@ -1497,55 +1677,181 @@ module Aws::PrometheusService
1497
1677
  # If this is included, it filters the results to only the scrapers that
1498
1678
  # match the filter.
1499
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
+ #
1500
1684
  # @option params [Integer] :max_results
1501
1685
  # Optional) The maximum number of scrapers to return in one
1502
1686
  # `ListScrapers` operation. The range is 1-1000.
1503
1687
  #
1504
1688
  # If you omit this parameter, the default of 100 is used.
1505
1689
  #
1506
- # @option params [String] :next_token
1507
- # (Optional) The token for the next set of items to return. (You
1508
- # received this token from a previous call.)
1509
- #
1510
1690
  # @return [Types::ListScrapersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1511
1691
  #
1512
- # * {Types::ListScrapersResponse#next_token #next_token} => String
1513
1692
  # * {Types::ListScrapersResponse#scrapers #scrapers} => Array&lt;Types::ScraperSummary&gt;
1693
+ # * {Types::ListScrapersResponse#next_token #next_token} => String
1514
1694
  #
1515
1695
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1516
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
+ #
1517
1823
  # @example Request syntax with placeholder values
1518
1824
  #
1519
1825
  # resp = client.list_scrapers({
1520
1826
  # filters: {
1521
1827
  # "FilterKey" => ["FilterValue"],
1522
1828
  # },
1523
- # max_results: 1,
1524
1829
  # next_token: "PaginationToken",
1830
+ # max_results: 1,
1525
1831
  # })
1526
1832
  #
1527
1833
  # @example Response structure
1528
1834
  #
1529
- # resp.next_token #=> String
1530
1835
  # resp.scrapers #=> Array
1531
1836
  # resp.scrapers[0].alias #=> String
1837
+ # resp.scrapers[0].scraper_id #=> String
1532
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"
1533
1841
  # resp.scrapers[0].created_at #=> Time
1534
- # resp.scrapers[0].destination.amp_configuration.workspace_arn #=> String
1535
1842
  # resp.scrapers[0].last_modified_at #=> Time
1536
- # resp.scrapers[0].role_arn #=> String
1537
- # resp.scrapers[0].role_configuration.source_role_arn #=> String
1538
- # resp.scrapers[0].role_configuration.target_role_arn #=> String
1539
- # 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
1540
1846
  # resp.scrapers[0].source.eks_configuration.cluster_arn #=> String
1541
1847
  # resp.scrapers[0].source.eks_configuration.security_group_ids #=> Array
1542
1848
  # resp.scrapers[0].source.eks_configuration.security_group_ids[0] #=> String
1543
1849
  # resp.scrapers[0].source.eks_configuration.subnet_ids #=> Array
1544
1850
  # resp.scrapers[0].source.eks_configuration.subnet_ids[0] #=> String
1545
- # resp.scrapers[0].status.status_code #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
1546
- # resp.scrapers[0].status_reason #=> String
1547
- # resp.scrapers[0].tags #=> Hash
1548
- # 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
1549
1855
  #
1550
1856
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListScrapers AWS API Documentation
1551
1857
  #
@@ -1592,6 +1898,16 @@ module Aws::PrometheusService
1592
1898
  # Lists all of the Amazon Managed Service for Prometheus workspaces in
1593
1899
  # your account. This includes workspaces being created or deleted.
1594
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
+ #
1595
1911
  # @option params [String] :alias
1596
1912
  # If this is included, it filters the results to only the workspaces
1597
1913
  # with names that start with the value that you specify here.
@@ -1603,43 +1919,33 @@ module Aws::PrometheusService
1603
1919
  # The maximum number of workspaces to return per request. The default is
1604
1920
  # 100.
1605
1921
  #
1606
- # @option params [String] :next_token
1607
- # The token for the next set of items to return. You receive this token
1608
- # from a previous call, and use it to get the next page of results. The
1609
- # other parameters must be the same as the initial call.
1610
- #
1611
- # For example, if your initial request has `maxResults` of 10, and there
1612
- # are 12 workspaces to return, then your initial request will return 10
1613
- # and a `nextToken`. Using the next token in a subsequent call will
1614
- # return the remaining 2 workspaces.
1615
- #
1616
1922
  # @return [Types::ListWorkspacesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1617
1923
  #
1618
- # * {Types::ListWorkspacesResponse#next_token #next_token} => String
1619
1924
  # * {Types::ListWorkspacesResponse#workspaces #workspaces} => Array&lt;Types::WorkspaceSummary&gt;
1925
+ # * {Types::ListWorkspacesResponse#next_token #next_token} => String
1620
1926
  #
1621
1927
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1622
1928
  #
1623
1929
  # @example Request syntax with placeholder values
1624
1930
  #
1625
1931
  # resp = client.list_workspaces({
1932
+ # next_token: "PaginationToken",
1626
1933
  # alias: "WorkspaceAlias",
1627
1934
  # max_results: 1,
1628
- # next_token: "PaginationToken",
1629
1935
  # })
1630
1936
  #
1631
1937
  # @example Response structure
1632
1938
  #
1633
- # resp.next_token #=> String
1634
1939
  # resp.workspaces #=> Array
1940
+ # resp.workspaces[0].workspace_id #=> String
1635
1941
  # resp.workspaces[0].alias #=> String
1636
1942
  # resp.workspaces[0].arn #=> String
1637
- # resp.workspaces[0].created_at #=> Time
1638
- # resp.workspaces[0].kms_key_arn #=> String
1639
1943
  # resp.workspaces[0].status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED"
1944
+ # resp.workspaces[0].created_at #=> Time
1640
1945
  # resp.workspaces[0].tags #=> Hash
1641
1946
  # resp.workspaces[0].tags["TagKey"] #=> String
1642
- # resp.workspaces[0].workspace_id #=> String
1947
+ # resp.workspaces[0].kms_key_arn #=> String
1948
+ # resp.next_token #=> String
1643
1949
  #
1644
1950
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/ListWorkspaces AWS API Documentation
1645
1951
  #
@@ -1655,12 +1961,8 @@ module Aws::PrometheusService
1655
1961
  # use this operation to create it. Instead, use
1656
1962
  # `CreateAlertManagerDefinition`.
1657
1963
  #
1658
- # @option params [String] :client_token
1659
- # A unique identifier that you can provide to ensure the idempotency of
1660
- # the request. Case-sensitive.
1661
- #
1662
- # **A suitable default value is auto-generated.** You should normally
1663
- # 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.
1664
1966
  #
1665
1967
  # @option params [required, String, StringIO, File] :data
1666
1968
  # The alert manager definition to use. A base64-encoded version of the
@@ -1673,8 +1975,12 @@ module Aws::PrometheusService
1673
1975
  #
1674
1976
  # [1]: https://docs.aws.amazon.com/prometheus/latest/APIReference/yaml-AlertManagerDefinitionData.html
1675
1977
  #
1676
- # @option params [required, String] :workspace_id
1677
- # 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.**
1678
1984
  #
1679
1985
  # @return [Types::PutAlertManagerDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1680
1986
  #
@@ -1683,9 +1989,9 @@ module Aws::PrometheusService
1683
1989
  # @example Request syntax with placeholder values
1684
1990
  #
1685
1991
  # resp = client.put_alert_manager_definition({
1686
- # client_token: "IdempotencyToken",
1687
- # data: "data", # required
1688
1992
  # workspace_id: "WorkspaceId", # required
1993
+ # data: "data", # required
1994
+ # client_token: "IdempotencyToken",
1689
1995
  # })
1690
1996
  #
1691
1997
  # @example Response structure
@@ -1702,6 +2008,87 @@ module Aws::PrometheusService
1702
2008
  req.send_request(options)
1703
2009
  end
1704
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
+
1705
2092
  # Updates an existing rule groups namespace within a workspace. A rule
1706
2093
  # groups namespace is associated with exactly one rules file. A
1707
2094
  # workspace can have multiple rule groups namespaces.
@@ -1712,12 +2099,12 @@ module Aws::PrometheusService
1712
2099
  # You can't use this operation to add tags to an existing rule groups
1713
2100
  # namespace. Instead, use `TagResource`.
1714
2101
  #
1715
- # @option params [String] :client_token
1716
- # A unique identifier that you can provide to ensure the idempotency of
1717
- # 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.
1718
2105
  #
1719
- # **A suitable default value is auto-generated.** You should normally
1720
- # not need to pass this option.**
2106
+ # @option params [required, String] :name
2107
+ # The name of the rule groups namespace that you are updating.
1721
2108
  #
1722
2109
  # @option params [required, String, StringIO, File] :data
1723
2110
  # The new rules file to use in the namespace. A base64-encoded version
@@ -1730,33 +2117,33 @@ module Aws::PrometheusService
1730
2117
  #
1731
2118
  # [1]: https://docs.aws.amazon.com/prometheus/latest/APIReference/yaml-RuleGroupsNamespaceData.html
1732
2119
  #
1733
- # @option params [required, String] :name
1734
- # 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.
1735
2123
  #
1736
- # @option params [required, String] :workspace_id
1737
- # The ID of the workspace where you are updating the rule groups
1738
- # namespace.
2124
+ # **A suitable default value is auto-generated.** You should normally
2125
+ # not need to pass this option.**
1739
2126
  #
1740
2127
  # @return [Types::PutRuleGroupsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1741
2128
  #
1742
- # * {Types::PutRuleGroupsNamespaceResponse#arn #arn} => String
1743
2129
  # * {Types::PutRuleGroupsNamespaceResponse#name #name} => String
2130
+ # * {Types::PutRuleGroupsNamespaceResponse#arn #arn} => String
1744
2131
  # * {Types::PutRuleGroupsNamespaceResponse#status #status} => Types::RuleGroupsNamespaceStatus
1745
2132
  # * {Types::PutRuleGroupsNamespaceResponse#tags #tags} => Hash&lt;String,String&gt;
1746
2133
  #
1747
2134
  # @example Request syntax with placeholder values
1748
2135
  #
1749
2136
  # resp = client.put_rule_groups_namespace({
1750
- # client_token: "IdempotencyToken",
1751
- # data: "data", # required
1752
- # name: "RuleGroupsNamespaceName", # required
1753
2137
  # workspace_id: "WorkspaceId", # required
2138
+ # name: "RuleGroupsNamespaceName", # required
2139
+ # data: "data", # required
2140
+ # client_token: "IdempotencyToken",
1754
2141
  # })
1755
2142
  #
1756
2143
  # @example Response structure
1757
2144
  #
1758
- # resp.arn #=> String
1759
2145
  # resp.name #=> String
2146
+ # resp.arn #=> String
1760
2147
  # resp.status.status_code #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "CREATION_FAILED", "UPDATE_FAILED"
1761
2148
  # resp.status.status_reason #=> String
1762
2149
  # resp.tags #=> Hash
@@ -1844,6 +2231,13 @@ module Aws::PrometheusService
1844
2231
  #
1845
2232
  # </note>
1846
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
+ #
1847
2241
  # @option params [String] :client_token
1848
2242
  # A unique identifier that you can provide to ensure the idempotency of
1849
2243
  # the request. Case-sensitive.
@@ -1851,13 +2245,6 @@ module Aws::PrometheusService
1851
2245
  # **A suitable default value is auto-generated.** You should normally
1852
2246
  # not need to pass this option.**
1853
2247
  #
1854
- # @option params [required, String] :log_group_arn
1855
- # The ARN of the CloudWatch log group to which the vended log data will
1856
- # be published.
1857
- #
1858
- # @option params [required, String] :workspace_id
1859
- # The ID of the workspace to update the logging configuration for.
1860
- #
1861
2248
  # @return [Types::UpdateLoggingConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1862
2249
  #
1863
2250
  # * {Types::UpdateLoggingConfigurationResponse#status #status} => Types::LoggingConfigurationStatus
@@ -1865,9 +2252,9 @@ module Aws::PrometheusService
1865
2252
  # @example Request syntax with placeholder values
1866
2253
  #
1867
2254
  # resp = client.update_logging_configuration({
1868
- # client_token: "IdempotencyToken",
1869
- # log_group_arn: "LogGroupArn", # required
1870
2255
  # workspace_id: "WorkspaceId", # required
2256
+ # log_group_arn: "LogGroupArn", # required
2257
+ # client_token: "IdempotencyToken",
1871
2258
  # })
1872
2259
  #
1873
2260
  # @example Response structure
@@ -1886,6 +2273,14 @@ module Aws::PrometheusService
1886
2273
 
1887
2274
  # Updates the query logging configuration for the specified workspace.
1888
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
+ #
1889
2284
  # @option params [String] :client_token
1890
2285
  # (Optional) A unique, case-sensitive identifier that you can provide to
1891
2286
  # ensure the idempotency of the request.
@@ -1893,14 +2288,6 @@ module Aws::PrometheusService
1893
2288
  # **A suitable default value is auto-generated.** You should normally
1894
2289
  # not need to pass this option.**
1895
2290
  #
1896
- # @option params [required, Array<Types::LoggingDestination>] :destinations
1897
- # The destinations where query logs will be sent. Only CloudWatch Logs
1898
- # destination is supported. The list must contain exactly one element.
1899
- #
1900
- # @option params [required, String] :workspace_id
1901
- # The ID of the workspace for which to update the query logging
1902
- # configuration.
1903
- #
1904
2291
  # @return [Types::UpdateQueryLoggingConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1905
2292
  #
1906
2293
  # * {Types::UpdateQueryLoggingConfigurationResponse#status #status} => Types::QueryLoggingConfigurationStatus
@@ -1908,7 +2295,7 @@ module Aws::PrometheusService
1908
2295
  # @example Request syntax with placeholder values
1909
2296
  #
1910
2297
  # resp = client.update_query_logging_configuration({
1911
- # client_token: "IdempotencyToken",
2298
+ # workspace_id: "WorkspaceId", # required
1912
2299
  # destinations: [ # required
1913
2300
  # {
1914
2301
  # cloud_watch_logs: { # required
@@ -1919,7 +2306,7 @@ module Aws::PrometheusService
1919
2306
  # },
1920
2307
  # },
1921
2308
  # ],
1922
- # workspace_id: "WorkspaceId", # required
2309
+ # client_token: "IdempotencyToken",
1923
2310
  # })
1924
2311
  #
1925
2312
  # @example Response structure
@@ -1942,24 +2329,12 @@ module Aws::PrometheusService
1942
2329
  # scraper is collecting metrics. To change the source, delete the
1943
2330
  # scraper and create a new one.
1944
2331
  #
2332
+ # @option params [required, String] :scraper_id
2333
+ # The ID of the scraper to update.
2334
+ #
1945
2335
  # @option params [String] :alias
1946
2336
  # The new alias of the scraper.
1947
2337
  #
1948
- # @option params [String] :client_token
1949
- # A unique identifier that you can provide to ensure the idempotency of
1950
- # the request. Case-sensitive.
1951
- #
1952
- # **A suitable default value is auto-generated.** You should normally
1953
- # not need to pass this option.**
1954
- #
1955
- # @option params [Types::Destination] :destination
1956
- # The new Amazon Managed Service for Prometheus workspace to send
1957
- # metrics to.
1958
- #
1959
- # @option params [Types::RoleConfiguration] :role_configuration
1960
- # Use this structure to enable cross-account access, so that you can use
1961
- # a target account to access Prometheus metrics from source accounts.
1962
- #
1963
2338
  # @option params [Types::ScrapeConfiguration] :scrape_configuration
1964
2339
  # Contains the base-64 encoded YAML configuration for the scraper.
1965
2340
  #
@@ -1973,21 +2348,65 @@ module Aws::PrometheusService
1973
2348
  #
1974
2349
  # [1]: https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html
1975
2350
  #
1976
- # @option params [required, String] :scraper_id
1977
- # 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.**
1978
2365
  #
1979
2366
  # @return [Types::UpdateScraperResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1980
2367
  #
1981
- # * {Types::UpdateScraperResponse#arn #arn} => String
1982
2368
  # * {Types::UpdateScraperResponse#scraper_id #scraper_id} => String
2369
+ # * {Types::UpdateScraperResponse#arn #arn} => String
1983
2370
  # * {Types::UpdateScraperResponse#status #status} => Types::ScraperStatus
1984
2371
  # * {Types::UpdateScraperResponse#tags #tags} => Hash&lt;String,String&gt;
1985
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
+ #
1986
2402
  # @example Request syntax with placeholder values
1987
2403
  #
1988
2404
  # resp = client.update_scraper({
2405
+ # scraper_id: "ScraperId", # required
1989
2406
  # alias: "ScraperAlias",
1990
- # client_token: "IdempotencyToken",
2407
+ # scrape_configuration: {
2408
+ # configuration_blob: "data",
2409
+ # },
1991
2410
  # destination: {
1992
2411
  # amp_configuration: {
1993
2412
  # workspace_arn: "WorkspaceArn", # required
@@ -1997,16 +2416,13 @@ module Aws::PrometheusService
1997
2416
  # source_role_arn: "IamRoleArn",
1998
2417
  # target_role_arn: "IamRoleArn",
1999
2418
  # },
2000
- # scrape_configuration: {
2001
- # configuration_blob: "data",
2002
- # },
2003
- # scraper_id: "ScraperId", # required
2419
+ # client_token: "IdempotencyToken",
2004
2420
  # })
2005
2421
  #
2006
2422
  # @example Response structure
2007
2423
  #
2008
- # resp.arn #=> String
2009
2424
  # resp.scraper_id #=> String
2425
+ # resp.arn #=> String
2010
2426
  # resp.status.status_code #=> String, one of "CREATING", "UPDATING", "ACTIVE", "DELETING", "CREATION_FAILED", "UPDATE_FAILED", "DELETION_FAILED"
2011
2427
  # resp.tags #=> Hash
2012
2428
  # resp.tags["TagKey"] #=> String
@@ -2022,6 +2438,9 @@ module Aws::PrometheusService
2022
2438
 
2023
2439
  # Updates the alias of an existing workspace.
2024
2440
  #
2441
+ # @option params [required, String] :workspace_id
2442
+ # The ID of the workspace to update.
2443
+ #
2025
2444
  # @option params [String] :alias
2026
2445
  # The new alias for the workspace. It does not need to be unique.
2027
2446
  #
@@ -2035,17 +2454,14 @@ module Aws::PrometheusService
2035
2454
  # **A suitable default value is auto-generated.** You should normally
2036
2455
  # not need to pass this option.**
2037
2456
  #
2038
- # @option params [required, String] :workspace_id
2039
- # The ID of the workspace to update.
2040
- #
2041
2457
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2042
2458
  #
2043
2459
  # @example Request syntax with placeholder values
2044
2460
  #
2045
2461
  # resp = client.update_workspace_alias({
2462
+ # workspace_id: "WorkspaceId", # required
2046
2463
  # alias: "WorkspaceAlias",
2047
2464
  # client_token: "IdempotencyToken",
2048
- # workspace_id: "WorkspaceId", # required
2049
2465
  # })
2050
2466
  #
2051
2467
  # @see http://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/UpdateWorkspaceAlias AWS API Documentation
@@ -2063,6 +2479,14 @@ module Aws::PrometheusService
2063
2479
  # You must specify at least one of `limitsPerLabelSet` or
2064
2480
  # `retentionPeriodInDays` for the request to be valid.
2065
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
+ #
2066
2490
  # @option params [String] :client_token
2067
2491
  # You can include a token in your operation to make it an idempotent
2068
2492
  # opeartion.
@@ -2080,14 +2504,6 @@ module Aws::PrometheusService
2080
2504
  # Specifies how many days that metrics will be retained in the
2081
2505
  # workspace.
2082
2506
  #
2083
- # @option params [required, String] :workspace_id
2084
- # The ID of the workspace that you want to update. To find the IDs of
2085
- # your workspaces, use the [ListWorkspaces][1] operation.
2086
- #
2087
- #
2088
- #
2089
- # [1]: https://docs.aws.amazon.com/prometheus/latest/APIReference/API_ListWorkspaces.htm
2090
- #
2091
2507
  # @return [Types::UpdateWorkspaceConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2092
2508
  #
2093
2509
  # * {Types::UpdateWorkspaceConfigurationResponse#status #status} => Types::WorkspaceConfigurationStatus
@@ -2095,19 +2511,19 @@ module Aws::PrometheusService
2095
2511
  # @example Request syntax with placeholder values
2096
2512
  #
2097
2513
  # resp = client.update_workspace_configuration({
2514
+ # workspace_id: "WorkspaceId", # required
2098
2515
  # client_token: "IdempotencyToken",
2099
2516
  # limits_per_label_set: [
2100
2517
  # {
2101
- # label_set: { # required
2102
- # "LabelName" => "LabelValue",
2103
- # },
2104
2518
  # limits: { # required
2105
2519
  # max_series: 1,
2106
2520
  # },
2521
+ # label_set: { # required
2522
+ # "LabelName" => "LabelValue",
2523
+ # },
2107
2524
  # },
2108
2525
  # ],
2109
2526
  # retention_period_in_days: 1,
2110
- # workspace_id: "WorkspaceId", # required
2111
2527
  # })
2112
2528
  #
2113
2529
  # @example Response structure
@@ -2142,7 +2558,7 @@ module Aws::PrometheusService
2142
2558
  tracer: tracer
2143
2559
  )
2144
2560
  context[:gem_name] = 'aws-sdk-prometheusservice'
2145
- context[:gem_version] = '1.55.0'
2561
+ context[:gem_version] = '1.57.0'
2146
2562
  Seahorse::Client::Request.new(handlers, context)
2147
2563
  end
2148
2564