@aws-sdk/client-amp 3.145.0 → 3.154.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 (36) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist-cjs/Amp.js +60 -0
  3. package/dist-cjs/commands/CreateLoggingConfigurationCommand.js +36 -0
  4. package/dist-cjs/commands/DeleteLoggingConfigurationCommand.js +36 -0
  5. package/dist-cjs/commands/DescribeLoggingConfigurationCommand.js +36 -0
  6. package/dist-cjs/commands/UpdateLoggingConfigurationCommand.js +36 -0
  7. package/dist-cjs/commands/index.js +4 -0
  8. package/dist-cjs/models/models_0.js +47 -1
  9. package/dist-cjs/protocols/Aws_restJson1.js +277 -1
  10. package/dist-es/Amp.js +60 -0
  11. package/dist-es/commands/CreateLoggingConfigurationCommand.js +39 -0
  12. package/dist-es/commands/DeleteLoggingConfigurationCommand.js +39 -0
  13. package/dist-es/commands/DescribeLoggingConfigurationCommand.js +39 -0
  14. package/dist-es/commands/UpdateLoggingConfigurationCommand.js +39 -0
  15. package/dist-es/commands/index.js +4 -0
  16. package/dist-es/models/models_0.js +18 -0
  17. package/dist-es/protocols/Aws_restJson1.js +390 -0
  18. package/dist-types/Amp.d.ts +28 -0
  19. package/dist-types/AmpClient.d.ts +6 -2
  20. package/dist-types/commands/CreateLoggingConfigurationCommand.d.ts +35 -0
  21. package/dist-types/commands/DeleteLoggingConfigurationCommand.d.ts +35 -0
  22. package/dist-types/commands/DescribeLoggingConfigurationCommand.d.ts +35 -0
  23. package/dist-types/commands/UpdateLoggingConfigurationCommand.d.ts +35 -0
  24. package/dist-types/commands/index.d.ts +4 -0
  25. package/dist-types/models/models_0.d.ts +183 -0
  26. package/dist-types/protocols/Aws_restJson1.d.ts +12 -0
  27. package/dist-types/ts3.4/Amp.d.ts +20 -0
  28. package/dist-types/ts3.4/AmpClient.d.ts +6 -2
  29. package/dist-types/ts3.4/commands/CreateLoggingConfigurationCommand.d.ts +17 -0
  30. package/dist-types/ts3.4/commands/DeleteLoggingConfigurationCommand.d.ts +17 -0
  31. package/dist-types/ts3.4/commands/DescribeLoggingConfigurationCommand.d.ts +17 -0
  32. package/dist-types/ts3.4/commands/UpdateLoggingConfigurationCommand.d.ts +17 -0
  33. package/dist-types/ts3.4/commands/index.d.ts +4 -0
  34. package/dist-types/ts3.4/models/models_0.d.ts +97 -0
  35. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
  36. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1UpdateWorkspaceAliasCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutRuleGroupsNamespaceCommand = exports.deserializeAws_restJson1PutAlertManagerDefinitionCommand = exports.deserializeAws_restJson1ListWorkspacesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRuleGroupsNamespacesCommand = exports.deserializeAws_restJson1DescribeWorkspaceCommand = exports.deserializeAws_restJson1DescribeRuleGroupsNamespaceCommand = exports.deserializeAws_restJson1DescribeAlertManagerDefinitionCommand = exports.deserializeAws_restJson1DeleteWorkspaceCommand = exports.deserializeAws_restJson1DeleteRuleGroupsNamespaceCommand = exports.deserializeAws_restJson1DeleteAlertManagerDefinitionCommand = exports.deserializeAws_restJson1CreateWorkspaceCommand = exports.deserializeAws_restJson1CreateRuleGroupsNamespaceCommand = exports.deserializeAws_restJson1CreateAlertManagerDefinitionCommand = exports.serializeAws_restJson1UpdateWorkspaceAliasCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1PutRuleGroupsNamespaceCommand = exports.serializeAws_restJson1PutAlertManagerDefinitionCommand = exports.serializeAws_restJson1ListWorkspacesCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListRuleGroupsNamespacesCommand = exports.serializeAws_restJson1DescribeWorkspaceCommand = exports.serializeAws_restJson1DescribeRuleGroupsNamespaceCommand = exports.serializeAws_restJson1DescribeAlertManagerDefinitionCommand = exports.serializeAws_restJson1DeleteWorkspaceCommand = exports.serializeAws_restJson1DeleteRuleGroupsNamespaceCommand = exports.serializeAws_restJson1DeleteAlertManagerDefinitionCommand = exports.serializeAws_restJson1CreateWorkspaceCommand = exports.serializeAws_restJson1CreateRuleGroupsNamespaceCommand = exports.serializeAws_restJson1CreateAlertManagerDefinitionCommand = void 0;
