aws-sdk-managedgrafana 1.28.0 → 1.29.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2bdd4fa674933701a77c180776abf95df58ae4b3880ce47489874bbf16a82924
4
- data.tar.gz: 5bf44965fd1b19c520bd0a99b9163a869a7b24ebef41a1dc1aba36d993990bef
3
+ metadata.gz: 4e61eb56c39cf0c49b86c6e0dfae6ace8cdd8656255c7569cf19203c9e5bedd1
4
+ data.tar.gz: 42d0589a42fdb8395145ea1e0540bfa597d27fbba9020ad75fc4b43c583f8df9
5
5
  SHA512:
6
- metadata.gz: cd374c154472b6dfd2332d65416930957af516dbbd2db2daac152eb932efe8d64703f6256fbaff1bc1ac78b5065e56a310cc5c76b38c5947cf06e57c346767b2
7
- data.tar.gz: f484f359028a4f370a9d424003a1c2d9fc49635c52751ef9cbd71c3eec31f2132c3824ad17386f3e84a05d72316dc1ffbbb20d0a7fa68eb48b7ed4b70a19e4e1
6
+ metadata.gz: e75211b05f2fe570fc38b35520c76097aea959d56f44307bdaa70f0642fcc2c8df616925b8aef3931556ddc119cd9a0ca55ddac3e495d724c58f423e7f732f38
7
+ data.tar.gz: 1033e64d7aace24b5d373bc25176f3aa3bbd3064683aa5e654cb43111caf63419ffb99caf4e7d50efd47160d3d309fb6982e77a59fcb2602e5b0f16ff3894fa6
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.29.0 (2024-05-15)
5
+ ------------------
6
+
7
+ * Feature - This release adds new ServiceAccount and ServiceAccountToken APIs.
8
+
4
9
  1.28.0 (2024-05-13)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.28.0
1
+ 1.29.0
@@ -413,9 +413,11 @@ module Aws::ManagedGrafana
413
413
 
414
414
  # @!group API Operations
415
415
 
416
- # Assigns a Grafana Enterprise license to a workspace. Upgrading to
417
- # Grafana Enterprise incurs additional fees. For more information, see
418
- # [Upgrade a workspace to Grafana Enterprise][1].
416
+ # Assigns a Grafana Enterprise license to a workspace. To upgrade, you
417
+ # must use `ENTERPRISE` for the `licenseType`, and pass in a valid
418
+ # Grafana Labs token for the `grafanaToken`. Upgrading to Grafana
419
+ # Enterprise incurs additional fees. For more information, see [Upgrade
420
+ # a workspace to Grafana Enterprise][1].
419
421
  #
420
422
  #
421
423
  #
@@ -423,8 +425,8 @@ module Aws::ManagedGrafana
423
425
  #
424
426
  # @option params [String] :grafana_token
425
427
  # A token from Grafana Labs that ties your Amazon Web Services account
426
- # with a Grafana Labs account. For more information, see [Register with
427
- # Grafana Labs][1].
428
+ # with a Grafana Labs account. For more information, see [Link your
429
+ # account with Grafana Labs][1].
428
430
  #
429
431
  #
430
432
  #
@@ -554,7 +556,7 @@ module Aws::ManagedGrafana
554
556
  #
555
557
  # @option params [String] :grafana_version
556
558
  # Specifies the version of Grafana to support in the new workspace. If
557
- # not specified, defaults to the latest version (for example, 9.4).
559
+ # not specified, defaults to the latest version (for example, 10.4).
558
560
  #
559
561
  # To get a list of supported versions, use the `ListVersions` operation.
560
562
  #
@@ -735,6 +737,12 @@ module Aws::ManagedGrafana
735
737
  # [https://docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html][1]
736
738
  # for available APIs and example requests.
737
739
  #
740
+ # <note markdown="1"> In workspaces compatible with Grafana version 9 or above, use
741
+ # workspace service accounts instead of API keys. API keys will be
742
+ # removed in a future release.
743
+ #
744
+ # </note>
745
+ #
738
746
  #
739
747
  #
740
748
  # [1]: https://docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html
@@ -746,7 +754,7 @@ module Aws::ManagedGrafana
746
754
  # @option params [required, String] :key_role
747
755
  # Specifies the permission level of the key.
748
756
  #
749
- # Valid values: `VIEWER`\|`EDITOR`\|`ADMIN`
757
+ # Valid values: `ADMIN`\|`EDITOR`\|`VIEWER`
750
758
  #
