@aws-sdk/client-grafana 3.525.0 → 3.529.1

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.
package/dist-cjs/index.js CHANGED
@@ -685,12 +685,15 @@ var UpdateWorkspaceResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) =>
685
685
  }), "UpdateWorkspaceResponseFilterSensitiveLog");
686
686
 
687
687
  // src/protocols/Aws_restJson1.ts
688
+ var import_core2 = require("@aws-sdk/core");
688
689
 
689
690
 
690
691
  var import_uuid = require("uuid");
691
692
  var se_AssociateLicenseCommand = /* @__PURE__ */ __name(async (input, context) => {
692
693
  const b = (0, import_core.requestBuilder)(input, context);
693
- const headers = {};
694
+ const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
695
+ [_gt]: input[_gT]
696
+ });
694
697
  b.bp("/workspaces/{workspaceId}/licenses/{licenseType}");
695
698
  b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
696
699
  b.p("licenseType", () => input.licenseType, "{licenseType}", false);
@@ -970,7 +973,7 @@ var de_AssociateLicenseCommand = /* @__PURE__ */ __name(async (output, context)
970
973
  const contents = (0, import_smithy_client.map)({
971
974
  $metadata: deserializeMetadata(output)
972
975
  });
973
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
976
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
974
977
  const doc = (0, import_smithy_client.take)(data, {
975
978
  workspace: (_) => de_WorkspaceDescription(_, context)
976
979
  });
@@ -984,7 +987,7 @@ var de_CreateWorkspaceCommand = /* @__PURE__ */ __name(async (output, context) =
984
987
  const contents = (0, import_smithy_client.map)({
985
988
  $metadata: deserializeMetadata(output)
986
989
  });
987
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
990
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
988
991
  const doc = (0, import_smithy_client.take)(data, {
989
992
  workspace: (_) => de_WorkspaceDescription(_, context)
990
993
  });
@@ -998,7 +1001,7 @@ var de_CreateWorkspaceApiKeyCommand = /* @__PURE__ */ __name(async (output, cont
998
1001
  const contents = (0, import_smithy_client.map)({
999
1002
  $metadata: deserializeMetadata(output)
1000
1003
  });
1001
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1004
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1002
1005
  const doc = (0, import_smithy_client.take)(data, {
1003
1006
  key: import_smithy_client.expectString,
1004
1007
  keyName: import_smithy_client.expectString,
@@ -1014,7 +1017,7 @@ var de_DeleteWorkspaceCommand = /* @__PURE__ */ __name(async (output, context) =
1014
1017
  const contents = (0, import_smithy_client.map)({
1015
1018
  $metadata: deserializeMetadata(output)
1016
1019
  });
1017
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1020
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1018
1021
  const doc = (0, import_smithy_client.take)(data, {
1019
1022
  workspace: (_) => de_WorkspaceDescription(_, context)
1020
1023
  });
@@ -1028,7 +1031,7 @@ var de_DeleteWorkspaceApiKeyCommand = /* @__PURE__ */ __name(async (output, cont
1028
1031
  const contents = (0, import_smithy_client.map)({
1029
1032
  $metadata: deserializeMetadata(output)
1030
1033
  });
1031
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1034
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1032
1035
  const doc = (0, import_smithy_client.take)(data, {
1033
1036
  keyName: import_smithy_client.expectString,
1034
1037
  workspaceId: import_smithy_client.expectString
@@ -1043,7 +1046,7 @@ var de_DescribeWorkspaceCommand = /* @__PURE__ */ __name(async (output, context)
1043
1046
  const contents = (0, import_smithy_client.map)({
1044
1047
  $metadata: deserializeMetadata(output)
1045
1048
  });
1046
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1049
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1047
1050
  const doc = (0, import_smithy_client.take)(data, {
1048
1051
  workspace: (_) => de_WorkspaceDescription(_, context)
1049
1052
  });
@@ -1057,7 +1060,7 @@ var de_DescribeWorkspaceAuthenticationCommand = /* @__PURE__ */ __name(async (ou
1057
1060
  const contents = (0, import_smithy_client.map)({
1058
1061
  $metadata: deserializeMetadata(output)
1059
1062
  });
1060
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1063
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1061
1064
  const doc = (0, import_smithy_client.take)(data, {
1062
1065
  authentication: import_smithy_client._json
1063
1066
  });
@@ -1071,7 +1074,7 @@ var de_DescribeWorkspaceConfigurationCommand = /* @__PURE__ */ __name(async (out
1071
1074
  const contents = (0, import_smithy_client.map)({
1072
1075
  $metadata: deserializeMetadata(output)
1073
1076
  });
1074
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1077
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1075
1078
  const doc = (0, import_smithy_client.take)(data, {
1076
1079
  configuration: (_) => new import_smithy_client.LazyJsonString(_),
1077
1080
  grafanaVersion: import_smithy_client.expectString
@@ -1086,7 +1089,7 @@ var de_DisassociateLicenseCommand = /* @__PURE__ */ __name(async (output, contex
1086
1089
  const contents = (0, import_smithy_client.map)({
1087
1090
  $metadata: deserializeMetadata(output)
1088
1091
  });
1089
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1092
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1090
1093
  const doc = (0, import_smithy_client.take)(data, {
1091
1094
  workspace: (_) => de_WorkspaceDescription(_, context)
1092
1095
  });
@@ -1100,7 +1103,7 @@ var de_ListPermissionsCommand = /* @__PURE__ */ __name(async (output, context) =
1100
1103
  const contents = (0, import_smithy_client.map)({
1101
1104
  $metadata: deserializeMetadata(output)
1102
1105
  });
1103
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1106
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1104
1107
  const doc = (0, import_smithy_client.take)(data, {
1105
1108
  nextToken: import_smithy_client.expectString,
1106
1109
  permissions: import_smithy_client._json
@@ -1115,7 +1118,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
1115
1118
  const contents = (0, import_smithy_client.map)({
1116
1119
  $metadata: deserializeMetadata(output)
1117
1120
  });
1118
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1121
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1119
1122
  const doc = (0, import_smithy_client.take)(data, {
1120
1123
  tags: import_smithy_client._json
1121
1124
  });
@@ -1129,7 +1132,7 @@ var de_ListVersionsCommand = /* @__PURE__ */ __name(async (output, context) => {
1129
1132
  const contents = (0, import_smithy_client.map)({
1130
1133
  $metadata: deserializeMetadata(output)
1131
1134
  });
1132
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1135
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1133
1136
  const doc = (0, import_smithy_client.take)(data, {
1134
1137
  grafanaVersions: import_smithy_client._json,
1135
1138
  nextToken: import_smithy_client.expectString
@@ -1144,7 +1147,7 @@ var de_ListWorkspacesCommand = /* @__PURE__ */ __name(async (output, context) =>
1144
1147
  const contents = (0, import_smithy_client.map)({
1145
1148
  $metadata: deserializeMetadata(output)
1146
1149
  });
1147
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1150
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1148
1151
  const doc = (0, import_smithy_client.take)(data, {
1149
1152
  nextToken: import_smithy_client.expectString,
1150
1153
  workspaces: (_) => de_WorkspaceList(_, context)
@@ -1179,7 +1182,7 @@ var de_UpdatePermissionsCommand = /* @__PURE__ */ __name(async (output, context)
1179
1182
  const contents = (0, import_smithy_client.map)({
1180
1183
  $metadata: deserializeMetadata(output)
1181
1184
  });
1182
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1185
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1183
1186
  const doc = (0, import_smithy_client.take)(data, {
1184
1187
  errors: import_smithy_client._json
1185
1188
  });
@@ -1193,7 +1196,7 @@ var de_UpdateWorkspaceCommand = /* @__PURE__ */ __name(async (output, context) =
1193
1196
  const contents = (0, import_smithy_client.map)({
1194
1197
  $metadata: deserializeMetadata(output)
1195
1198
  });
1196
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1199
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1197
1200
  const doc = (0, import_smithy_client.take)(data, {
1198
1201
  workspace: (_) => de_WorkspaceDescription(_, context)
1199
1202
  });
@@ -1207,7 +1210,7 @@ var de_UpdateWorkspaceAuthenticationCommand = /* @__PURE__ */ __name(async (outp
1207
1210
  const contents = (0, import_smithy_client.map)({
1208
1211
  $metadata: deserializeMetadata(output)
1209
1212
  });
1210
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1213
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
1211
1214
  const doc = (0, import_smithy_client.take)(data, {
1212
1215
  authentication: import_smithy_client._json
1213
1216
  });
@@ -1227,9 +1230,9 @@ var de_UpdateWorkspaceConfigurationCommand = /* @__PURE__ */ __name(async (outpu
1227
1230
  var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1228
1231
  const parsedOutput = {
1229
1232
  ...output,
1230
- body: await parseErrorBody(output.body, context)
1233
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
1231
1234
  };
1232
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1235
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
1233
1236
  switch (errorCode) {
1234
1237
  case "AccessDeniedException":
1235
1238
  case "com.amazonaws.grafana#AccessDeniedException":
@@ -1379,6 +1382,7 @@ var de_WorkspaceDescription = /* @__PURE__ */ __name((output, context) => {
1379
1382
  endpoint: import_smithy_client.expectString,
1380
1383
  freeTrialConsumed: import_smithy_client.expectBoolean,
1381
1384
  freeTrialExpiration: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
1385
+ grafanaToken: import_smithy_client.expectString,
1382
1386
  grafanaVersion: import_smithy_client.expectString,
1383
1387
  id: import_smithy_client.expectString,
1384
1388
  licenseExpiration: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
@@ -1409,8 +1413,10 @@ var de_WorkspaceSummary = /* @__PURE__ */ __name((output, context) => {
1409
1413
  created: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
1410
1414
  description: import_smithy_client.expectString,
1411
1415
  endpoint: import_smithy_client.expectString,
1416
+ grafanaToken: import_smithy_client.expectString,
1412
1417
  grafanaVersion: import_smithy_client.expectString,
1413
1418
  id: import_smithy_client.expectString,
1419
+ licenseType: import_smithy_client.expectString,
1414
1420
  modified: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
1415
1421
  name: import_smithy_client.expectString,
1416
1422
  notificationDestinations: import_smithy_client._json,
@@ -1424,8 +1430,10 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1424
1430
  extendedRequestId: output.headers["x-amz-id-2"],
1425
1431
  cfId: output.headers["x-amz-cf-id"]
1426
1432
  }), "deserializeMetadata");
1427
- var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
1433
+ var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0), "isSerializableHeaderValue");
1428
1434
  var _gI = "groupId";
1435
+ var _gT = "grafanaToken";
1436
+ var _gt = "grafana-token";
1429
1437
  var _mR = "maxResults";
1430
1438
  var _nT = "nextToken";
1431
1439
  var _rAS = "retryAfterSeconds";
@@ -1435,46 +1443,6 @@ var _uI = "userId";
1435
1443
  var _uT = "userType";
1436
1444
  var _wI = "workspaceId";
1437
1445
  var _wi = "workspace-id";
1438
- var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1439
- if (encoded.length) {
1440
- return JSON.parse(encoded);
1441
- }
1442
- return {};
1443
- }), "parseBody");
1444
- var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
1445
- const value = await parseBody(errorBody, context);
1446
- value.message = value.message ?? value.Message;
1447
- return value;
1448
- }, "parseErrorBody");
1449
- var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
1450
- const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
1451
- const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
1452
- let cleanValue = rawValue;
1453
- if (typeof cleanValue === "number") {
1454
- cleanValue = cleanValue.toString();
1455
- }
1456
- if (cleanValue.indexOf(",") >= 0) {
1457
- cleanValue = cleanValue.split(",")[0];
1458
- }
1459
- if (cleanValue.indexOf(":") >= 0) {
1460
- cleanValue = cleanValue.split(":")[0];
1461
- }
1462
- if (cleanValue.indexOf("#") >= 0) {
1463
- cleanValue = cleanValue.split("#")[1];
1464
- }
1465
- return cleanValue;
1466
- }, "sanitizeErrorCode");
1467
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1468
- if (headerKey !== void 0) {
1469
- return sanitizeErrorCode(output.headers[headerKey]);
1470
- }
1471
- if (data.code !== void 0) {
1472
- return sanitizeErrorCode(data.code);
1473
- }
1474
- if (data["__type"] !== void 0) {
1475
- return sanitizeErrorCode(data["__type"]);
1476
- }
1477
- }, "loadRestJsonErrorCode");
1478
1446
 
1479
1447
  // src/commands/AssociateLicenseCommand.ts
1480
1448
  var _AssociateLicenseCommand = class _AssociateLicenseCommand extends import_smithy_client.Command.classBuilder().ep({
@@ -1,3 +1,4 @@
1
+ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
1
2
  import { requestBuilder as rb } from "@smithy/core";
2
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
4
  import { v4 as generateIdempotencyToken } from "uuid";
@@ -5,7 +6,9 @@ import { GrafanaServiceException as __BaseException } from "../models/GrafanaSer
5
6
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
7
  export const se_AssociateLicenseCommand = async (input, context) => {
7
8
  const b = rb(input, context);
8
- const headers = {};
9
+ const headers = map({}, isSerializableHeaderValue, {
10
+ [_gt]: input[_gT],
11
+ });
9
12
  b.bp("/workspaces/{workspaceId}/licenses/{licenseType}");
10
13
  b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
11
14
  b.p("licenseType", () => input.licenseType, "{licenseType}", false);
@@ -680,6 +683,7 @@ const de_WorkspaceDescription = (output, context) => {
680
683
  endpoint: __expectString,
681
684
  freeTrialConsumed: __expectBoolean,
682
685
  freeTrialExpiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
686
+ grafanaToken: __expectString,
683
687
  grafanaVersion: __expectString,
684
688
  id: __expectString,
685
689
  licenseExpiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
@@ -712,8 +716,10 @@ const de_WorkspaceSummary = (output, context) => {
712
716
  created: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
713
717
  description: __expectString,
714
718
  endpoint: __expectString,
719
+ grafanaToken: __expectString,
715
720
  grafanaVersion: __expectString,
716
721
  id: __expectString,
722
+ licenseType: __expectString,
717
723
  modified: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
718
724
  name: __expectString,
719
725
  notificationDestinations: _json,
@@ -734,6 +740,8 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
734
740
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
735
741
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
736
742
  const _gI = "groupId";
743
+ const _gT = "grafanaToken";
744
+ const _gt = "grafana-token";
737
745
  const _mR = "maxResults";
738
746
  const _nT = "nextToken";
739
747
  const _rAS = "retryAfterSeconds";
@@ -743,43 +751,3 @@ const _uI = "userId";
743
751
  const _uT = "userType";
744
752
  const _wI = "workspaceId";
745
753
  const _wi = "workspace-id";
746
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
747
- if (encoded.length) {
748
- return JSON.parse(encoded);
749
- }
750
- return {};
751
- });
752
- const parseErrorBody = async (errorBody, context) => {
753
- const value = await parseBody(errorBody, context);
754
- value.message = value.message ?? value.Message;
755
- return value;
756
- };
757
- const loadRestJsonErrorCode = (output, data) => {
758
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
759
- const sanitizeErrorCode = (rawValue) => {
760
- let cleanValue = rawValue;
761
- if (typeof cleanValue === "number") {
762
- cleanValue = cleanValue.toString();
763
- }
764
- if (cleanValue.indexOf(",") >= 0) {
765
- cleanValue = cleanValue.split(",")[0];
766
- }
767
- if (cleanValue.indexOf(":") >= 0) {
768
- cleanValue = cleanValue.split(":")[0];
769
- }
770
- if (cleanValue.indexOf("#") >= 0) {
771
- cleanValue = cleanValue.split("#")[1];
772
- }
773
- return cleanValue;
774
- };
775
- const headerKey = findKey(output.headers, "x-amzn-errortype");
776
- if (headerKey !== undefined) {
777
- return sanitizeErrorCode(output.headers[headerKey]);
778
- }
779
- if (data.code !== undefined) {
780
- return sanitizeErrorCode(data.code);
781
- }
782
- if (data["__type"] !== undefined) {
783
- return sanitizeErrorCode(data["__type"]);
784
- }
785
- };
@@ -38,6 +38,7 @@ declare const AssociateLicenseCommand_base: {
38
38
  * const input = { // AssociateLicenseRequest
39
39
  * workspaceId: "STRING_VALUE", // required
40
40
  * licenseType: "STRING_VALUE", // required
41
+ * grafanaToken: "STRING_VALUE",
41
42
  * };
42
43
  * const command = new AssociateLicenseCommand(input);
43
44
  * const response = await client.send(command);
@@ -94,6 +95,7 @@ declare const AssociateLicenseCommand_base: {
94
95
  * // "STRING_VALUE",
95
96
  * // ],
96
97
  * // },
98
+ * // grafanaToken: "STRING_VALUE",
97
99
  * // },
98
100
  * // };
99
101
  *
@@ -135,6 +135,7 @@ declare const CreateWorkspaceCommand_base: {
135
135
  * // "STRING_VALUE",
136
136
  * // ],
137
137
  * // },
138
+ * // grafanaToken: "STRING_VALUE",
138
139
  * // },
139
140
  * // };
140
141
  *
@@ -91,6 +91,7 @@ declare const DeleteWorkspaceCommand_base: {
91
91
  * // "STRING_VALUE",
92
92
  * // ],
93
93
  * // },
94
+ * // grafanaToken: "STRING_VALUE",
94
95
  * // },
95
96
  * // };
96
97
  *
@@ -91,6 +91,7 @@ declare const DescribeWorkspaceCommand_base: {
91
91
  * // "STRING_VALUE",
92
92
  * // ],
93
93
  * // },
94
+ * // grafanaToken: "STRING_VALUE",
94
95
  * // },
95
96
  * // };
96
97
  *
@@ -92,6 +92,7 @@ declare const DisassociateLicenseCommand_base: {
92
92
  * // "STRING_VALUE",
93
93
  * // ],
94
94
  * // },
95
+ * // grafanaToken: "STRING_VALUE",
95
96
  * // },
96
97
  * // };
97
98
  *
@@ -63,6 +63,8 @@ declare const ListWorkspacesCommand_base: {
63
63
  * // tags: { // TagMap
64
64
  * // "<keys>": "STRING_VALUE",
65
65
  * // },
66
+ * // licenseType: "STRING_VALUE",
67
+ * // grafanaToken: "STRING_VALUE",
66
68
  * // },
67
69
  * // ],
68
70
  * // nextToken: "STRING_VALUE",
@@ -130,6 +130,7 @@ declare const UpdateWorkspaceCommand_base: {
130
130
  * // "STRING_VALUE",
131
131
  * // ],
132
132
  * // },
133
+ * // grafanaToken: "STRING_VALUE",
133
134
  * // },
134
135
  * // };
135
136
  *
@@ -356,8 +356,17 @@ export interface AssociateLicenseRequest {
356
356
  /**
357
357
  * @public
358
358
  * <p>The type of license to associate with the workspace.</p>
359
+ * <note>
360
+ * <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
361
+ * </note>
359
362
  */
360
363
  licenseType: LicenseType | undefined;
364
+ /**
365
+ * @public
366
+ * <p>A token from Grafana Labs that ties your Amazon Web Services account with a Grafana
367
+ * Labs account. For more information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise">Register with Grafana Labs</a>.</p>
368
+ */
369
+ grafanaToken?: string;
361
370
  }
362
371
  /**
363
372
  * @public
@@ -752,26 +761,37 @@ export interface WorkspaceDescription {
752
761
  workspaceRoleArn?: string;
753
762
  /**
754
763
  * @public
755
- * <p>Specifies whether this workspace has a full Grafana Enterprise license or a free trial
756
- * license.</p>
764
+ * <p>Specifies whether this workspace has a full Grafana Enterprise license.</p>
765
+ * <note>
766
+ * <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
767
+ * </note>
757
768
  */
758
769
  licenseType?: LicenseType;
759
770
  /**
760
771
  * @public
761
772
  * <p>Specifies whether this workspace has already fully used its free trial for Grafana
762
773
  * Enterprise.</p>
774
+ * <note>
775
+ * <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
776
+ * </note>
763
777
  */
764
778
  freeTrialConsumed?: boolean;
765
779
  /**
766
780
  * @public
767
- * <p>If this workspace has a full Grafana Enterprise license, this specifies when the
768
- * license ends and will need to be renewed.</p>
781
+ * <p>If this workspace has a full Grafana Enterprise license purchased through
782
+ * Amazon Web Services Marketplace, this specifies when the
783
+ * license ends and will need to be renewed. Purchasing the Enterprise plugins option
784
+ * through Amazon Managed Grafana does not have an expiration. It is valid until the
785
+ * license is removed.</p>
769
786
  */
770
787
  licenseExpiration?: Date;
771
788
  /**
772
789
  * @public
773
790
  * <p>If this workspace is currently in the free trial period for Grafana Enterprise, this
774
791
  * value specifies when that free trial ends.</p>
792
+ * <note>
793
+ * <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
794
+ * </note>
775
795
  */
776
796
  freeTrialExpiration?: Date;
777
797
  /**
@@ -795,6 +815,12 @@ export interface WorkspaceDescription {
795
815
  * <p>The configuration settings for network access to your workspace.</p>
796
816
  */
797
817
  networkAccessControl?: NetworkAccessConfiguration;
818
+ /**
819
+ * @public
820
+ * <p>The token that ties this workspace to a Grafana Labs account. For more information,
821
+ * see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise">Register with Grafana Labs</a>.</p>
822
+ */
823
+ grafanaToken?: string;
798
824
  }
799
825
  /**
800
826
  * @public
@@ -995,7 +1021,7 @@ export interface UpdateWorkspaceAuthenticationRequest {
995
1021
  workspaceId: string | undefined;
996
1022
  /**
997
1023
  * @public
998
- * <p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center (successor to Single Sign-On), or both to
1024
+ * <p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center, or both to
999
1025
  * authenticate users for using the Grafana console within a workspace. For more
1000
1026
  * information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/authentication-in-AMG.html">User authentication in
1001
1027
  * Amazon Managed Grafana</a>.</p>
@@ -1065,11 +1091,12 @@ export interface UpdateWorkspaceConfigurationRequest {
1065
1091
  workspaceId: string | undefined;
1066
1092
  /**
1067
1093
  * @public
1068
- * <p>Specifies the version of Grafana to support in the new workspace.</p>
1094
+ * <p>Specifies the version of Grafana to support in the workspace. If not specified,
1095
+ * keeps the current version of the workspace.</p>
1069
1096
  * <p>Can only be used to upgrade (for example, from 8.4 to 9.4), not
1070
1097
  * downgrade (for example, from 9.4 to 8.4).</p>
1071
1098
  * <p>To know what versions are available to upgrade to for a specific workspace, see
1072
- * the <code>ListVersions</code> operation.</p>
1099
+ * the <a href="https://docs.aws.amazon.com/grafana/latest/APIReference/API_ListVersions.html">ListVersions</a> operation.</p>
1073
1100
  */
1074
1101
  grafanaVersion?: string;
1075
1102
  }
@@ -1513,7 +1540,7 @@ export interface CreateWorkspaceRequest {
1513
1540
  workspaceRoleArn?: string;
1514
1541
  /**
1515
1542
  * @public
1516
- * <p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center (successor to Single Sign-On), or both to
1543
+ * <p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center, or both to
1517
1544
  * authenticate users for using the Grafana console within a workspace. For more
1518
1545
  * information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/authentication-in-AMG.html">User authentication in
1519
1546
  * Amazon Managed Grafana</a>.</p>
@@ -1554,8 +1581,9 @@ export interface CreateWorkspaceRequest {
1554
1581
  networkAccessControl?: NetworkAccessConfiguration;
1555
1582
  /**
1556
1583
  * @public
1557
- * <p>Specifies the version of Grafana to support in the new workspace.</p>
1558
- * <p>To get a list of supported version, use the <code>ListVersions</code>
1584
+ * <p>Specifies the version of Grafana to support in the new workspace. If not specified,
1585
+ * defaults to the latest version (for example, 9.4).</p>
1586
+ * <p>To get a list of supported versions, use the <code>ListVersions</code>
1559
1587
  * operation.</p>
1560
1588
  */
1561
1589
  grafanaVersion?: string;
@@ -1689,6 +1717,20 @@ export interface WorkspaceSummary {
1689
1717
  * <p>The list of tags associated with the workspace.</p>
1690
1718
  */
1691
1719
  tags?: Record<string, string>;
1720
+ /**
1721
+ * @public
1722
+ * <p>Specifies whether this workspace has a full Grafana Enterprise license.</p>
1723
+ * <note>
1724
+ * <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
1725
+ * </note>
1726
+ */
1727
+ licenseType?: LicenseType;
1728
+ /**
1729
+ * @public
1730
+ * <p>The token that ties this workspace to a Grafana Labs account. For more information,
1731
+ * see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise">Register with Grafana Labs</a>.</p>
1732
+ */
1733
+ grafanaToken?: string;
1692
1734
  }
1693
1735
  /**
1694
1736
  * @public
@@ -119,6 +119,7 @@ export type LicenseType = (typeof LicenseType)[keyof typeof LicenseType];
119
119
  export interface AssociateLicenseRequest {
120
120
  workspaceId: string | undefined;
121
121
  licenseType: LicenseType | undefined;
122
+ grafanaToken?: string;
122
123
  }
123
124
  export declare const AuthenticationProviderTypes: {
124
125
  readonly AWS_SSO: "AWS_SSO";
@@ -210,6 +211,7 @@ export interface WorkspaceDescription {
210
211
  tags?: Record<string, string>;
211
212
  vpcConfiguration?: VpcConfiguration;
212
213
  networkAccessControl?: NetworkAccessConfiguration;
214
+ grafanaToken?: string;
213
215
  }
214
216
  export interface AssociateLicenseResponse {
215
217
  workspace: WorkspaceDescription | undefined;
@@ -426,6 +428,8 @@ export interface WorkspaceSummary {
426
428
  status: WorkspaceStatus | undefined;
427
429
  authentication: AuthenticationSummary | undefined;
428
430
  tags?: Record<string, string>;
431
+ licenseType?: LicenseType;
432
+ grafanaToken?: string;
429
433
  }
430
434
  export interface ListWorkspacesResponse {
431
435
  workspaces: WorkspaceSummary[] | undefined;
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.525.0",
4
+ "version": "3.529.1",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-grafana",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.525.0",
24
- "@aws-sdk/core": "3.525.0",
25
- "@aws-sdk/credential-provider-node": "3.525.0",
23
+ "@aws-sdk/client-sts": "3.529.1",
24
+ "@aws-sdk/core": "3.529.1",
25
+ "@aws-sdk/credential-provider-node": "3.529.1",
26
26
  "@aws-sdk/middleware-host-header": "3.523.0",
27
27
  "@aws-sdk/middleware-logger": "3.523.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.523.0",