3
+ exports.deserializeAws_restJson1UpdateWorkspaceAliasCommand = exports.deserializeAws_restJson1UpdateLoggingConfigurationCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutRuleGroupsNamespaceCommand = exports.deserializeAws_restJson1PutAlertManagerDefinitionCommand = exports.deserializeAws_restJson1ListWorkspacesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRuleGroupsNamespacesCommand = exports.deserializeAws_restJson1DescribeWorkspaceCommand = exports.deserializeAws_restJson1DescribeRuleGroupsNamespaceCommand = exports.deserializeAws_restJson1DescribeLoggingConfigurationCommand = exports.deserializeAws_restJson1DescribeAlertManagerDefinitionCommand = exports.deserializeAws_restJson1DeleteWorkspaceCommand = exports.deserializeAws_restJson1DeleteRuleGroupsNamespaceCommand = exports.deserializeAws_restJson1DeleteLoggingConfigurationCommand = exports.deserializeAws_restJson1DeleteAlertManagerDefinitionCommand = exports.deserializeAws_restJson1CreateWorkspaceCommand = exports.deserializeAws_restJson1CreateRuleGroupsNamespaceCommand = exports.deserializeAws_restJson1CreateLoggingConfigurationCommand = exports.deserializeAws_restJson1CreateAlertManagerDefinitionCommand = exports.serializeAws_restJson1UpdateWorkspaceAliasCommand = exports.serializeAws_restJson1UpdateLoggingConfigurationCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1PutRuleGroupsNamespaceCommand = exports.serializeAws_restJson1PutAlertManagerDefinitionCommand = exports.serializeAws_restJson1ListWorkspacesCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListRuleGroupsNamespacesCommand = exports.serializeAws_restJson1DescribeWorkspaceCommand = exports.serializeAws_restJson1DescribeRuleGroupsNamespaceCommand = exports.serializeAws_restJson1DescribeLoggingConfigurationCommand = exports.serializeAws_restJson1DescribeAlertManagerDefinitionCommand = exports.serializeAws_restJson1DeleteWorkspaceCommand = exports.serializeAws_restJson1DeleteRuleGroupsNamespaceCommand = exports.serializeAws_restJson1DeleteLoggingConfigurationCommand = exports.serializeAws_restJson1DeleteAlertManagerDefinitionCommand = exports.serializeAws_restJson1CreateWorkspaceCommand = exports.serializeAws_restJson1CreateRuleGroupsNamespaceCommand = exports.serializeAws_restJson1CreateLoggingConfigurationCommand = exports.serializeAws_restJson1CreateAlertManagerDefinitionCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const uuid_1 = require("uuid");
@@ -31,6 +31,30 @@ const serializeAws_restJson1CreateAlertManagerDefinitionCommand = async (input,
31
31
  });
32
32
  };
33
33
  exports.serializeAws_restJson1CreateAlertManagerDefinitionCommand = serializeAws_restJson1CreateAlertManagerDefinitionCommand;
34
+ const serializeAws_restJson1CreateLoggingConfigurationCommand = async (input, context) => {
35
+ var _a;
36
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const headers = {
38
+ "content-type": "application/json",
39
+ };
40
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
41
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
42
+ let body;
43
+ body = JSON.stringify({
44
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
45
+ ...(input.logGroupArn != null && { logGroupArn: input.logGroupArn }),
46
+ });
47
+ return new protocol_http_1.HttpRequest({
48
+ protocol,
49
+ hostname,
50
+ port,
51
+ method: "POST",
52
+ headers,
53
+ path: resolvedPath,
54
+ body,
55
+ });
56
+ };
57
+ exports.serializeAws_restJson1CreateLoggingConfigurationCommand = serializeAws_restJson1CreateLoggingConfigurationCommand;
34
58
  const serializeAws_restJson1CreateRuleGroupsNamespaceCommand = async (input, context) => {
35
59
  var _a;
36
60
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -104,6 +128,27 @@ const serializeAws_restJson1DeleteAlertManagerDefinitionCommand = async (input,
104
128
  });
