@aws-sdk/client-grafana 3.370.0 → 3.373.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.
Files changed (34) hide show
  1. package/README.md +8 -0
  2. package/dist-cjs/Grafana.js +2 -0
  3. package/dist-cjs/commands/ListVersionsCommand.js +46 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/models/models_0.js +2 -0
  6. package/dist-cjs/pagination/ListVersionsPaginator.js +29 -0
  7. package/dist-cjs/pagination/index.js +1 -0
  8. package/dist-cjs/protocols/Aws_restJson1.js +72 -1
  9. package/dist-es/Grafana.js +2 -0
  10. package/dist-es/commands/ListVersionsCommand.js +42 -0
  11. package/dist-es/commands/index.js +1 -0
  12. package/dist-es/models/models_0.js +2 -0
  13. package/dist-es/pagination/ListVersionsPaginator.js +25 -0
  14. package/dist-es/pagination/index.js +1 -0
  15. package/dist-es/protocols/Aws_restJson1.js +69 -0
  16. package/dist-types/Grafana.d.ts +7 -0
  17. package/dist-types/GrafanaClient.d.ts +3 -2
  18. package/dist-types/commands/DescribeWorkspaceConfigurationCommand.d.ts +1 -0
  19. package/dist-types/commands/ListVersionsCommand.d.ts +95 -0
  20. package/dist-types/commands/UpdateWorkspaceConfigurationCommand.d.ts +1 -0
  21. package/dist-types/commands/index.d.ts +1 -0
  22. package/dist-types/models/models_0.d.ts +81 -8
  23. package/dist-types/pagination/ListVersionsPaginator.d.ts +7 -0
  24. package/dist-types/pagination/index.d.ts +1 -0
  25. package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
  26. package/dist-types/ts3.4/Grafana.d.ts +17 -0
  27. package/dist-types/ts3.4/GrafanaClient.d.ts +6 -0
  28. package/dist-types/ts3.4/commands/ListVersionsCommand.d.ts +35 -0
  29. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  30. package/dist-types/ts3.4/models/models_0.d.ts +13 -0
  31. package/dist-types/ts3.4/pagination/ListVersionsPaginator.d.ts +11 -0
  32. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  33. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
  34. package/package.json +1 -1
package/README.md CHANGED
@@ -298,6 +298,14 @@ ListTagsForResource
298
298
 
299
299
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-grafana/classes/listtagsforresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-grafana/interfaces/listtagsforresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-grafana/interfaces/listtagsforresourcecommandoutput.html)
300
300
 
301
+ </details>
302
+ <details>
303
+ <summary>
304
+ ListVersions
305
+ </summary>
306
+
307
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-grafana/classes/listversionscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-grafana/interfaces/listversionscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-grafana/interfaces/listversionscommandoutput.html)
308
+
301
309
  </details>
302
310
  <details>
303
311
  <summary>