751
759
  # @option params [required, Integer] :seconds_to_live
752
760
  # Specifies the time in seconds until the key expires. Keys can be valid
@@ -785,6 +793,143 @@ module Aws::ManagedGrafana
785
793
  req.send_request(options)
786
794
  end
787
795
 
796
+ # Creates a service account for the workspace. A service account can be
797
+ # used to call Grafana HTTP APIs, and run automated workloads. After
798
+ # creating the service account with the correct `GrafanaRole` for your
799
+ # use case, use `CreateWorkspaceServiceAccountToken` to create a token
800
+ # that can be used to authenticate and authorize Grafana HTTP API calls.
801
+ #
802
+ # You can only create service accounts for workspaces that are
803
+ # compatible with Grafana version 9 and above.
804
+ #
805
+ # <note markdown="1"> For more information about service accounts, see [Service accounts][1]
806
+ # in the *Amazon Managed Grafana User Guide*.
807
+ #
808
+ # For more information about the Grafana HTTP APIs, see [Using Grafana
809
+ # HTTP APIs][2] in the *Amazon Managed Grafana User Guide*.
810
+ #
811
+ # </note>
812
+ #
813
+ #
814
+ #
815
+ # [1]: https://docs.aws.amazon.com/grafana/latest/userguide/service-accounts.html
816
+ # [2]: https://docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html
817
+ #
818
+ # @option params [required, String] :grafana_role
819
+ # The permission level to use for this service account.
820
+ #
821
+ # <note markdown="1"> For more information about the roles and the permissions each has, see
822
+ # [User roles][1] in the *Amazon Managed Grafana User Guide*.
823
+ #
824
+ # </note>
825
+ #
826
+ #
827
+ #
828
+ # [1]: https://docs.aws.amazon.com/grafana/latest/userguide/Grafana-user-roles.html
829
+ #
830
+ # @option params [required, String] :name
831
+ # A name for the service account. The name must be unique within the
832
+ # workspace, as it determines the ID associated with the service
833
+ # account.
834
+ #
835
+ # @option params [required, String] :workspace_id
836
+ # The ID of the workspace within which to create the service account.
837
+ #
838
+ # @return [Types::CreateWorkspaceServiceAccountResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
839
+ #
840
+ # * {Types::CreateWorkspaceServiceAccountResponse#grafana_role #grafana_role} => String
841
+ # * {Types::CreateWorkspaceServiceAccountResponse#id #id} => String
842
+ # * {Types::CreateWorkspaceServiceAccountResponse#name #name} => String
843
+ # * {Types::CreateWorkspaceServiceAccountResponse#workspace_id #workspace_id} => String
844
+ #
845
+ # @example Request syntax with placeholder values
846
+ #
847
+ # resp = client.create_workspace_service_account({
848
+ # grafana_role: "ADMIN", # required, accepts ADMIN, EDITOR, VIEWER
849
+ # name: "ServiceAccountName", # required
850
+ # workspace_id: "WorkspaceId", # required
851
+ # })
852
+ #
853
+ # @example Response structure
854
+ #
855
+ # resp.grafana_role #=> String, one of "ADMIN", "EDITOR", "VIEWER"
856
+ # resp.id #=> String
857
+ # resp.name #=> String
858
+ # resp.workspace_id #=> String
859
+ #
860
+ # @see http://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/CreateWorkspaceServiceAccount AWS API Documentation
861
+ #
862
+ # @overload create_workspace_service_account(params = {})
863
+ # @param [Hash] params ({})
864
+ def create_workspace_service_account(params = {}, options = {})
865
+ req = build_request(:create_workspace_service_account, params)
866
+ req.send_request(options)
867
+ end
868
+
869
+ # Creates a token that can be used to authenticate and authorize Grafana
870
+ # HTTP API operations for the given [workspace service account][1]. The
871
+ # service account acts as a user for the API operations, and defines the
872
+ # permissions that are used by the API.
873
+ #
874
+ # When you create the service account token, you will receive a key that
875
+ # is used when calling Grafana APIs. Do not lose this key, as it will
876
+ # not be retrievable again.
877
+ #
878
+ # If you do lose the key, you can delete the token and recreate it to
879
+ # receive a new key. This will disable the initial key.
880
+ #
881
+ # Service accounts are only available for workspaces that are compatible
882
+ # with Grafana version 9 and above.
883
+ #
884
+ #
885
+ #
886
+ # [1]: https://docs.aws.amazon.com/grafana/latest/userguide/service-accounts.html
887
+ #
888
+ # @option params [required, String] :name
889
+ # A name for the token to create.
890
+ #
891
+ # @option params [required, Integer] :seconds_to_live
892
+ # Sets how long the token will be valid, in seconds. You can set the
893
+ # time up to 30 days in the future.
894
+ #
895
+ # @option params [required, String] :service_account_id
896
+ # The ID of the service account for which to create a token.
897
+ #
898
+ # @option params [required, String] :workspace_id
899
+ # The ID of the workspace the service account resides within.
900
+ #
901
+ # @return [Types::CreateWorkspaceServiceAccountTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
902
+ #
903
+ # * {Types::CreateWorkspaceServiceAccountTokenResponse#service_account_id #service_account_id} => String
904
+ # * {Types::CreateWorkspaceServiceAccountTokenResponse#service_account_token #service_account_token} => Types::ServiceAccountTokenSummaryWithKey
905
+ # * {Types::CreateWorkspaceServiceAccountTokenResponse#workspace_id #workspace_id} => String
906
+ #
907
+ # @example Request syntax with placeholder values
908
+ #
909
+ # resp = client.create_workspace_service_account_token({
910
+ # name: "ServiceAccountTokenName", # required
911
+ # seconds_to_live: 1, # required
912
+ # service_account_id: "String", # required
913
+ # workspace_id: "WorkspaceId", # required
914
+ # })
915
+ #
916
+ # @example Response structure
917
+ #
918
+ # resp.service_account_id #=> String
919
+ # resp.service_account_token.id #=> String
920
+ # resp.service_account_token.key #=> String
921
+ # resp.service_account_token.name #=> String
922
+ # resp.workspace_id #=> String
923
+ #
924
+ # @see http://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/CreateWorkspaceServiceAccountToken AWS API Documentation
925
+ #
926
+ # @overload create_workspace_service_account_token(params = {})
927
+ # @param [Hash] params ({})
928
+ def create_workspace_service_account_token(params = {}, options = {})
929
+ req = build_request(:create_workspace_service_account_token, params)
930
+ req.send_request(options)
931
+ end
932
+
788
933
  # Deletes an Amazon Managed Grafana workspace.