105
129
  };
106
130
  exports.serializeAws_restJson1DeleteAlertManagerDefinitionCommand = serializeAws_restJson1DeleteAlertManagerDefinitionCommand;
131
+ const serializeAws_restJson1DeleteLoggingConfigurationCommand = async (input, context) => {
132
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
133
+ const headers = {};
134
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
135
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
136
+ const query = map({
137
+ clientToken: [, input.clientToken],
138
+ });
139
+ let body;
140
+ return new protocol_http_1.HttpRequest({
141
+ protocol,
142
+ hostname,
143
+ port,
144
+ method: "DELETE",
145
+ headers,
146
+ path: resolvedPath,
147
+ query,
148
+ body,
149
+ });
150
+ };
151
+ exports.serializeAws_restJson1DeleteLoggingConfigurationCommand = serializeAws_restJson1DeleteLoggingConfigurationCommand;
107
152
  const serializeAws_restJson1DeleteRuleGroupsNamespaceCommand = async (input, context) => {
108
153
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
109
154
  const headers = {};
@@ -166,6 +211,23 @@ const serializeAws_restJson1DescribeAlertManagerDefinitionCommand = async (input
166
211
  });
167
212
  };
168
213
  exports.serializeAws_restJson1DescribeAlertManagerDefinitionCommand = serializeAws_restJson1DescribeAlertManagerDefinitionCommand;
214
+ const serializeAws_restJson1DescribeLoggingConfigurationCommand = async (input, context) => {
215
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
216
+ const headers = {};
217
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
218
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
219
+ let body;
220
+ return new protocol_http_1.HttpRequest({
221
+ protocol,
222
+ hostname,
223
+ port,
224
+ method: "GET",
225
+ headers,
226
+ path: resolvedPath,
227
+ body,
228
+ });
229
+ };
230
+ exports.serializeAws_restJson1DescribeLoggingConfigurationCommand = serializeAws_restJson1DescribeLoggingConfigurationCommand;
169
231
  const serializeAws_restJson1DescribeRuleGroupsNamespaceCommand = async (input, context) => {
170
232
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
171
233
  const headers = {};
@@ -359,6 +421,30 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
359
421
  });
360
422
  };
361
423
  exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand;
424
+ const serializeAws_restJson1UpdateLoggingConfigurationCommand = async (input, context) => {
425
+ var _a;
426
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
427
+ const headers = {
428
+ "content-type": "application/json",
429
+ };
430
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging";
431
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
432
+ let body;
433
+ body = JSON.stringify({
434
+ clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
435
+ ...(input.logGroupArn != null && { logGroupArn: input.logGroupArn }),
436
+ });
437
+ return new protocol_http_1.HttpRequest({
438
+ protocol,
439
+ hostname,
440
+ port,
441
+ method: "PUT",
442
+ headers,
443
+ path: resolvedPath,
444
+ body,
445
+ });
446
+ };
447
+ exports.serializeAws_restJson1UpdateLoggingConfigurationCommand = serializeAws_restJson1UpdateLoggingConfigurationCommand;
362
448
  const serializeAws_restJson1UpdateWorkspaceAliasCommand = async (input, context) => {
363
449
  var _a;
364
450
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -435,6 +521,49 @@ const deserializeAws_restJson1CreateAlertManagerDefinitionCommandError = async (
435
521
  });
436
522
  }
437
523
  };