@@ -13,6 +13,7 @@ const DescribeWorkspaceConfigurationCommand_1 = require("./commands/DescribeWork
13
13
  const DisassociateLicenseCommand_1 = require("./commands/DisassociateLicenseCommand");
14
14
  const ListPermissionsCommand_1 = require("./commands/ListPermissionsCommand");
15
15
  const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceCommand");
16
+ const ListVersionsCommand_1 = require("./commands/ListVersionsCommand");
16
17
  const ListWorkspacesCommand_1 = require("./commands/ListWorkspacesCommand");
17
18
  const TagResourceCommand_1 = require("./commands/TagResourceCommand");
18
19
  const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
@@ -33,6 +34,7 @@ const commands = {
33
34
  DisassociateLicenseCommand: DisassociateLicenseCommand_1.DisassociateLicenseCommand,
34
35
  ListPermissionsCommand: ListPermissionsCommand_1.ListPermissionsCommand,
35
36
  ListTagsForResourceCommand: ListTagsForResourceCommand_1.ListTagsForResourceCommand,
37
+ ListVersionsCommand: ListVersionsCommand_1.ListVersionsCommand,
36
38
  ListWorkspacesCommand: ListWorkspacesCommand_1.ListWorkspacesCommand,
37
39
  TagResourceCommand: TagResourceCommand_1.TagResourceCommand,
38
40
  UntagResourceCommand: UntagResourceCommand_1.UntagResourceCommand,
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListVersionsCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
9
+ class ListVersionsCommand extends smithy_client_1.Command {
10
+ static getEndpointParameterInstructions() {
11
+ return {
12
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
+ Endpoint: { type: "builtInParams", name: "endpoint" },
14
+ Region: { type: "builtInParams", name: "region" },
15
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
16
+ };
17
+ }
18
+ constructor(input) {
19
+ super();
20
+ this.input = input;
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
24
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListVersionsCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "GrafanaClient";
28
+ const commandName = "ListVersionsCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: (_) => _,
34
+ outputFilterSensitiveLog: (_) => _,
35
+ };
36
+ const { requestHandler } = configuration;
37
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
+ }
39
+ serialize(input, context) {
40
+ return (0, Aws_restJson1_1.se_ListVersionsCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_restJson1_1.de_ListVersionsCommand)(output, context);
44
+ }
45
+ }
46
+ exports.ListVersionsCommand = ListVersionsCommand;
@@ -12,6 +12,7 @@ tslib_1.__exportStar(require("./DescribeWorkspaceConfigurationCommand"), exports
12
12
  tslib_1.__exportStar(require("./DisassociateLicenseCommand"), exports);
13
13
  tslib_1.__exportStar(require("./ListPermissionsCommand"), exports);
14
14
  tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
15
+ tslib_1.__exportStar(require("./ListVersionsCommand"), exports);
15
16
  tslib_1.__exportStar(require("./ListWorkspacesCommand"), exports);
16
17
  tslib_1.__exportStar(require("./TagResourceCommand"), exports);
17
18
  tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
@@ -162,6 +162,8 @@ exports.WorkspaceStatus = {
162
162
  UPDATING: "UPDATING",
163
163
  UPGRADE_FAILED: "UPGRADE_FAILED",
164
164
  UPGRADING: "UPGRADING",
165
+ VERSION_UPDATE_FAILED: "VERSION_UPDATE_FAILED",
166
+ VERSION_UPDATING: "VERSION_UPDATING",
165
167
  };
166
168
  var IdpMetadata;
167
169
  (function (IdpMetadata) {
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListVersions = void 0;
4
+ const ListVersionsCommand_1 = require("../commands/ListVersionsCommand");
5
+ const GrafanaClient_1 = require("../GrafanaClient");
6
+ const makePagedClientRequest = async (client, input, ...args) => {
7
+ return await client.send(new ListVersionsCommand_1.ListVersionsCommand(input), ...args);
8
+ };
9
+ async function* paginateListVersions(config, input, ...additionalArguments) {
10
+ let token = config.startingToken || undefined;
11
+ let hasNext = true;
12
+ let page;
13
+ while (hasNext) {
14
+ input.nextToken = token;
15
+ input["maxResults"] = config.pageSize;
16
+ if (config.client instanceof GrafanaClient_1.GrafanaClient) {
17
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
+ }
19
+ else {
20
+ throw new Error("Invalid client, expected Grafana | GrafanaClient");
21
+ }
22
+ yield page;
23
+ const prevToken = token;
24
+ token = page.nextToken;
25
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
+ }
27
+ return undefined;
28
+ }
29
+ exports.paginateListVersions = paginateListVersions;
@@ -3,4 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./Interfaces"), exports);
5
5
  tslib_1.__exportStar(require("./ListPermissionsPaginator"), exports);
6
+ tslib_1.__exportStar(require("./ListVersionsPaginator"), exports);
6
7
  tslib_1.__exportStar(require("./ListWorkspacesPaginator"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateWorkspaceConfigurationCommand = exports.de_UpdateWorkspaceAuthenticationCommand = exports.de_UpdateWorkspaceCommand = exports.de_UpdatePermissionsCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListWorkspacesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListPermissionsCommand = exports.de_DisassociateLicenseCommand = exports.de_DescribeWorkspaceConfigurationCommand = exports.de_DescribeWorkspaceAuthenticationCommand = exports.de_DescribeWorkspaceCommand = exports.de_DeleteWorkspaceApiKeyCommand = exports.de_DeleteWorkspaceCommand = exports.de_CreateWorkspaceApiKeyCommand = exports.de_CreateWorkspaceCommand = exports.de_AssociateLicenseCommand = exports.se_UpdateWorkspaceConfigurationCommand = exports.se_UpdateWorkspaceAuthenticationCommand = exports.se_UpdateWorkspaceCommand = exports.se_UpdatePermissionsCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListWorkspacesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListPermissionsCommand = exports.se_DisassociateLicenseCommand = exports.se_DescribeWorkspaceConfigurationCommand = exports.se_DescribeWorkspaceAuthenticationCommand = exports.se_DescribeWorkspaceCommand = exports.se_DeleteWorkspaceApiKeyCommand = exports.se_DeleteWorkspaceCommand = exports.se_CreateWorkspaceApiKeyCommand = exports.se_CreateWorkspaceCommand = exports.se_AssociateLicenseCommand = void 0;
3
+ exports.de_UpdateWorkspaceConfigurationCommand = exports.de_UpdateWorkspaceAuthenticationCommand = exports.de_UpdateWorkspaceCommand = exports.de_UpdatePermissionsCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListWorkspacesCommand = exports.de_ListVersionsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListPermissionsCommand = exports.de_DisassociateLicenseCommand = exports.de_DescribeWorkspaceConfigurationCommand = exports.de_DescribeWorkspaceAuthenticationCommand = exports.de_DescribeWorkspaceCommand = exports.de_DeleteWorkspaceApiKeyCommand = exports.de_DeleteWorkspaceCommand = exports.de_CreateWorkspaceApiKeyCommand = exports.de_CreateWorkspaceCommand = exports.de_AssociateLicenseCommand = exports.se_UpdateWorkspaceConfigurationCommand = exports.se_UpdateWorkspaceAuthenticationCommand = exports.se_UpdateWorkspaceCommand = exports.se_UpdatePermissionsCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListWorkspacesCommand = exports.se_ListVersionsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListPermissionsCommand = exports.se_DisassociateLicenseCommand = exports.se_DescribeWorkspaceConfigurationCommand = exports.se_DescribeWorkspaceAuthenticationCommand = exports.se_DescribeWorkspaceCommand = exports.se_DeleteWorkspaceApiKeyCommand = exports.se_DeleteWorkspaceCommand = exports.se_CreateWorkspaceApiKeyCommand = exports.se_CreateWorkspaceCommand = exports.se_AssociateLicenseCommand = void 0;
4
4
  const protocol_http_1 = require("@smithy/protocol-http");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const uuid_1 = require("uuid");
@@ -234,6 +234,28 @@ const se_ListTagsForResourceCommand = async (input, context) => {
234
234
  });
235
235
  };
236
236
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
237
+ const se_ListVersionsCommand = async (input, context) => {
238
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
239
+ const headers = {};
240
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/versions";
241
+ const query = (0, smithy_client_1.map)({
242
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
243
+ nextToken: [, input.nextToken],
244
+ "workspace-id": [, input.workspaceId],
245
+ });
246
+ let body;
247
+ return new protocol_http_1.HttpRequest({
248
+ protocol,
249
+ hostname,
250
+ port,
251
+ method: "GET",
252
+ headers,
253
+ path: resolvedPath,
254
+ query,
255
+ body,
256
+ });
257
+ };
258
+ exports.se_ListVersionsCommand = se_ListVersionsCommand;
237
259
  const se_ListWorkspacesCommand = async (input, context) => {
238
260
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
239
261
  const headers = {};
@@ -391,6 +413,7 @@ const se_UpdateWorkspaceConfigurationCommand = async (input, context) => {
391
413
  let body;
392
414
  body = JSON.stringify((0, smithy_client_1.take)(input, {
393
415
  configuration: (_) => smithy_client_1.LazyJsonString.fromObject(_),
416
+ grafanaVersion: [],
394
417
  }));
395
418
  return new protocol_http_1.HttpRequest({
396
419
  protocol,
@@ -753,6 +776,7 @@ const de_DescribeWorkspaceConfigurationCommand = async (output, context) => {
753
776
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
754
777
  const doc = (0, smithy_client_1.take)(data, {
755
778
  configuration: (_) => new smithy_client_1.LazyJsonString(_),
779
+ grafanaVersion: smithy_client_1.expectString,
756
780
  });
757
781
  Object.assign(contents, doc);
758
782
  return contents;
@@ -925,6 +949,53 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
925
949
  });
926
950
  }
927
951
  };
952
+ const de_ListVersionsCommand = async (output, context) => {
953
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
954
+ return de_ListVersionsCommandError(output, context);
955
+ }
956
+ const contents = (0, smithy_client_1.map)({
957
+ $metadata: deserializeMetadata(output),
958
+ });
959
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
960
+ const doc = (0, smithy_client_1.take)(data, {
961
+ grafanaVersions: smithy_client_1._json,
962
+ nextToken: smithy_client_1.expectString,
963
+ });
964
+ Object.assign(contents, doc);
965
+ return contents;
966
+ };
967
+ exports.de_ListVersionsCommand = de_ListVersionsCommand;
968
+ const de_ListVersionsCommandError = async (output, context) => {
969
+ const parsedOutput = {
970
+ ...output,
971
+ body: await parseErrorBody(output.body, context),
972
+ };
973
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
974
+ switch (errorCode) {
975
+ case "AccessDeniedException":
976
+ case "com.amazonaws.grafana#AccessDeniedException":
977
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
978
+ case "InternalServerException":
979
+ case "com.amazonaws.grafana#InternalServerException":
980
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
981
+ case "ResourceNotFoundException":
982
+ case "com.amazonaws.grafana#ResourceNotFoundException":
983
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
984
+ case "ThrottlingException":
985
+ case "com.amazonaws.grafana#ThrottlingException":
986
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
987
+ case "ValidationException":
988
+ case "com.amazonaws.grafana#ValidationException":
989
+ throw await de_ValidationExceptionRes(parsedOutput, context);
990
+ default:
991
+ const parsedBody = parsedOutput.body;
992
+ return throwDefaultError({
993
+ output,
994
+ parsedBody,
995
+ errorCode,
996
+ });
997
+ }
998
+ };
928
999
  const de_ListWorkspacesCommand = async (output, context) => {
929
1000
  if (output.statusCode !== 200 && output.statusCode >= 300) {
930
1001
  return de_ListWorkspacesCommandError(output, context);
@@ -10,6 +10,7 @@ import { DescribeWorkspaceConfigurationCommand, } from "./commands/DescribeWorks
10
10
  import { DisassociateLicenseCommand, } from "./commands/DisassociateLicenseCommand";
11
11
  import { ListPermissionsCommand, } from "./commands/ListPermissionsCommand";
12
12
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
13
+ import { ListVersionsCommand, } from "./commands/ListVersionsCommand";
13
14
  import { ListWorkspacesCommand, } from "./commands/ListWorkspacesCommand";
14
15
  import { TagResourceCommand } from "./commands/TagResourceCommand";
15
16
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
@@ -30,6 +31,7 @@ const commands = {
30
31
  DisassociateLicenseCommand,
31
32
  ListPermissionsCommand,
32
33
  ListTagsForResourceCommand,
34
+ ListVersionsCommand,
33
35
  ListWorkspacesCommand,
34
36
  TagResourceCommand,
35
37
  UntagResourceCommand,
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { de_ListVersionsCommand, se_ListVersionsCommand } from "../protocols/Aws_restJson1";
5
+ export { $Command };
6
+ export class ListVersionsCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListVersionsCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "GrafanaClient";
25
+ const commandName = "ListVersionsCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (_) => _,
31
+ outputFilterSensitiveLog: (_) => _,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return se_ListVersionsCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return de_ListVersionsCommand(output, context);
41
+ }
42
+ }
@@ -9,6 +9,7 @@ export * from "./DescribeWorkspaceConfigurationCommand";
9
9
  export * from "./DisassociateLicenseCommand";
10
10
  export * from "./ListPermissionsCommand";
11
11
  export * from "./ListTagsForResourceCommand";
12
+ export * from "./ListVersionsCommand";
12
13
  export * from "./ListWorkspacesCommand";
13
14
  export * from "./TagResourceCommand";
14
15
  export * from "./UntagResourceCommand";
@@ -152,6 +152,8 @@ export const WorkspaceStatus = {
152
152
  UPDATING: "UPDATING",
153
153
  UPGRADE_FAILED: "UPGRADE_FAILED",
154
154
  UPGRADING: "UPGRADING",
155
+ VERSION_UPDATE_FAILED: "VERSION_UPDATE_FAILED",
156
+ VERSION_UPDATING: "VERSION_UPDATING",
155
157
  };
156
158
  export var IdpMetadata;
157
159
  (function (IdpMetadata) {
@@ -0,0 +1,25 @@
1
+ import { ListVersionsCommand, } from "../commands/ListVersionsCommand";
2
+ import { GrafanaClient } from "../GrafanaClient";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new ListVersionsCommand(input), ...args);
5
+ };
6
+ export async function* paginateListVersions(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ input["maxResults"] = config.pageSize;
13
+ if (config.client instanceof GrafanaClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected Grafana | GrafanaClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.nextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -1,3 +1,4 @@
1
1
  export * from "./Interfaces";
2
2
  export * from "./ListPermissionsPaginator";
3
+ export * from "./ListVersionsPaginator";
3
4
  export * from "./ListWorkspacesPaginator";
@@ -220,6 +220,27 @@ export const se_ListTagsForResourceCommand = async (input, context) => {
220
220
  body,
221
221
  });
222
222
  };
223
+ export const se_ListVersionsCommand = async (input, context) => {
224
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
225
+ const headers = {};
226
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/versions";
227
+ const query = map({
228
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
229
+ nextToken: [, input.nextToken],
230
+ "workspace-id": [, input.workspaceId],
231
+ });
232
+ let body;
233
+ return new __HttpRequest({
234
+ protocol,
235
+ hostname,
236
+ port,
237
+ method: "GET",
238
+ headers,
239
+ path: resolvedPath,
240
+ query,
241
+ body,
242
+ });
243
+ };
223
244
  export const se_ListWorkspacesCommand = async (input, context) => {
224
245
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
225
246
  const headers = {};
@@ -371,6 +392,7 @@ export const se_UpdateWorkspaceConfigurationCommand = async (input, context) =>
371
392
  let body;
372
393
  body = JSON.stringify(take(input, {
373
394
  configuration: (_) => __LazyJsonString.fromObject(_),
395
+ grafanaVersion: [],
374
396
  }));
375
397
  return new __HttpRequest({
376
398
  protocol,
@@ -725,6 +747,7 @@ export const de_DescribeWorkspaceConfigurationCommand = async (output, context)
725
747
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
726
748
  const doc = take(data, {
727
749
  configuration: (_) => new __LazyJsonString(_),
750
+ grafanaVersion: __expectString,
728
751
  });
729
752
  Object.assign(contents, doc);
730
753
  return contents;
@@ -893,6 +916,52 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
893
916
  });
894
917
  }
895
918
  };
919
+ export const de_ListVersionsCommand = async (output, context) => {
920
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
921
+ return de_ListVersionsCommandError(output, context);
922
+ }
923
+ const contents = map({
924
+ $metadata: deserializeMetadata(output),
925
+ });
926
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
927
+ const doc = take(data, {
928
+ grafanaVersions: _json,
929
+ nextToken: __expectString,
930
+ });
931
+ Object.assign(contents, doc);
932
+ return contents;
933
+ };
934
+ const de_ListVersionsCommandError = async (output, context) => {
935
+ const parsedOutput = {
936
+ ...output,
937
+ body: await parseErrorBody(output.body, context),
938
+ };
939
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
940
+ switch (errorCode) {
941
+ case "AccessDeniedException":
942
+ case "com.amazonaws.grafana#AccessDeniedException":
943
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
944
+ case "InternalServerException":
945
+ case "com.amazonaws.grafana#InternalServerException":
946
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
947
+ case "ResourceNotFoundException":
948
+ case "com.amazonaws.grafana#ResourceNotFoundException":
949
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
950
+ case "ThrottlingException":
951
+ case "com.amazonaws.grafana#ThrottlingException":
952
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
953
+ case "ValidationException":
954
+ case "com.amazonaws.grafana#ValidationException":
955
+ throw await de_ValidationExceptionRes(parsedOutput, context);
956
+ default:
957
+ const parsedBody = parsedOutput.body;
958
+ return throwDefaultError({
959
+ output,
960
+ parsedBody,
961
+ errorCode,
962
+ });
963
+ }
964
+ };
896
965
  export const de_ListWorkspacesCommand = async (output, context) => {
897
966
  if (output.statusCode !== 200 && output.statusCode >= 300) {
898
967
  return de_ListWorkspacesCommandError(output, context);
@@ -10,6 +10,7 @@ import { DescribeWorkspaceConfigurationCommandInput, DescribeWorkspaceConfigurat
10
10
  import { DisassociateLicenseCommandInput, DisassociateLicenseCommandOutput } from "./commands/DisassociateLicenseCommand";
11
11
  import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "./commands/ListPermissionsCommand";
12
12
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
13
+ import { ListVersionsCommandInput, ListVersionsCommandOutput } from "./commands/ListVersionsCommand";
13
14
  import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput } from "./commands/ListWorkspacesCommand";
14
15
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
15
16
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
@@ -85,6 +86,12 @@ export interface Grafana {
85
86
  listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
86
87
  listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
87
88
  listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
89
+ /**
90
+ * @see {@link ListVersionsCommand}
91
+ */
92
+ listVersions(args: ListVersionsCommandInput, options?: __HttpHandlerOptions): Promise<ListVersionsCommandOutput>;
93
+ listVersions(args: ListVersionsCommandInput, cb: (err: any, data?: ListVersionsCommandOutput) => void): void;
94
+ listVersions(args: ListVersionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListVersionsCommandOutput) => void): void;
88
95
  /**
89
96
  * @see {@link ListWorkspacesCommand}
90
97
  */
@@ -19,6 +19,7 @@ import { DescribeWorkspaceConfigurationCommandInput, DescribeWorkspaceConfigurat
19
19
  import { DisassociateLicenseCommandInput, DisassociateLicenseCommandOutput } from "./commands/DisassociateLicenseCommand";
20
20
  import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "./commands/ListPermissionsCommand";
21
21
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
22
+ import { ListVersionsCommandInput, ListVersionsCommandOutput } from "./commands/ListVersionsCommand";
22
23
  import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput } from "./commands/ListWorkspacesCommand";
23
24
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
24
25
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
@@ -31,11 +32,11 @@ export { __Client };
31
32
  /**
32
33
  * @public
33
34
  */
34
- export type ServiceInputTypes = AssociateLicenseCommandInput | CreateWorkspaceApiKeyCommandInput | CreateWorkspaceCommandInput | DeleteWorkspaceApiKeyCommandInput | DeleteWorkspaceCommandInput | DescribeWorkspaceAuthenticationCommandInput | DescribeWorkspaceCommandInput | DescribeWorkspaceConfigurationCommandInput | DisassociateLicenseCommandInput | ListPermissionsCommandInput | ListTagsForResourceCommandInput | ListWorkspacesCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdatePermissionsCommandInput | UpdateWorkspaceAuthenticationCommandInput | UpdateWorkspaceCommandInput | UpdateWorkspaceConfigurationCommandInput;
35
+ export type ServiceInputTypes = AssociateLicenseCommandInput | CreateWorkspaceApiKeyCommandInput | CreateWorkspaceCommandInput | DeleteWorkspaceApiKeyCommandInput | DeleteWorkspaceCommandInput | DescribeWorkspaceAuthenticationCommandInput | DescribeWorkspaceCommandInput | DescribeWorkspaceConfigurationCommandInput | DisassociateLicenseCommandInput | ListPermissionsCommandInput | ListTagsForResourceCommandInput | ListVersionsCommandInput | ListWorkspacesCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdatePermissionsCommandInput | UpdateWorkspaceAuthenticationCommandInput | UpdateWorkspaceCommandInput | UpdateWorkspaceConfigurationCommandInput;
35
36
  /**
36
37
  * @public
37
38
  */
38
- export type ServiceOutputTypes = AssociateLicenseCommandOutput | CreateWorkspaceApiKeyCommandOutput | CreateWorkspaceCommandOutput | DeleteWorkspaceApiKeyCommandOutput | DeleteWorkspaceCommandOutput | DescribeWorkspaceAuthenticationCommandOutput | DescribeWorkspaceCommandOutput | DescribeWorkspaceConfigurationCommandOutput | DisassociateLicenseCommandOutput | ListPermissionsCommandOutput | ListTagsForResourceCommandOutput | ListWorkspacesCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdatePermissionsCommandOutput | UpdateWorkspaceAuthenticationCommandOutput | UpdateWorkspaceCommandOutput | UpdateWorkspaceConfigurationCommandOutput;
39
+ export type ServiceOutputTypes = AssociateLicenseCommandOutput | CreateWorkspaceApiKeyCommandOutput | CreateWorkspaceCommandOutput | DeleteWorkspaceApiKeyCommandOutput | DeleteWorkspaceCommandOutput | DescribeWorkspaceAuthenticationCommandOutput | DescribeWorkspaceCommandOutput | DescribeWorkspaceConfigurationCommandOutput | DisassociateLicenseCommandOutput | ListPermissionsCommandOutput | ListTagsForResourceCommandOutput | ListVersionsCommandOutput | ListWorkspacesCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdatePermissionsCommandOutput | UpdateWorkspaceAuthenticationCommandOutput | UpdateWorkspaceCommandOutput | UpdateWorkspaceConfigurationCommandOutput;
39
40
  /**
40
41
  * @public
41
42
  */
@@ -37,6 +37,7 @@ export interface DescribeWorkspaceConfigurationCommandOutput extends DescribeWor
37
37
  * const response = await client.send(command);
38
38
  * // { // DescribeWorkspaceConfigurationResponse
39
39
  * // configuration: "STRING_VALUE", // required
40
+ * // grafanaVersion: "STRING_VALUE",
40
41
  * // };
41
42
  *
42
43
  * ```
@@ -0,0 +1,95 @@
1
+ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
4
+ import { GrafanaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GrafanaClient";
5
+ import { ListVersionsRequest, ListVersionsResponse } from "../models/models_0";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ListVersionsCommand}.
14
+ */
15
+ export interface ListVersionsCommandInput extends ListVersionsRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListVersionsCommand}.
21
+ */
22
+ export interface ListVersionsCommandOutput extends ListVersionsResponse, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Lists available versions of Grafana. These are available when calling
27
+ * <code>CreateWorkspace</code>. Optionally, include a workspace to list the versions
28
+ * to which it can be upgraded.</p>
29
+ * @example
30
+ * Use a bare-bones client and the command you need to make an API call.
31
+ * ```javascript
32
+ * import { GrafanaClient, ListVersionsCommand } from "@aws-sdk/client-grafana"; // ES Modules import
33
+ * // const { GrafanaClient, ListVersionsCommand } = require("@aws-sdk/client-grafana"); // CommonJS import
34
+ * const client = new GrafanaClient(config);
35
+ * const input = { // ListVersionsRequest
36
+ * maxResults: Number("int"),
37
+ * nextToken: "STRING_VALUE",
38
+ * workspaceId: "STRING_VALUE",
39
+ * };
40
+ * const command = new ListVersionsCommand(input);
41
+ * const response = await client.send(command);
42
+ * // { // ListVersionsResponse
43
+ * // nextToken: "STRING_VALUE",
44
+ * // grafanaVersions: [ // GrafanaVersionList
45
+ * // "STRING_VALUE",
46
+ * // ],
47
+ * // };
48
+ *
49
+ * ```
50
+ *
51
+ * @param ListVersionsCommandInput - {@link ListVersionsCommandInput}
52
+ * @returns {@link ListVersionsCommandOutput}
53
+ * @see {@link ListVersionsCommandInput} for command's `input` shape.
54
+ * @see {@link ListVersionsCommandOutput} for command's `response` shape.
55
+ * @see {@link GrafanaClientResolvedConfig | config} for GrafanaClient's `config` shape.
56
+ *
57
+ * @throws {@link AccessDeniedException} (client fault)
58
+ * <p>You do not have sufficient permissions to perform this action. </p>
59
+ *
60
+ * @throws {@link InternalServerException} (server fault)
61
+ * <p>Unexpected error while processing the request. Retry the request.</p>
62
+ *
63
+ * @throws {@link ResourceNotFoundException} (client fault)
64
+ * <p>The request references a resource that does not exist.</p>
65
+ *
66
+ * @throws {@link ThrottlingException} (client fault)
67
+ * <p>The request was denied because of request throttling. Retry the request.</p>
68
+ *
69
+ * @throws {@link ValidationException} (client fault)
70
+ * <p>The value of a parameter in the request caused an error.</p>
71
+ *
72
+ * @throws {@link GrafanaServiceException}
73
+ * <p>Base exception class for all service exceptions from Grafana service.</p>
74
+ *
75
+ */
76
+ export declare class ListVersionsCommand extends $Command<ListVersionsCommandInput, ListVersionsCommandOutput, GrafanaClientResolvedConfig> {
77
+ readonly input: ListVersionsCommandInput;
78
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
79
+ /**
80
+ * @public
81
+ */
82
+ constructor(input: ListVersionsCommandInput);
83
+ /**
84
+ * @internal
85
+ */
86
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: GrafanaClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListVersionsCommandInput, ListVersionsCommandOutput>;
87
+ /**
88
+ * @internal
89
+ */
90
+ private serialize;
91
+ /**
92
+ * @internal
93
+ */
94
+ private deserialize;
95
+ }
@@ -33,6 +33,7 @@ export interface UpdateWorkspaceConfigurationCommandOutput extends UpdateWorkspa
33
33
  * const input = { // UpdateWorkspaceConfigurationRequest
34
34
  * configuration: "STRING_VALUE", // required
35
35
  * workspaceId: "STRING_VALUE", // required
36
+ * grafanaVersion: "STRING_VALUE",
36
37
  * };
37
38
  * const command = new UpdateWorkspaceConfigurationCommand(input);
38
39
  * const response = await client.send(command);
@@ -9,6 +9,7 @@ export * from "./DescribeWorkspaceConfigurationCommand";
9
9
  export * from "./DisassociateLicenseCommand";
10
10
  export * from "./ListPermissionsCommand";
11
11
  export * from "./ListTagsForResourceCommand";
12
+ export * from "./ListVersionsCommand";
12
13
  export * from "./ListWorkspacesCommand";
13
14
  export * from "./TagResourceCommand";
14
15
  export * from "./UntagResourceCommand";
@@ -428,18 +428,28 @@ export type DataSourceType = (typeof DataSourceType)[keyof typeof DataSourceType
428
428
  * @public
429
429
  * <p>The configuration settings for in-bound network access to your workspace.</p>
430
430
  * <p>When this is configured, only listed IP addresses and VPC endpoints will be able to
431
- * access your workspace. Standard Grafana authentication and authorization will still be
431
+ * access your workspace. Standard Grafana authentication and authorization are still
432
432
  * required.</p>
433
- * <p>If this is not configured, or is removed, then all IP addresses and VPC endpoints will
434
- * be allowed. Standard Grafana authentication and authorization will still be
433
+ * <p>Access is granted to a caller that is in either the IP address list or the VPC
434
+ * endpoint list - they do not need to be in both.</p>
435
+ * <p>If this is not configured, or is removed, then all IP addresses and VPC endpoints are
436
+ * allowed. Standard Grafana authentication and authorization are still
435
437
  * required.</p>
438
+ * <note>
439
+ * <p>While both <code>prefixListIds</code> and <code>vpceIds</code> are required, you
440
+ * can pass in an empty array of strings for either parameter if you do not want to allow any
441
+ * of that type.</p>
442
+ * <p>If both are passed as empty arrays, no traffic is allowed to the workspace,
443
+ * because only <i>explicitly</i> allowed connections are accepted.</p>
444
+ * </note>
436
445
  */
437
446
  export interface NetworkAccessConfiguration {
438
447
  /**
439
448
  * <p>An array of prefix list IDs. A prefix list is a list of CIDR ranges of IP addresses.
440
449
  * The IP addresses specified are allowed to access your workspace. If the list is not
441
- * included in the configuration then no IP addresses will be allowed to access the
442
- * workspace. You create a prefix list using the Amazon VPC console.</p>
450
+ * included in the configuration (passed an empty array) then no IP addresses are
451
+ * allowed to access the workspace. You create a prefix list using the Amazon VPC
452
+ * console.</p>
443
453
  * <p>Prefix list IDs have the format <code>pl-<i>1a2b3c4d</i>
444
454
  * </code>.</p>
445
455
  * <p>For more information about prefix lists, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/managed-prefix-lists.html">Group CIDR blocks using managed
@@ -451,7 +461,8 @@ export interface NetworkAccessConfiguration {
451
461
  * <p>An array of Amazon VPC endpoint IDs for the workspace. You can create VPC
452
462
  * endpoints to your Amazon Managed Grafana workspace for access from within a VPC. If a
453
463
  * <code>NetworkAccessConfiguration</code> is specified then only VPC endpoints
454
- * specified here will be allowed to access the workspace.</p>
464
+ * specified here are allowed to access the workspace. If you pass in an empty array
465
+ * of strings, then no VPCs are allowed to access the workspace.</p>
455
466
  * <p>VPC endpoint IDs have the format
456
467
  * <code>vpce-<i>1a2b3c4d</i>
457
468
  * </code>.</p>
@@ -461,7 +472,7 @@ export interface NetworkAccessConfiguration {
461
472
  * <note>
462
473
  * <p>The only VPC endpoints that can be specified here are interface VPC endpoints for
463
474
  * Grafana workspaces (using the <code>com.amazonaws.[region].grafana-workspace</code>
464
- * service endpoint). Other VPC endpoints will be ignored.</p>
475
+ * service endpoint). Other VPC endpoints are ignored.</p>
465
476
  * </note>
466
477
  */
467
478
  vpceIds: string[] | undefined;
@@ -547,6 +558,14 @@ export declare const WorkspaceStatus: {
547
558
  * Workspace is being upgraded to enterprise.
548
559
  */
549
560
  readonly UPGRADING: "UPGRADING";
561
+ /**
562
+ * Workspace version update failed.
563
+ */
564
+ readonly VERSION_UPDATE_FAILED: "VERSION_UPDATE_FAILED";
565
+ /**
566
+ * Workspace version is being updated.
567
+ */
568
+ readonly VERSION_UPDATING: "VERSION_UPDATING";
550
569
  };
551
570
  /**
552
571
  * @public
@@ -559,6 +578,8 @@ export type WorkspaceStatus = (typeof WorkspaceStatus)[keyof typeof WorkspaceSta
559
578
  * <note>
560
579
  * <p>Provided <code>securityGroupIds</code> and <code>subnetIds</code> must be part of
561
580
  * the same VPC.</p>
581
+ * <p>Connecting to a private VPC is not yet available in the Asia Pacific (Seoul)
582
+ * Region (ap-northeast-2).</p>
562
583
  * </note>
563
584
  */
564
585
  export interface VpcConfiguration {
@@ -928,6 +949,10 @@ export interface DescribeWorkspaceConfigurationResponse {
928
949
  * workspace</a>.</p>
929
950
  */
930
951
  configuration: __LazyJsonString | string | undefined;
952
+ /**
953
+ * <p>The supported Grafana version for the workspace.</p>
954
+ */
955
+ grafanaVersion?: string;
931
956
  }
932
957
  /**
933
958
  * @public
@@ -943,6 +968,14 @@ export interface UpdateWorkspaceConfigurationRequest {
943
968
  * <p>The ID of the workspace to update.</p>
944
969
  */
945
970
  workspaceId: string | undefined;
971
+ /**
972
+ * <p>Specifies the version of Grafana to support in the new workspace.</p>
973
+ * <p>Can only be used to upgrade (for example, from 8.4 to 9.4), not
974
+ * downgrade (for example, from 9.4 to 8.4).</p>
975
+ * <p>To know what versions are available to upgrade to for a specific workspace, see
976
+ * the <code>ListVersions</code> operation.</p>
977
+ */
978
+ grafanaVersion?: string;
946
979
  }
947
980
  /**
948
981
  * @public
@@ -989,6 +1022,41 @@ export interface ListTagsForResourceResponse {
989
1022
  */
990
1023
  tags?: Record<string, string>;
991
1024
  }
1025
+ /**
1026
+ * @public
1027
+ */
1028
+ export interface ListVersionsRequest {
1029
+ /**
1030
+ * <p>The maximum number of results to include in the response.</p>
1031
+ */
1032
+ maxResults?: number;
1033
+ /**
1034
+ * <p>The token to use when requesting the next set of results. You receive this token from
1035
+ * a previous <code>ListVersions</code> operation.</p>
1036
+ */
1037
+ nextToken?: string;
1038
+ /**
1039
+ * <p>The ID of the workspace to list the available upgrade versions. If not included,
1040
+ * lists all versions of Grafana that are supported for
1041
+ * <code>CreateWorkspace</code>.</p>
1042
+ */
1043
+ workspaceId?: string;
1044
+ }
1045
+ /**
1046
+ * @public
1047
+ */
1048
+ export interface ListVersionsResponse {
1049
+ /**
1050
+ * <p>The token to use in a subsequent <code>ListVersions</code> operation to return the
1051
+ * next set of results.</p>
1052
+ */
1053
+ nextToken?: string;
1054
+ /**
1055
+ * <p>The Grafana versions available to create. If a workspace ID is included in the
1056
+ * request, the Grafana versions to which this workspace can be upgraded.</p>
1057
+ */
1058
+ grafanaVersions?: string[];
1059
+ }
992
1060
  /**
993
1061
  * @public
994
1062
  * @enum
@@ -1315,6 +1383,10 @@ export interface CreateWorkspaceRequest {
1315
1383
  /**
1316
1384
  * <p>The configuration settings for an Amazon VPC that contains data sources for
1317
1385
  * your Grafana workspace to connect to.</p>
1386
+ * <note>
1387
+ * <p>Connecting to a private VPC is not yet available in the Asia Pacific (Seoul)
1388
+ * Region (ap-northeast-2).</p>
1389
+ * </note>
1318
1390
  */
1319
1391
  vpcConfiguration?: VpcConfiguration;
1320
1392
  /**
@@ -1335,7 +1407,8 @@ export interface CreateWorkspaceRequest {
1335
1407
  networkAccessControl?: NetworkAccessConfiguration;
1336
1408
  /**
1337
1409
  * <p>Specifies the version of Grafana to support in the new workspace.</p>
1338
- * <p>Supported values are <code>8.4</code> and <code>9.4</code>.</p>
1410
+ * <p>To get a list of supported version, use the <code>ListVersions</code>
1411
+ * operation.</p>
1339
1412
  */
1340
1413
  grafanaVersion?: string;
1341
1414
  }
@@ -0,0 +1,7 @@
1
+ import { Paginator } from "@smithy/types";
2
+ import { ListVersionsCommandInput, ListVersionsCommandOutput } from "../commands/ListVersionsCommand";
3
+ import { GrafanaPaginationConfiguration } from "./Interfaces";
4
+ /**
5
+ * @public
6
+ */
7
+ export declare function paginateListVersions(config: GrafanaPaginationConfiguration, input: ListVersionsCommandInput, ...additionalArguments: any): Paginator<ListVersionsCommandOutput>;
@@ -1,3 +1,4 @@
1
1
  export * from "./Interfaces";
2
2
  export * from "./ListPermissionsPaginator";
3
+ export * from "./ListVersionsPaginator";
3
4
  export * from "./ListWorkspacesPaginator";
@@ -11,6 +11,7 @@ import { DescribeWorkspaceConfigurationCommandInput, DescribeWorkspaceConfigurat
11
11
  import { DisassociateLicenseCommandInput, DisassociateLicenseCommandOutput } from "../commands/DisassociateLicenseCommand";
12
12
  import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "../commands/ListPermissionsCommand";
13
13
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "../commands/ListTagsForResourceCommand";
14
+ import { ListVersionsCommandInput, ListVersionsCommandOutput } from "../commands/ListVersionsCommand";
14
15
  import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput } from "../commands/ListWorkspacesCommand";
15
16
  import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
16
17
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
@@ -62,6 +63,10 @@ export declare const se_ListPermissionsCommand: (input: ListPermissionsCommandIn
62
63
  * serializeAws_restJson1ListTagsForResourceCommand
63
64
  */
64
65
  export declare const se_ListTagsForResourceCommand: (input: ListTagsForResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
66
+ /**
67
+ * serializeAws_restJson1ListVersionsCommand
68
+ */
69
+ export declare const se_ListVersionsCommand: (input: ListVersionsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
65
70
  /**
66
71
  * serializeAws_restJson1ListWorkspacesCommand
67
72
  */
@@ -134,6 +139,10 @@ export declare const de_ListPermissionsCommand: (output: __HttpResponse, context
134
139
  * deserializeAws_restJson1ListTagsForResourceCommand
135
140
  */
136
141
  export declare const de_ListTagsForResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListTagsForResourceCommandOutput>;
142
+ /**
143
+ * deserializeAws_restJson1ListVersionsCommand
144
+ */
145
+ export declare const de_ListVersionsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListVersionsCommandOutput>;
137
146
  /**
138
147
  * deserializeAws_restJson1ListWorkspacesCommand
139
148
  */
@@ -43,6 +43,10 @@ import {
43
43
  ListTagsForResourceCommandInput,
44
44
  ListTagsForResourceCommandOutput,
45
45
  } from "./commands/ListTagsForResourceCommand";
46
+ import {
47
+ ListVersionsCommandInput,
48
+ ListVersionsCommandOutput,
49
+ } from "./commands/ListVersionsCommand";
46
50
  import {
47
51
  ListWorkspacesCommandInput,
48
52
  ListWorkspacesCommandOutput,
@@ -216,6 +220,19 @@ export interface Grafana {
216
220
  options: __HttpHandlerOptions,
217
221
  cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
218
222
  ): void;
223
+ listVersions(
224
+ args: ListVersionsCommandInput,
225
+ options?: __HttpHandlerOptions
226
+ ): Promise<ListVersionsCommandOutput>;
227
+ listVersions(
228
+ args: ListVersionsCommandInput,
229
+ cb: (err: any, data?: ListVersionsCommandOutput) => void
230
+ ): void;
231
+ listVersions(
232
+ args: ListVersionsCommandInput,
233
+ options: __HttpHandlerOptions,
234
+ cb: (err: any, data?: ListVersionsCommandOutput) => void
235
+ ): void;
219
236
  listWorkspaces(
220
237
  args: ListWorkspacesCommandInput,
221
238
  options?: __HttpHandlerOptions
@@ -88,6 +88,10 @@ import {
88
88
  ListTagsForResourceCommandInput,
89
89
  ListTagsForResourceCommandOutput,
90
90
  } from "./commands/ListTagsForResourceCommand";
91
+ import {
92
+ ListVersionsCommandInput,
93
+ ListVersionsCommandOutput,
94
+ } from "./commands/ListVersionsCommand";
91
95
  import {
92
96
  ListWorkspacesCommandInput,
93
97
  ListWorkspacesCommandOutput,
@@ -134,6 +138,7 @@ export type ServiceInputTypes =
134
138
  | DisassociateLicenseCommandInput
135
139
  | ListPermissionsCommandInput
136
140
  | ListTagsForResourceCommandInput
141
+ | ListVersionsCommandInput
137
142
  | ListWorkspacesCommandInput
138
143
  | TagResourceCommandInput
139
144
  | UntagResourceCommandInput
@@ -153,6 +158,7 @@ export type ServiceOutputTypes =
153
158
  | DisassociateLicenseCommandOutput
154
159
  | ListPermissionsCommandOutput
155
160
  | ListTagsForResourceCommandOutput
161
+ | ListVersionsCommandOutput
156
162
  | ListWorkspacesCommandOutput
157
163
  | TagResourceCommandOutput
158
164
  | UntagResourceCommandOutput
@@ -0,0 +1,35 @@
1
+ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import {
4
+ Handler,
5
+ HttpHandlerOptions as __HttpHandlerOptions,
6
+ MetadataBearer as __MetadataBearer,
7
+ MiddlewareStack,
8
+ } from "@smithy/types";
9
+ import {
10
+ GrafanaClientResolvedConfig,
11
+ ServiceInputTypes,
12
+ ServiceOutputTypes,
13
+ } from "../GrafanaClient";
14
+ import { ListVersionsRequest, ListVersionsResponse } from "../models/models_0";
15
+ export { __MetadataBearer, $Command };
16
+ export interface ListVersionsCommandInput extends ListVersionsRequest {}
17
+ export interface ListVersionsCommandOutput
18
+ extends ListVersionsResponse,
19
+ __MetadataBearer {}
20
+ export declare class ListVersionsCommand extends $Command<
21
+ ListVersionsCommandInput,
22
+ ListVersionsCommandOutput,
23
+ GrafanaClientResolvedConfig
24
+ > {
25
+ readonly input: ListVersionsCommandInput;
26
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
27
+ constructor(input: ListVersionsCommandInput);
28
+ resolveMiddleware(
29
+ clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
30
+ configuration: GrafanaClientResolvedConfig,
31
+ options?: __HttpHandlerOptions
32
+ ): Handler<ListVersionsCommandInput, ListVersionsCommandOutput>;
33
+ private serialize;
34
+ private deserialize;
35
+ }
@@ -9,6 +9,7 @@ export * from "./DescribeWorkspaceConfigurationCommand";
9
9
  export * from "./DisassociateLicenseCommand";
10
10
  export * from "./ListPermissionsCommand";
11
11
  export * from "./ListTagsForResourceCommand";
12
+ export * from "./ListVersionsCommand";
12
13
  export * from "./ListWorkspacesCommand";
13
14
  export * from "./TagResourceCommand";
14
15
  export * from "./UntagResourceCommand";
@@ -176,6 +176,8 @@ export declare const WorkspaceStatus: {
176
176
  readonly UPDATING: "UPDATING";
177
177
  readonly UPGRADE_FAILED: "UPGRADE_FAILED";
178
178
  readonly UPGRADING: "UPGRADING";
179
+ readonly VERSION_UPDATE_FAILED: "VERSION_UPDATE_FAILED";
180
+ readonly VERSION_UPDATING: "VERSION_UPDATING";
179
181
  };
180
182
  export type WorkspaceStatus =
181
183
  (typeof WorkspaceStatus)[keyof typeof WorkspaceStatus];
@@ -281,10 +283,12 @@ export interface DescribeWorkspaceConfigurationRequest {
281
283
  }
282
284
  export interface DescribeWorkspaceConfigurationResponse {
283
285
  configuration: __LazyJsonString | string | undefined;
286
+ grafanaVersion?: string;
284
287
  }
285
288
  export interface UpdateWorkspaceConfigurationRequest {
286
289
  configuration: __LazyJsonString | string | undefined;
287
290
  workspaceId: string | undefined;
291
+ grafanaVersion?: string;
288
292
  }
289
293
  export interface UpdateWorkspaceConfigurationResponse {}
290
294
  export interface DisassociateLicenseRequest {
@@ -300,6 +304,15 @@ export interface ListTagsForResourceRequest {
300
304
  export interface ListTagsForResourceResponse {
301
305
  tags?: Record<string, string>;
302
306
  }
307
+ export interface ListVersionsRequest {
308
+ maxResults?: number;
309
+ nextToken?: string;
310
+ workspaceId?: string;
311
+ }
312
+ export interface ListVersionsResponse {
313
+ nextToken?: string;
314
+ grafanaVersions?: string[];
315
+ }
303
316
  export declare const UserType: {
304
317
  readonly SSO_GROUP: "SSO_GROUP";
305
318
  readonly SSO_USER: "SSO_USER";
@@ -0,0 +1,11 @@
1
+ import { Paginator } from "@smithy/types";
2
+ import {
3
+ ListVersionsCommandInput,
4
+ ListVersionsCommandOutput,
5
+ } from "../commands/ListVersionsCommand";
6
+ import { GrafanaPaginationConfiguration } from "./Interfaces";
7
+ export declare function paginateListVersions(
8
+ config: GrafanaPaginationConfiguration,
9
+ input: ListVersionsCommandInput,
10
+ ...additionalArguments: any
11
+ ): Paginator<ListVersionsCommandOutput>;
@@ -1,3 +1,4 @@
1
1
  export * from "./Interfaces";
2
2
  export * from "./ListPermissionsPaginator";
3
+ export * from "./ListVersionsPaginator";
3
4
  export * from "./ListWorkspacesPaginator";
@@ -47,6 +47,10 @@ import {
47
47
  ListTagsForResourceCommandInput,
48
48
  ListTagsForResourceCommandOutput,
49
49
  } from "../commands/ListTagsForResourceCommand";
50
+ import {
51
+ ListVersionsCommandInput,
52
+ ListVersionsCommandOutput,
53
+ } from "../commands/ListVersionsCommand";
50
54
  import {
51
55
  ListWorkspacesCommandInput,
52
56
  ListWorkspacesCommandOutput,
@@ -119,6 +123,10 @@ export declare const se_ListTagsForResourceCommand: (
119
123
  input: ListTagsForResourceCommandInput,
120
124
  context: __SerdeContext
121
125
  ) => Promise<__HttpRequest>;
126
+ export declare const se_ListVersionsCommand: (
127
+ input: ListVersionsCommandInput,
128
+ context: __SerdeContext
129
+ ) => Promise<__HttpRequest>;
122
130
  export declare const se_ListWorkspacesCommand: (
123
131
  input: ListWorkspacesCommandInput,
124
132
  context: __SerdeContext
@@ -191,6 +199,10 @@ export declare const de_ListTagsForResourceCommand: (
191
199
  output: __HttpResponse,
192
200
  context: __SerdeContext
193
201
  ) => Promise<ListTagsForResourceCommandOutput>;
202
+ export declare const de_ListVersionsCommand: (
203
+ output: __HttpResponse,
204
+ context: __SerdeContext
205
+ ) => Promise<ListVersionsCommandOutput>;
194
206
  export declare const de_ListWorkspacesCommand: (
195
207
  output: __HttpResponse,
196
208
  context: __SerdeContext
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-grafana",
3
3
  "description": "AWS SDK for JavaScript Grafana Client for Node.js, Browser and React Native",
4
- "version": "3.370.0",
4
+ "version": "3.373.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",