789
934
  #
790
935
  # @option params [required, String] :workspace_id
@@ -851,6 +996,12 @@ module Aws::ManagedGrafana
851
996
 
852
997
  # Deletes a Grafana API key for the workspace.
853
998
  #
999
+ # <note markdown="1"> In workspaces compatible with Grafana version 9 or above, use
1000
+ # workspace service accounts instead of API keys. API keys will be
1001
+ # removed in a future release.
1002
+ #
1003
+ # </note>
1004
+ #
854
1005
  # @option params [required, String] :key_name
855
1006
  # The name of the API key to delete.
856
1007
  #
@@ -883,6 +1034,94 @@ module Aws::ManagedGrafana
883
1034
  req.send_request(options)
884
1035
  end
885
1036
 
1037
+ # Deletes a workspace service account from the workspace.
1038
+ #
1039
+ # This will delete any tokens created for the service account, as well.
1040
+ # If the tokens are currently in use, the will fail to authenticate /
1041
+ # authorize after they are deleted.
1042
+ #
1043
+ # Service accounts are only available for workspaces that are compatible
1044
+ # with Grafana version 9 and above.
1045
+ #
1046
+ # @option params [required, String] :service_account_id
1047
+ # The ID of the service account to delete.
1048
+ #
1049
+ # @option params [required, String] :workspace_id
1050
+ # The ID of the workspace where the service account resides.
1051
+ #
1052
+ # @return [Types::DeleteWorkspaceServiceAccountResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1053
+ #
1054
+ # * {Types::DeleteWorkspaceServiceAccountResponse#service_account_id #service_account_id} => String
1055
+ # * {Types::DeleteWorkspaceServiceAccountResponse#workspace_id #workspace_id} => String
1056
+ #
1057
+ # @example Request syntax with placeholder values
1058
+ #
1059
+ # resp = client.delete_workspace_service_account({
1060
+ # service_account_id: "String", # required
1061
+ # workspace_id: "WorkspaceId", # required
1062
+ # })
1063
+ #
1064
+ # @example Response structure
1065
+ #
1066
+ # resp.service_account_id #=> String
1067
+ # resp.workspace_id #=> String
1068
+ #
1069
+ # @see http://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/DeleteWorkspaceServiceAccount AWS API Documentation
1070
+ #
1071
+ # @overload delete_workspace_service_account(params = {})
1072
+ # @param [Hash] params ({})
1073
+ def delete_workspace_service_account(params = {}, options = {})
1074
+ req = build_request(:delete_workspace_service_account, params)
1075
+ req.send_request(options)
1076
+ end
1077
+
1078
+ # Deletes a token for the workspace service account.
1079
+ #
1080
+ # This will disable the key associated with the token. If any automation
1081
+ # is currently using the key, it will no longer be authenticated or
1082
+ # authorized to perform actions with the Grafana HTTP APIs.
1083
+ #
1084
+ # Service accounts are only available for workspaces that are compatible
1085
+ # with Grafana version 9 and above.
1086
+ #
1087
+ # @option params [required, String] :service_account_id
1088
+ # The ID of the service account from which to delete the token.
1089
+ #
1090
+ # @option params [required, String] :token_id
1091
+ # The ID of the token to delete.
1092
+ #
1093
+ # @option params [required, String] :workspace_id
1094
+ # The ID of the workspace from which to delete the token.
1095
+ #
1096
+ # @return [Types::DeleteWorkspaceServiceAccountTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1097
+ #
1098
+ # * {Types::DeleteWorkspaceServiceAccountTokenResponse#service_account_id #service_account_id} => String
1099
+ # * {Types::DeleteWorkspaceServiceAccountTokenResponse#token_id #token_id} => String
1100
+ # * {Types::DeleteWorkspaceServiceAccountTokenResponse#workspace_id #workspace_id} => String
1101
+ #
1102
+ # @example Request syntax with placeholder values
1103
+ #
1104
+ # resp = client.delete_workspace_service_account_token({
1105
+ # service_account_id: "String", # required
1106
+ # token_id: "String", # required
1107
+ # workspace_id: "WorkspaceId", # required
1108
+ # })
1109
+ #
1110
+ # @example Response structure
1111
+ #
1112
+ # resp.service_account_id #=> String
1113
+ # resp.token_id #=> String
1114
+ # resp.workspace_id #=> String
1115
+ #
1116
+ # @see http://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/DeleteWorkspaceServiceAccountToken AWS API Documentation
1117
+ #
1118
+ # @overload delete_workspace_service_account_token(params = {})
1119
+ # @param [Hash] params ({})
1120
+ def delete_workspace_service_account_token(params = {}, options = {})
1121
+ req = build_request(:delete_workspace_service_account_token, params)
1122
+ req.send_request(options)
1123
+ end
1124
+
886
1125
  # Displays information about one Amazon Managed Grafana workspace.