524
+ const deserializeAws_restJson1CreateLoggingConfigurationCommand = async (output, context) => {
525
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
526
+ return deserializeAws_restJson1CreateLoggingConfigurationCommandError(output, context);
527
+ }
528
+ const contents = map({
529
+ $metadata: deserializeMetadata(output),
530
+ });
531
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
532
+ if (data.status != null) {
533
+ contents.status = deserializeAws_restJson1LoggingConfigurationStatus(data.status, context);
534
+ }
535
+ return contents;
536
+ };
537
+ exports.deserializeAws_restJson1CreateLoggingConfigurationCommand = deserializeAws_restJson1CreateLoggingConfigurationCommand;
538
+ const deserializeAws_restJson1CreateLoggingConfigurationCommandError = async (output, context) => {
539
+ const parsedOutput = {
540
+ ...output,
541
+ body: await parseBody(output.body, context),
542
+ };
543
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
544
+ switch (errorCode) {
545
+ case "AccessDeniedException":
546
+ case "com.amazonaws.amp#AccessDeniedException":
547
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
548
+ case "InternalServerException":
549
+ case "com.amazonaws.amp#InternalServerException":
550
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
551
+ case "ResourceNotFoundException":
552
+ case "com.amazonaws.amp#ResourceNotFoundException":
553
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
554
+ case "ValidationException":
555
+ case "com.amazonaws.amp#ValidationException":
556
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
557
+ default:
558
+ const parsedBody = parsedOutput.body;
559
+ (0, smithy_client_1.throwDefaultError)({
560
+ output,
561
+ parsedBody,
562
+ exceptionCtor: AmpServiceException_1.AmpServiceException,
563
+ errorCode,
564
+ });
565
+ }
566
+ };
438
567
  const deserializeAws_restJson1CreateRuleGroupsNamespaceCommand = async (output, context) => {
439
568
  if (output.statusCode !== 202 && output.statusCode >= 300) {
440
569
  return deserializeAws_restJson1CreateRuleGroupsNamespaceCommandError(output, context);
@@ -600,6 +729,49 @@ const deserializeAws_restJson1DeleteAlertManagerDefinitionCommandError = async (
600
729
  });
601
730
  }
602
731
  };
732
+ const deserializeAws_restJson1DeleteLoggingConfigurationCommand = async (output, context) => {
733
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
734
+ return deserializeAws_restJson1DeleteLoggingConfigurationCommandError(output, context);
735
+ }
736
+ const contents = map({
737
+ $metadata: deserializeMetadata(output),
738
+ });
739
+ await collectBody(output.body, context);
740
+ return contents;
741
+ };
742
+ exports.deserializeAws_restJson1DeleteLoggingConfigurationCommand = deserializeAws_restJson1DeleteLoggingConfigurationCommand;
743
+ const deserializeAws_restJson1DeleteLoggingConfigurationCommandError = async (output, context) => {
744
+ const parsedOutput = {
745
+ ...output,
746
+ body: await parseBody(output.body, context),
747
+ };
748
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
749
+ switch (errorCode) {
750
+ case "AccessDeniedException":
751
+ case "com.amazonaws.amp#AccessDeniedException":
752
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
753
+ case "ConflictException":
754
+ case "com.amazonaws.amp#ConflictException":
755
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
756
+ case "InternalServerException":
757
+ case "com.amazonaws.amp#InternalServerException":
758
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
759
+ case "ResourceNotFoundException":
760
+ case "com.amazonaws.amp#ResourceNotFoundException":
761
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
762
+ case "ValidationException":
763
+ case "com.amazonaws.amp#ValidationException":
764
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
765
+ default:
766
+ const parsedBody = parsedOutput.body;
767
+ (0, smithy_client_1.throwDefaultError)({
768
+ output,
769
+ parsedBody,
770
+ exceptionCtor: AmpServiceException_1.AmpServiceException,
771
+ errorCode,
772
+ });
773
+ }
774
+ };
603
775
  const deserializeAws_restJson1DeleteRuleGroupsNamespaceCommand = async (output, context) => {
604
776
  if (output.statusCode !== 202 && output.statusCode >= 300) {
605
777
  return deserializeAws_restJson1DeleteRuleGroupsNamespaceCommandError(output, context);
@@ -738,6 +910,49 @@ const deserializeAws_restJson1DescribeAlertManagerDefinitionCommandError = async
738
910
  });
739
911
  }
740
912
  };
913
+ const deserializeAws_restJson1DescribeLoggingConfigurationCommand = async (output, context) => {
914
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
915
+ return deserializeAws_restJson1DescribeLoggingConfigurationCommandError(output, context);
916
+ }
917
+ const contents = map({
918
+ $metadata: deserializeMetadata(output),
919
+ });
920
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
921
+ if (data.loggingConfiguration != null) {
922
+ contents.loggingConfiguration = deserializeAws_restJson1LoggingConfigurationMetadata(data.loggingConfiguration, context);
923
+ }
924
+ return contents;
925
+ };
926
+ exports.deserializeAws_restJson1DescribeLoggingConfigurationCommand = deserializeAws_restJson1DescribeLoggingConfigurationCommand;
927
+ const deserializeAws_restJson1DescribeLoggingConfigurationCommandError = async (output, context) => {
928
+ const parsedOutput = {
929
+ ...output,
930
+ body: await parseBody(output.body, context),
931
+ };
932
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
933
+ switch (errorCode) {
934
+ case "AccessDeniedException":
935
+ case "com.amazonaws.amp#AccessDeniedException":
936
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
937
+ case "InternalServerException":
938
+ case "com.amazonaws.amp#InternalServerException":
939
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
940
+ case "ResourceNotFoundException":
941
+ case "com.amazonaws.amp#ResourceNotFoundException":
942
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
943
+ case "ValidationException":
944
+ case "com.amazonaws.amp#ValidationException":
945
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
946
+ default:
947
+ const parsedBody = parsedOutput.body;
948
+ (0, smithy_client_1.throwDefaultError)({
949
+ output,
950
+ parsedBody,
951
+ exceptionCtor: AmpServiceException_1.AmpServiceException,
952
+ errorCode,
953
+ });
954
+ }
955
+ };
741
956
  const deserializeAws_restJson1DescribeRuleGroupsNamespaceCommand = async (output, context) => {
742
957
  if (output.statusCode !== 200 && output.statusCode >= 300) {
743
958
  return deserializeAws_restJson1DescribeRuleGroupsNamespaceCommandError(output, context);
@@ -1170,6 +1385,52 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1170
1385
  });
1171
1386
  }
1172
1387
  };
1388
+ const deserializeAws_restJson1UpdateLoggingConfigurationCommand = async (output, context) => {
1389
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1390
+ return deserializeAws_restJson1UpdateLoggingConfigurationCommandError(output, context);
1391
+ }
1392
+ const contents = map({
1393
+ $metadata: deserializeMetadata(output),
1394
+ });
1395
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1396
+ if (data.status != null) {
1397
+ contents.status = deserializeAws_restJson1LoggingConfigurationStatus(data.status, context);
1398
+ }
1399
+ return contents;
1400
+ };
1401
+ exports.deserializeAws_restJson1UpdateLoggingConfigurationCommand = deserializeAws_restJson1UpdateLoggingConfigurationCommand;
1402
+ const deserializeAws_restJson1UpdateLoggingConfigurationCommandError = async (output, context) => {
1403
+ const parsedOutput = {
1404
+ ...output,
1405
+ body: await parseBody(output.body, context),
1406
+ };
1407
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1408
+ switch (errorCode) {
1409
+ case "AccessDeniedException":
1410
+ case "com.amazonaws.amp#AccessDeniedException":
1411
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1412
+ case "ConflictException":
1413
+ case "com.amazonaws.amp#ConflictException":
1414
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1415
+ case "InternalServerException":
1416
+ case "com.amazonaws.amp#InternalServerException":
1417
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1418
+ case "ResourceNotFoundException":
1419
+ case "com.amazonaws.amp#ResourceNotFoundException":
1420
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1421
+ case "ValidationException":
1422
+ case "com.amazonaws.amp#ValidationException":
1423
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1424
+ default:
1425
+ const parsedBody = parsedOutput.body;
1426
+ (0, smithy_client_1.throwDefaultError)({
1427
+ output,
1428
+ parsedBody,
1429
+ exceptionCtor: AmpServiceException_1.AmpServiceException,
1430
+ errorCode,
1431
+ });
1432
+ }
1433
+ };
1173
1434
  const deserializeAws_restJson1UpdateWorkspaceAliasCommand = async (output, context) => {
1174
1435
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1175
1436
  return deserializeAws_restJson1UpdateWorkspaceAliasCommandError(output, context);
@@ -1375,6 +1636,21 @@ const deserializeAws_restJson1AlertManagerDefinitionStatus = (output, context) =
1375
1636
  statusReason: (0, smithy_client_1.expectString)(output.statusReason),
1376
1637
  };
1377
1638
  };