887
1126
  #
888
1127
  # @option params [required, String] :workspace_id
@@ -1234,6 +1473,120 @@ module Aws::ManagedGrafana
1234
1473
  req.send_request(options)
1235
1474
  end
1236
1475
 
1476
+ # Returns a list of tokens for a workspace service account.
1477
+ #
1478
+ # <note markdown="1"> This does not return the key for each token. You cannot access keys
1479
+ # after they are created. To create a new key, delete the token and
1480
+ # recreate it.
1481
+ #
1482
+ # </note>
1483
+ #
1484
+ # Service accounts are only available for workspaces that are compatible
1485
+ # with Grafana version 9 and above.
1486
+ #
1487
+ # @option params [Integer] :max_results
1488
+ # The maximum number of tokens to include in the results.
1489
+ #
1490
+ # @option params [String] :next_token
1491
+ # The token for the next set of service accounts to return. (You receive
1492
+ # this token from a previous `ListWorkspaceServiceAccountTokens`
1493
+ # operation.)
1494
+ #
1495
+ # @option params [required, String] :service_account_id
1496
+ # The ID of the service account for which to return tokens.
1497
+ #
1498
+ # @option params [required, String] :workspace_id
1499
+ # The ID of the workspace for which to return tokens.
1500
+ #
1501
+ # @return [Types::ListWorkspaceServiceAccountTokensResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1502
+ #
1503
+ # * {Types::ListWorkspaceServiceAccountTokensResponse#next_token #next_token} => String
1504
+ # * {Types::ListWorkspaceServiceAccountTokensResponse#service_account_id #service_account_id} => String
1505
+ # * {Types::ListWorkspaceServiceAccountTokensResponse#service_account_tokens #service_account_tokens} => Array&lt;Types::ServiceAccountTokenSummary&gt;
1506
+ # * {Types::ListWorkspaceServiceAccountTokensResponse#workspace_id #workspace_id} => String
1507
+ #
1508
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1509
+ #
1510
+ # @example Request syntax with placeholder values
1511
+ #
1512
+ # resp = client.list_workspace_service_account_tokens({
1513
+ # max_results: 1,
1514
+ # next_token: "PaginationToken",
1515
+ # service_account_id: "String", # required
1516
+ # workspace_id: "WorkspaceId", # required
1517
+ # })
1518
+ #
1519
+ # @example Response structure
1520
+ #
1521
+ # resp.next_token #=> String
1522
+ # resp.service_account_id #=> String
1523
+ # resp.service_account_tokens #=> Array
1524
+ # resp.service_account_tokens[0].created_at #=> Time
1525
+ # resp.service_account_tokens[0].expires_at #=> Time
1526
+ # resp.service_account_tokens[0].id #=> String
1527
+ # resp.service_account_tokens[0].last_used_at #=> Time
1528
+ # resp.service_account_tokens[0].name #=> String
1529
+ # resp.workspace_id #=> String
1530
+ #
1531
+ # @see http://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/ListWorkspaceServiceAccountTokens AWS API Documentation
1532
+ #
1533
+ # @overload list_workspace_service_account_tokens(params = {})
1534
+ # @param [Hash] params ({})
1535
+ def list_workspace_service_account_tokens(params = {}, options = {})
1536
+ req = build_request(:list_workspace_service_account_tokens, params)
1537
+ req.send_request(options)
1538
+ end
1539
+
1540
+ # Returns a list of service accounts for a workspace.
1541
+ #
1542
+ # Service accounts are only available for workspaces that are compatible
1543
+ # with Grafana version 9 and above.
1544
+ #
1545
+ # @option params [Integer] :max_results
1546
+ # The maximum number of service accounts to include in the results.
1547
+ #
1548
+ # @option params [String] :next_token
1549
+ # The token for the next set of service accounts to return. (You receive
1550
+ # this token from a previous `ListWorkspaceServiceAccounts` operation.)
1551
+ #
1552
+ # @option params [required, String] :workspace_id
1553
+ # The workspace for which to list service accounts.
1554
+ #
1555
+ # @return [Types::ListWorkspaceServiceAccountsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1556
+ #
1557
+ # * {Types::ListWorkspaceServiceAccountsResponse#next_token #next_token} => String
1558
+ # * {Types::ListWorkspaceServiceAccountsResponse#service_accounts #service_accounts} => Array&lt;Types::ServiceAccountSummary&gt;
1559
+ # * {Types::ListWorkspaceServiceAccountsResponse#workspace_id #workspace_id} => String
1560
+ #
1561
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1562
+ #
1563
+ # @example Request syntax with placeholder values
1564
+ #
1565
+ # resp = client.list_workspace_service_accounts({
1566
+ # max_results: 1,
1567
+ # next_token: "PaginationToken",
1568
+ # workspace_id: "WorkspaceId", # required
1569
+ # })
1570
+ #
1571
+ # @example Response structure
1572
+ #
1573
+ # resp.next_token #=> String
1574
+ # resp.service_accounts #=> Array
1575
+ # resp.service_accounts[0].grafana_role #=> String, one of "ADMIN", "EDITOR", "VIEWER"
1576
+ # resp.service_accounts[0].id #=> String
1577
+ # resp.service_accounts[0].is_disabled #=> String
1578
+ # resp.service_accounts[0].name #=> String
1579
+ # resp.workspace_id #=> String
1580
+ #
1581
+ # @see http://docs.aws.amazon.com/goto/WebAPI/grafana-2020-08-18/ListWorkspaceServiceAccounts AWS API Documentation
1582
+ #
1583
+ # @overload list_workspace_service_accounts(params = {})
1584
+ # @param [Hash] params ({})
1585
+ def list_workspace_service_accounts(params = {}, options = {})
1586
+ req = build_request(:list_workspace_service_accounts, params)
1587
+ req.send_request(options)
1588
+ end
1589
+
1237
1590
  # Returns a list of Amazon Managed Grafana workspaces in the account,
1238
1591
  # with some information about each workspace. For more complete
1239
1592
  # information about one workspace, use [DescribeWorkspace][1].
@@ -1771,7 +2124,7 @@ module Aws::ManagedGrafana
1771
2124
  params: params,
1772
2125
  config: config)
1773
2126
  context[:gem_name] = 'aws-sdk-managedgrafana'
1774
- context[:gem_version] = '1.28.0'
2127
+ context[:gem_version] = '1.29.0'
1775
2128
  Seahorse::Client::Request.new(handlers, context)
1776
2129
  end
1777
2130