1639
+ const deserializeAws_restJson1LoggingConfigurationMetadata = (output, context) => {
1640
+ return {
1641
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
1642
+ logGroupArn: (0, smithy_client_1.expectString)(output.logGroupArn),
1643
+ modifiedAt: output.modifiedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt))) : undefined,
1644
+ status: output.status != null ? deserializeAws_restJson1LoggingConfigurationStatus(output.status, context) : undefined,
1645
+ workspace: (0, smithy_client_1.expectString)(output.workspace),
1646
+ };
1647
+ };
1648
+ const deserializeAws_restJson1LoggingConfigurationStatus = (output, context) => {
1649
+ return {
1650
+ statusCode: (0, smithy_client_1.expectString)(output.statusCode),
1651
+ statusReason: (0, smithy_client_1.expectString)(output.statusReason),
1652
+ };
1653
+ };
1378
1654
  const deserializeAws_restJson1RuleGroupsNamespaceDescription = (output, context) => {
1379
1655
  return {
1380
1656
  arn: (0, smithy_client_1.expectString)(output.arn),
package/dist-es/Amp.js CHANGED
@@ -1,12 +1,15 @@
1
1
  import { __extends } from "tslib";
2
2
  import { AmpClient } from "./AmpClient";
3
3
  import { CreateAlertManagerDefinitionCommand, } from "./commands/CreateAlertManagerDefinitionCommand";
4
+ import { CreateLoggingConfigurationCommand, } from "./commands/CreateLoggingConfigurationCommand";
4
5
  import { CreateRuleGroupsNamespaceCommand, } from "./commands/CreateRuleGroupsNamespaceCommand";
5
6
  import { CreateWorkspaceCommand, } from "./commands/CreateWorkspaceCommand";
6
7
  import { DeleteAlertManagerDefinitionCommand, } from "./commands/DeleteAlertManagerDefinitionCommand";
8
+ import { DeleteLoggingConfigurationCommand, } from "./commands/DeleteLoggingConfigurationCommand";
7
9
  import { DeleteRuleGroupsNamespaceCommand, } from "./commands/DeleteRuleGroupsNamespaceCommand";
8
10
  import { DeleteWorkspaceCommand, } from "./commands/DeleteWorkspaceCommand";
9
11
  import { DescribeAlertManagerDefinitionCommand, } from "./commands/DescribeAlertManagerDefinitionCommand";
12
+ import { DescribeLoggingConfigurationCommand, } from "./commands/DescribeLoggingConfigurationCommand";
10
13
  import { DescribeRuleGroupsNamespaceCommand, } from "./commands/DescribeRuleGroupsNamespaceCommand";
11
14
  import { DescribeWorkspaceCommand, } from "./commands/DescribeWorkspaceCommand";
12
15
  import { ListRuleGroupsNamespacesCommand, } from "./commands/ListRuleGroupsNamespacesCommand";
@@ -16,6 +19,7 @@ import { PutAlertManagerDefinitionCommand, } from "./commands/PutAlertManagerDef
16
19
  import { PutRuleGroupsNamespaceCommand, } from "./commands/PutRuleGroupsNamespaceCommand";
17
20
  import { TagResourceCommand } from "./commands/TagResourceCommand";
18
21
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
22
+ import { UpdateLoggingConfigurationCommand, } from "./commands/UpdateLoggingConfigurationCommand";
19
23
  import { UpdateWorkspaceAliasCommand, } from "./commands/UpdateWorkspaceAliasCommand";
20
24
  var Amp = (function (_super) {
21
25
  __extends(Amp, _super);
@@ -36,6 +40,20 @@ var Amp = (function (_super) {
36
40
  return this.send(command, optionsOrCb);
37
41
  }
38
42
  };
43
+ Amp.prototype.createLoggingConfiguration = function (args, optionsOrCb, cb) {
44
+ var command = new CreateLoggingConfigurationCommand(args);
45
+ if (typeof optionsOrCb === "function") {
46
+ this.send(command, optionsOrCb);
47
+ }
48
+ else if (typeof cb === "function") {
49
+ if (typeof optionsOrCb !== "object")
50
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
51
+ this.send(command, optionsOrCb || {}, cb);
52
+ }
53
+ else {
54
+ return this.send(command, optionsOrCb);
55
+ }
56
+ };
39
57
  Amp.prototype.createRuleGroupsNamespace = function (args, optionsOrCb, cb) {
40
58
  var command = new CreateRuleGroupsNamespaceCommand(args);
41
59
  if (typeof optionsOrCb === "function") {
@@ -78,6 +96,20 @@ var Amp = (function (_super) {
78
96
  return this.send(command, optionsOrCb);
79
97
  }
80
98
  };
99
+ Amp.prototype.deleteLoggingConfiguration = function (args, optionsOrCb, cb) {
100
+ var command = new DeleteLoggingConfigurationCommand(args);
101
+ if (typeof optionsOrCb === "function") {
102
+ this.send(command, optionsOrCb);
103
+ }
104
+ else if (typeof cb === "function") {
105
+ if (typeof optionsOrCb !== "object")
106
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
107
+ this.send(command, optionsOrCb || {}, cb);
108
+ }
109
+ else {
110
+ return this.send(command, optionsOrCb);
111
+ }
112
+ };
81
113
  Amp.prototype.deleteRuleGroupsNamespace = function (args, optionsOrCb, cb) {
82
114
  var command = new DeleteRuleGroupsNamespaceCommand(args);
83
115
  if (typeof optionsOrCb === "function") {
@@ -120,6 +152,20 @@ var Amp = (function (_super) {
120
152
  return this.send(command, optionsOrCb);
121
153
  }
122
154
  };
155
+ Amp.prototype.describeLoggingConfiguration = function (args, optionsOrCb, cb) {
156
+ var command = new DescribeLoggingConfigurationCommand(args);
157
+ if (typeof optionsOrCb === "function") {
158
+ this.send(command, optionsOrCb);
159
+ }
160
+ else if (typeof cb === "function") {
161
+ if (typeof optionsOrCb !== "object")
162
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
163
+ this.send(command, optionsOrCb || {}, cb);
164
+ }
165
+ else {
166
+ return this.send(command, optionsOrCb);
167
+ }
168
+ };
123
169
  Amp.prototype.describeRuleGroupsNamespace = function (args, optionsOrCb, cb) {
124
170
  var command = new DescribeRuleGroupsNamespaceCommand(args);
125
171
  if (typeof optionsOrCb === "function") {
@@ -246,6 +292,20 @@ var Amp = (function (_super) {
246
292
  return this.send(command, optionsOrCb);
247
293
  }
248
294
  };
295
+ Amp.prototype.updateLoggingConfiguration = function (args, optionsOrCb, cb) {
296
+ var command = new UpdateLoggingConfigurationCommand(args);
297
+ if (typeof optionsOrCb === "function") {
298
+ this.send(command, optionsOrCb);
299
+ }
300
+ else if (typeof cb === "function") {
301
+ if (typeof optionsOrCb !== "object")
302
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
303
+ this.send(command, optionsOrCb || {}, cb);
304
+ }
305
+ else {
306
+ return this.send(command, optionsOrCb);
307
+ }
308
+ };
249
309
  Amp.prototype.updateWorkspaceAlias = function (args, optionsOrCb, cb) {
250
310
  var command = new UpdateWorkspaceAliasCommand(args);
251
311
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { CreateLoggingConfigurationRequestFilterSensitiveLog, CreateLoggingConfigurationResponseFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1CreateLoggingConfigurationCommand, serializeAws_restJson1CreateLoggingConfigurationCommand, } from "../protocols/Aws_restJson1";
6
+ var CreateLoggingConfigurationCommand = (function (_super) {
7
+ __extends(CreateLoggingConfigurationCommand, _super);
8
+ function CreateLoggingConfigurationCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ CreateLoggingConfigurationCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "AmpClient";
18
+ var commandName = "CreateLoggingConfigurationCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: CreateLoggingConfigurationRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: CreateLoggingConfigurationResponseFilterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ CreateLoggingConfigurationCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1CreateLoggingConfigurationCommand(input, context);
33
+ };
34
+ CreateLoggingConfigurationCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1CreateLoggingConfigurationCommand(output, context);
36
+ };
37
+ return CreateLoggingConfigurationCommand;
38
+ }($Command));
39
+ export { CreateLoggingConfigurationCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { DeleteLoggingConfigurationRequestFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1DeleteLoggingConfigurationCommand, serializeAws_restJson1DeleteLoggingConfigurationCommand, } from "../protocols/Aws_restJson1";
6
+ var DeleteLoggingConfigurationCommand = (function (_super) {
7
+ __extends(DeleteLoggingConfigurationCommand, _super);
8
+ function DeleteLoggingConfigurationCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ DeleteLoggingConfigurationCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "AmpClient";
18
+ var commandName = "DeleteLoggingConfigurationCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: DeleteLoggingConfigurationRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: function (output) { return output; },
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ DeleteLoggingConfigurationCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1DeleteLoggingConfigurationCommand(input, context);
33
+ };
34
+ DeleteLoggingConfigurationCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1DeleteLoggingConfigurationCommand(output, context);
36
+ };
37
+ return DeleteLoggingConfigurationCommand;
38
+ }($Command));
39
+ export { DeleteLoggingConfigurationCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { DescribeLoggingConfigurationRequestFilterSensitiveLog, DescribeLoggingConfigurationResponseFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1DescribeLoggingConfigurationCommand, serializeAws_restJson1DescribeLoggingConfigurationCommand, } from "../protocols/Aws_restJson1";
6
+ var DescribeLoggingConfigurationCommand = (function (_super) {
7
+ __extends(DescribeLoggingConfigurationCommand, _super);
8
+ function DescribeLoggingConfigurationCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ DescribeLoggingConfigurationCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "AmpClient";
18
+ var commandName = "DescribeLoggingConfigurationCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: DescribeLoggingConfigurationRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: DescribeLoggingConfigurationResponseFilterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ DescribeLoggingConfigurationCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1DescribeLoggingConfigurationCommand(input, context);
33
+ };
34
+ DescribeLoggingConfigurationCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1DescribeLoggingConfigurationCommand(output, context);
36
+ };
37
+ return DescribeLoggingConfigurationCommand;
38
+ }($Command));
39
+ export { DescribeLoggingConfigurationCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { UpdateLoggingConfigurationRequestFilterSensitiveLog, UpdateLoggingConfigurationResponseFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1UpdateLoggingConfigurationCommand, serializeAws_restJson1UpdateLoggingConfigurationCommand, } from "../protocols/Aws_restJson1";
6
+ var UpdateLoggingConfigurationCommand = (function (_super) {
7
+ __extends(UpdateLoggingConfigurationCommand, _super);
8
+ function UpdateLoggingConfigurationCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ UpdateLoggingConfigurationCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "AmpClient";
18
+ var commandName = "UpdateLoggingConfigurationCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: UpdateLoggingConfigurationRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: UpdateLoggingConfigurationResponseFilterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ UpdateLoggingConfigurationCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1UpdateLoggingConfigurationCommand(input, context);
33
+ };
34
+ UpdateLoggingConfigurationCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1UpdateLoggingConfigurationCommand(output, context);
36
+ };
37
+ return UpdateLoggingConfigurationCommand;
38
+ }($Command));
39
+ export { UpdateLoggingConfigurationCommand };
@@ -1,10 +1,13 @@
1
1
  export * from "./CreateAlertManagerDefinitionCommand";
2
+ export * from "./CreateLoggingConfigurationCommand";
2
3
  export * from "./CreateRuleGroupsNamespaceCommand";
3
4
  export * from "./CreateWorkspaceCommand";
4
5
  export * from "./DeleteAlertManagerDefinitionCommand";
6
+ export * from "./DeleteLoggingConfigurationCommand";
5
7
  export * from "./DeleteRuleGroupsNamespaceCommand";
6
8
  export * from "./DeleteWorkspaceCommand";
7
9
  export * from "./DescribeAlertManagerDefinitionCommand";
10
+ export * from "./DescribeLoggingConfigurationCommand";
8
11
  export * from "./DescribeRuleGroupsNamespaceCommand";
9
12
  export * from "./DescribeWorkspaceCommand";
10
13
  export * from "./ListRuleGroupsNamespacesCommand";
@@ -14,4 +17,5 @@ export * from "./PutAlertManagerDefinitionCommand";
14
17
  export * from "./PutRuleGroupsNamespaceCommand";
15
18
  export * from "./TagResourceCommand";
16
19
  export * from "./UntagResourceCommand";
20
+ export * from "./UpdateLoggingConfigurationCommand";
17
21
  export * from "./UpdateWorkspaceAliasCommand";