@aws-sdk/client-inspector2 3.127.0 → 3.131.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.
@@ -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 { GetConfigurationRequest, GetConfigurationResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1GetConfigurationCommand, serializeAws_restJson1GetConfigurationCommand, } from "../protocols/Aws_restJson1";
6
+ var GetConfigurationCommand = (function (_super) {
7
+ __extends(GetConfigurationCommand, _super);
8
+ function GetConfigurationCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ GetConfigurationCommand.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 = "Inspector2Client";
18
+ var commandName = "GetConfigurationCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: GetConfigurationRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: GetConfigurationResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ GetConfigurationCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1GetConfigurationCommand(input, context);
33
+ };
34
+ GetConfigurationCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1GetConfigurationCommand(output, context);
36
+ };
37
+ return GetConfigurationCommand;
38
+ }($Command));
39
+ export { GetConfigurationCommand };
@@ -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 { UpdateConfigurationRequest, UpdateConfigurationResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1UpdateConfigurationCommand, serializeAws_restJson1UpdateConfigurationCommand, } from "../protocols/Aws_restJson1";
6
+ var UpdateConfigurationCommand = (function (_super) {
7
+ __extends(UpdateConfigurationCommand, _super);
8
+ function UpdateConfigurationCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ UpdateConfigurationCommand.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 = "Inspector2Client";
18
+ var commandName = "UpdateConfigurationCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: UpdateConfigurationRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: UpdateConfigurationResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ UpdateConfigurationCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1UpdateConfigurationCommand(input, context);
33
+ };
34
+ UpdateConfigurationCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1UpdateConfigurationCommand(output, context);
36
+ };
37
+ return UpdateConfigurationCommand;
38
+ }($Command));
39
+ export { UpdateConfigurationCommand };
@@ -11,6 +11,7 @@ export * from "./DisableDelegatedAdminAccountCommand";
11
11
  export * from "./DisassociateMemberCommand";
12
12
  export * from "./EnableCommand";
13
13
  export * from "./EnableDelegatedAdminAccountCommand";
14
+ export * from "./GetConfigurationCommand";
14
15
  export * from "./GetDelegatedAdminAccountCommand";
15
16
  export * from "./GetFindingsReportStatusCommand";
16
17
  export * from "./GetMemberCommand";
@@ -26,5 +27,6 @@ export * from "./ListTagsForResourceCommand";
26
27
  export * from "./ListUsageTotalsCommand";
27
28
  export * from "./TagResourceCommand";
28
29
  export * from "./UntagResourceCommand";
30
+ export * from "./UpdateConfigurationCommand";
29
31
  export * from "./UpdateFilterCommand";
30
32
  export * from "./UpdateOrganizationConfigurationCommand";
@@ -65,6 +65,7 @@ export var AccountAggregationResponse;
65
65
  export var ErrorCode;
66
66
  (function (ErrorCode) {
67
67
  ErrorCode["ACCESS_DENIED"] = "ACCESS_DENIED";
68
+ ErrorCode["ACCOUNT_IS_ISOLATED"] = "ACCOUNT_IS_ISOLATED";
68
69
  ErrorCode["ALREADY_ENABLED"] = "ALREADY_ENABLED";
69
70
  ErrorCode["DISABLE_IN_PROGRESS"] = "DISABLE_IN_PROGRESS";
70
71
  ErrorCode["DISASSOCIATE_ALL_MEMBERS"] = "DISASSOCIATE_ALL_MEMBERS";
@@ -570,6 +571,7 @@ export var ScanStatusReason;
570
571
  ScanStatusReason["IMAGE_SIZE_EXCEEDED"] = "IMAGE_SIZE_EXCEEDED";
571
572
  ScanStatusReason["INTERNAL_ERROR"] = "INTERNAL_ERROR";
572
573
  ScanStatusReason["NO_RESOURCES_FOUND"] = "NO_RESOURCES_FOUND";
574
+ ScanStatusReason["PENDING_DISABLE"] = "PENDING_DISABLE";
573
575
  ScanStatusReason["PENDING_INITIAL_SCAN"] = "PENDING_INITIAL_SCAN";
574
576
  ScanStatusReason["RESOURCE_TERMINATED"] = "RESOURCE_TERMINATED";
575
577
  ScanStatusReason["SCAN_ELIGIBILITY_EXPIRED"] = "SCAN_ELIGIBILITY_EXPIRED";
@@ -749,6 +751,30 @@ export var DisassociateMemberResponse;
749
751
  (function (DisassociateMemberResponse) {
750
752
  DisassociateMemberResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
751
753
  })(DisassociateMemberResponse || (DisassociateMemberResponse = {}));
754
+ export var EcrRescanDuration;
755
+ (function (EcrRescanDuration) {
756
+ EcrRescanDuration["DAYS_180"] = "DAYS_180";
757
+ EcrRescanDuration["DAYS_30"] = "DAYS_30";
758
+ EcrRescanDuration["LIFETIME"] = "LIFETIME";
759
+ })(EcrRescanDuration || (EcrRescanDuration = {}));
760
+ export var EcrConfiguration;
761
+ (function (EcrConfiguration) {
762
+ EcrConfiguration.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
763
+ })(EcrConfiguration || (EcrConfiguration = {}));
764
+ export var EcrRescanDurationStatus;
765
+ (function (EcrRescanDurationStatus) {
766
+ EcrRescanDurationStatus["FAILED"] = "FAILED";
767
+ EcrRescanDurationStatus["PENDING"] = "PENDING";
768
+ EcrRescanDurationStatus["SUCCESS"] = "SUCCESS";
769
+ })(EcrRescanDurationStatus || (EcrRescanDurationStatus = {}));
770
+ export var EcrRescanDurationState;
771
+ (function (EcrRescanDurationState) {
772
+ EcrRescanDurationState.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
773
+ })(EcrRescanDurationState || (EcrRescanDurationState = {}));
774
+ export var EcrConfigurationState;
775
+ (function (EcrConfigurationState) {
776
+ EcrConfigurationState.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
777
+ })(EcrConfigurationState || (EcrConfigurationState = {}));
752
778
  export var EnableRequest;
753
779
  (function (EnableRequest) {
754
780
  EnableRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -809,11 +835,15 @@ export var PackageManager;
809
835
  PackageManager["GOBINARY"] = "GOBINARY";
810
836
  PackageManager["GOMOD"] = "GOMOD";
811
837
  PackageManager["JAR"] = "JAR";
838
+ PackageManager["NODEPKG"] = "NODEPKG";
812
839
  PackageManager["NPM"] = "NPM";
813
840
  PackageManager["NUGET"] = "NUGET";
814
841
  PackageManager["OS"] = "OS";
842
+ PackageManager["PIP"] = "PIP";
815
843
  PackageManager["PIPENV"] = "PIPENV";
816
844
  PackageManager["POETRY"] = "POETRY";
845
+ PackageManager["POM"] = "POM";
846
+ PackageManager["PYTHONPKG"] = "PYTHONPKG";
817
847
  PackageManager["YARN"] = "YARN";
818
848
  })(PackageManager || (PackageManager = {}));
819
849
  export var VulnerablePackage;
@@ -870,6 +900,14 @@ export var Finding;
870
900
  (function (Finding) {
871
901
  Finding.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
872
902
  })(Finding || (Finding = {}));
903
+ export var GetConfigurationRequest;
904
+ (function (GetConfigurationRequest) {
905
+ GetConfigurationRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
906
+ })(GetConfigurationRequest || (GetConfigurationRequest = {}));
907
+ export var GetConfigurationResponse;
908
+ (function (GetConfigurationResponse) {
909
+ GetConfigurationResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
910
+ })(GetConfigurationResponse || (GetConfigurationResponse = {}));
873
911
  export var GetDelegatedAdminAccountRequest;
874
912
  (function (GetDelegatedAdminAccountRequest) {
875
913
  GetDelegatedAdminAccountRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -884,8 +922,12 @@ export var GetFindingsReportStatusRequest;
884
922
  })(GetFindingsReportStatusRequest || (GetFindingsReportStatusRequest = {}));
885
923
  export var ReportingErrorCode;
886
924
  (function (ReportingErrorCode) {
925
+ ReportingErrorCode["BUCKET_NOT_FOUND"] = "BUCKET_NOT_FOUND";
926
+ ReportingErrorCode["INCOMPATIBLE_BUCKET_REGION"] = "INCOMPATIBLE_BUCKET_REGION";
887
927
  ReportingErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
888
928
  ReportingErrorCode["INVALID_PERMISSIONS"] = "INVALID_PERMISSIONS";
929
+ ReportingErrorCode["MALFORMED_KMS_KEY"] = "MALFORMED_KMS_KEY";
930
+ ReportingErrorCode["NO_FINDINGS_FOUND"] = "NO_FINDINGS_FOUND";
889
931
  })(ReportingErrorCode || (ReportingErrorCode = {}));
890
932
  export var GetFindingsReportStatusResponse;
891
933
  (function (GetFindingsReportStatusResponse) {
@@ -1054,6 +1096,14 @@ export var UntagResourceResponse;
1054
1096
  (function (UntagResourceResponse) {
1055
1097
  UntagResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1056
1098
  })(UntagResourceResponse || (UntagResourceResponse = {}));
1099
+ export var UpdateConfigurationRequest;
1100
+ (function (UpdateConfigurationRequest) {
1101
+ UpdateConfigurationRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1102
+ })(UpdateConfigurationRequest || (UpdateConfigurationRequest = {}));
1103
+ export var UpdateConfigurationResponse;
1104
+ (function (UpdateConfigurationResponse) {
1105
+ UpdateConfigurationResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1106
+ })(UpdateConfigurationResponse || (UpdateConfigurationResponse = {}));
1057
1107
  export var UpdateFilterRequest;
1058
1108
  (function (UpdateFilterRequest) {
1059
1109
  UpdateFilterRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -113,9 +113,9 @@ export var serializeAws_restJson1CreateFilterCommand = function (input, context)
113
113
  "content-type": "application/json",
114
114
  };
115
115
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/filters/create";
116
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.action != null && { action: input.action })), (input.description != null && { description: input.description })), (input.filterCriteria != null && {
116
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.action != null && { action: input.action })), (input.description != null && { description: input.description })), (input.filterCriteria != null && {
117
117
  filterCriteria: serializeAws_restJson1FilterCriteria(input.filterCriteria, context),
118
- })), (input.name != null && { name: input.name })), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
118
+ })), (input.name != null && { name: input.name })), (input.reason != null && { reason: input.reason })), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
119
119
  return [2, new __HttpRequest({
120
120
  protocol: protocol,
121
121
  hostname: hostname,
@@ -330,6 +330,30 @@ export var serializeAws_restJson1EnableDelegatedAdminAccountCommand = function (
330
330
  }
331
331
  });
332
332
  }); };
333
+ export var serializeAws_restJson1GetConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
334
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
335
+ return __generator(this, function (_c) {
336
+ switch (_c.label) {
337
+ case 0: return [4, context.endpoint()];
338
+ case 1:
339
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
340
+ headers = {
341
+ "content-type": "application/json",
342
+ };
343
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/configuration/get";
344
+ body = "";
345
+ return [2, new __HttpRequest({
346
+ protocol: protocol,
347
+ hostname: hostname,
348
+ port: port,
349
+ method: "POST",
350
+ headers: headers,
351
+ path: resolvedPath,
352
+ body: body,
353
+ })];
354
+ }
355
+ });
356
+ }); };
333
357
  export var serializeAws_restJson1GetDelegatedAdminAccountCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
334
358
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
335
359
  return __generator(this, function (_c) {
@@ -728,6 +752,32 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
728
752
  }
729
753
  });
730
754
  }); };
755
+ export var serializeAws_restJson1UpdateConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
756
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
757
+ return __generator(this, function (_c) {
758
+ switch (_c.label) {
759
+ case 0: return [4, context.endpoint()];
760
+ case 1:
761
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
762
+ headers = {
763
+ "content-type": "application/json",
764
+ };
765
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/configuration/update";
766
+ body = JSON.stringify(__assign({}, (input.ecrConfiguration != null && {
767
+ ecrConfiguration: serializeAws_restJson1EcrConfiguration(input.ecrConfiguration, context),
768
+ })));
769
+ return [2, new __HttpRequest({
770
+ protocol: protocol,
771
+ hostname: hostname,
772
+ port: port,
773
+ method: "POST",
774
+ headers: headers,
775
+ path: resolvedPath,
776
+ body: body,
777
+ })];
778
+ }
779
+ });
780
+ }); };
731
781
  export var serializeAws_restJson1UpdateFilterCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
732
782
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
733
783
  return __generator(this, function (_c) {
@@ -739,9 +789,9 @@ export var serializeAws_restJson1UpdateFilterCommand = function (input, context)
739
789
  "content-type": "application/json",
740
790
  };
741
791
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/filters/update";
742
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.action != null && { action: input.action })), (input.description != null && { description: input.description })), (input.filterArn != null && { filterArn: input.filterArn })), (input.filterCriteria != null && {
792
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.action != null && { action: input.action })), (input.description != null && { description: input.description })), (input.filterArn != null && { filterArn: input.filterArn })), (input.filterCriteria != null && {
743
793
  filterCriteria: serializeAws_restJson1FilterCriteria(input.filterCriteria, context),
744
- })), (input.name != null && { name: input.name })));
794
+ })), (input.name != null && { name: input.name })), (input.reason != null && { reason: input.reason })));
745
795
  return [2, new __HttpRequest({
746
796
  protocol: protocol,
747
797
  hostname: hostname,
@@ -1743,6 +1793,71 @@ var deserializeAws_restJson1EnableDelegatedAdminAccountCommandError = function (
1743
1793
  }
1744
1794
  });
1745
1795
  }); };
1796
+ export var deserializeAws_restJson1GetConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1797
+ var contents, data, _a, _b;
1798
+ return __generator(this, function (_c) {
1799
+ switch (_c.label) {
1800
+ case 0:
1801
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1802
+ return [2, deserializeAws_restJson1GetConfigurationCommandError(output, context)];
1803
+ }
1804
+ contents = {
1805
+ $metadata: deserializeMetadata(output),
1806
+ ecrConfiguration: undefined,
1807
+ };
1808
+ _a = __expectNonNull;
1809
+ _b = __expectObject;
1810
+ return [4, parseBody(output.body, context)];
1811
+ case 1:
1812
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1813
+ if (data.ecrConfiguration !== undefined && data.ecrConfiguration !== null) {
1814
+ contents.ecrConfiguration = deserializeAws_restJson1EcrConfigurationState(data.ecrConfiguration, context);
1815
+ }
1816
+ return [2, Promise.resolve(contents)];
1817
+ }
1818
+ });
1819
+ }); };
1820
+ var deserializeAws_restJson1GetConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1821
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1822
+ var _c;
1823
+ return __generator(this, function (_d) {
1824
+ switch (_d.label) {
1825
+ case 0:
1826
+ _a = [__assign({}, output)];
1827
+ _c = {};
1828
+ return [4, parseBody(output.body, context)];
1829
+ case 1:
1830
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1831
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1832
+ _b = errorCode;
1833
+ switch (_b) {
1834
+ case "InternalServerException": return [3, 2];
1835
+ case "com.amazonaws.inspector2#InternalServerException": return [3, 2];
1836
+ case "ResourceNotFoundException": return [3, 4];
1837
+ case "com.amazonaws.inspector2#ResourceNotFoundException": return [3, 4];
1838
+ case "ThrottlingException": return [3, 6];
1839
+ case "com.amazonaws.inspector2#ThrottlingException": return [3, 6];
1840
+ }
1841
+ return [3, 8];
1842
+ case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1843
+ case 3: throw _d.sent();
1844
+ case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1845
+ case 5: throw _d.sent();
1846
+ case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1847
+ case 7: throw _d.sent();
1848
+ case 8:
1849
+ parsedBody = parsedOutput.body;
1850
+ $metadata = deserializeMetadata(output);
1851
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1852
+ response = new __BaseException({
1853
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1854
+ $fault: "client",
1855
+ $metadata: $metadata,
1856
+ });
1857
+ throw __decorateServiceException(response, parsedBody);
1858
+ }
1859
+ });
1860
+ }); };
1746
1861
  export var deserializeAws_restJson1GetDelegatedAdminAccountCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1747
1862
  var contents, data, _a, _b;
1748
1863
  return __generator(this, function (_c) {
@@ -2830,6 +2945,69 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2830
2945
  }
2831
2946
  });
2832
2947
  }); };
2948
+ export var deserializeAws_restJson1UpdateConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2949
+ var contents;
2950
+ return __generator(this, function (_a) {
2951
+ switch (_a.label) {
2952
+ case 0:
2953
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2954
+ return [2, deserializeAws_restJson1UpdateConfigurationCommandError(output, context)];
2955
+ }
2956
+ contents = {
2957
+ $metadata: deserializeMetadata(output),
2958
+ };
2959
+ return [4, collectBody(output.body, context)];
2960
+ case 1:
2961
+ _a.sent();
2962
+ return [2, Promise.resolve(contents)];
2963
+ }
2964
+ });
2965
+ }); };
2966
+ var deserializeAws_restJson1UpdateConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2967
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2968
+ var _c;
2969
+ return __generator(this, function (_d) {
2970
+ switch (_d.label) {
2971
+ case 0:
2972
+ _a = [__assign({}, output)];
2973
+ _c = {};
2974
+ return [4, parseBody(output.body, context)];
2975
+ case 1:
2976
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2977
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2978
+ _b = errorCode;
2979
+ switch (_b) {
2980
+ case "AccessDeniedException": return [3, 2];
2981
+ case "com.amazonaws.inspector2#AccessDeniedException": return [3, 2];
2982
+ case "InternalServerException": return [3, 4];
2983
+ case "com.amazonaws.inspector2#InternalServerException": return [3, 4];
2984
+ case "ThrottlingException": return [3, 6];
2985
+ case "com.amazonaws.inspector2#ThrottlingException": return [3, 6];
2986
+ case "ValidationException": return [3, 8];
2987
+ case "com.amazonaws.inspector2#ValidationException": return [3, 8];
2988
+ }
2989
+ return [3, 10];
2990
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2991
+ case 3: throw _d.sent();
2992
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2993
+ case 5: throw _d.sent();
2994
+ case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
2995
+ case 7: throw _d.sent();
2996
+ case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2997
+ case 9: throw _d.sent();
2998
+ case 10:
2999
+ parsedBody = parsedOutput.body;
3000
+ $metadata = deserializeMetadata(output);
3001
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3002
+ response = new __BaseException({
3003
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3004
+ $fault: "client",
3005
+ $metadata: $metadata,
3006
+ });
3007
+ throw __decorateServiceException(response, parsedBody);
3008
+ }
3009
+ });
3010
+ }); };
2833
3011
  export var deserializeAws_restJson1UpdateFilterCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2834
3012
  var contents, data, _a, _b;
2835
3013
  return __generator(this, function (_c) {
@@ -3220,6 +3398,9 @@ var serializeAws_restJson1Ec2InstanceAggregation = function (input, context) {
3220
3398
  operatingSystems: serializeAws_restJson1StringFilterList(input.operatingSystems, context),
3221
3399
  })), (input.sortBy != null && { sortBy: input.sortBy })), (input.sortOrder != null && { sortOrder: input.sortOrder }));
3222
3400
  };
3401
+ var serializeAws_restJson1EcrConfiguration = function (input, context) {
3402
+ return __assign({}, (input.rescanDuration != null && { rescanDuration: input.rescanDuration }));
3403
+ };
3223
3404
  var serializeAws_restJson1EnableResourceTypeList = function (input, context) {
3224
3405
  return input
3225
3406
  .filter(function (e) { return e != null; })
@@ -3741,6 +3922,13 @@ var deserializeAws_restJson1Ec2Metadata = function (output, context) {
3741
3922
  tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
3742
3923
  };
3743
3924
  };
3925
+ var deserializeAws_restJson1EcrConfigurationState = function (output, context) {
3926
+ return {
3927
+ rescanDurationState: output.rescanDurationState != null
3928
+ ? deserializeAws_restJson1EcrRescanDurationState(output.rescanDurationState, context)
3929
+ : undefined,
3930
+ };
3931
+ };
3744
3932
  var deserializeAws_restJson1EcrContainerImageMetadata = function (output, context) {
3745
3933
  return {
3746
3934
  tags: output.tags != null ? deserializeAws_restJson1TagList(output.tags, context) : undefined,
@@ -3752,6 +3940,13 @@ var deserializeAws_restJson1EcrRepositoryMetadata = function (output, context) {
3752
3940
  scanFrequency: __expectString(output.scanFrequency),
3753
3941
  };
3754
3942
  };
3943
+ var deserializeAws_restJson1EcrRescanDurationState = function (output, context) {
3944
+ return {
3945
+ rescanDuration: __expectString(output.rescanDuration),
3946
+ status: __expectString(output.status),
3947
+ updatedAt: output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined,
3948
+ };
3949
+ };
3755
3950
  var deserializeAws_restJson1FailedAccount = function (output, context) {
3756
3951
  return {
3757
3952
  accountId: __expectString(output.accountId),
@@ -4495,6 +4690,9 @@ var loadRestJsonErrorCode = function (output, data) {
4495
4690
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
4496
4691
  var sanitizeErrorCode = function (rawValue) {
4497
4692
  var cleanValue = rawValue;
4693
+ if (typeof cleanValue === "number") {
4694
+ cleanValue = cleanValue.toString();
4695
+ }
4498
4696
  if (cleanValue.indexOf(":") >= 0) {
4499
4697
  cleanValue = cleanValue.split(":")[0];
4500
4698
  }
@@ -12,6 +12,7 @@ import { DisableDelegatedAdminAccountCommandInput, DisableDelegatedAdminAccountC
12
12
  import { DisassociateMemberCommandInput, DisassociateMemberCommandOutput } from "./commands/DisassociateMemberCommand";
13
13
  import { EnableCommandInput, EnableCommandOutput } from "./commands/EnableCommand";
14
14
  import { EnableDelegatedAdminAccountCommandInput, EnableDelegatedAdminAccountCommandOutput } from "./commands/EnableDelegatedAdminAccountCommand";
15
+ import { GetConfigurationCommandInput, GetConfigurationCommandOutput } from "./commands/GetConfigurationCommand";
15
16
  import { GetDelegatedAdminAccountCommandInput, GetDelegatedAdminAccountCommandOutput } from "./commands/GetDelegatedAdminAccountCommand";
16
17
  import { GetFindingsReportStatusCommandInput, GetFindingsReportStatusCommandOutput } from "./commands/GetFindingsReportStatusCommand";
17
18
  import { GetMemberCommandInput, GetMemberCommandOutput } from "./commands/GetMemberCommand";
@@ -27,6 +28,7 @@ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } fro
27
28
  import { ListUsageTotalsCommandInput, ListUsageTotalsCommandOutput } from "./commands/ListUsageTotalsCommand";
28
29
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
29
30
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
31
+ import { UpdateConfigurationCommandInput, UpdateConfigurationCommandOutput } from "./commands/UpdateConfigurationCommand";
30
32
  import { UpdateFilterCommandInput, UpdateFilterCommandOutput } from "./commands/UpdateFilterCommand";
31
33
  import { UpdateOrganizationConfigurationCommandInput, UpdateOrganizationConfigurationCommandOutput } from "./commands/UpdateOrganizationConfigurationCommand";
32
34
  import { Inspector2Client } from "./Inspector2Client";
@@ -114,6 +116,12 @@ export declare class Inspector2 extends Inspector2Client {
114
116
  enableDelegatedAdminAccount(args: EnableDelegatedAdminAccountCommandInput, options?: __HttpHandlerOptions): Promise<EnableDelegatedAdminAccountCommandOutput>;
115
117
  enableDelegatedAdminAccount(args: EnableDelegatedAdminAccountCommandInput, cb: (err: any, data?: EnableDelegatedAdminAccountCommandOutput) => void): void;
116
118
  enableDelegatedAdminAccount(args: EnableDelegatedAdminAccountCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: EnableDelegatedAdminAccountCommandOutput) => void): void;
119
+ /**
120
+ * <p>Retrieves setting configurations for Inspector scans.</p>
121
+ */
122
+ getConfiguration(args: GetConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<GetConfigurationCommandOutput>;
123
+ getConfiguration(args: GetConfigurationCommandInput, cb: (err: any, data?: GetConfigurationCommandOutput) => void): void;
124
+ getConfiguration(args: GetConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetConfigurationCommandOutput) => void): void;
117
125
  /**
118
126
  * <p>Retrieves information about the Amazon Inspector delegated administrator for your
119
127
  * organization.</p>
@@ -207,6 +215,12 @@ export declare class Inspector2 extends Inspector2Client {
207
215
  untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
208
216
  untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
209
217
  untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
218
+ /**
219
+ * <p>Updates setting configurations for your Amazon Inspector account. When you use this API as an Amazon Inspector delegated administrator this updates the setting for all accounts you manage. Member accounts in an organization cannot update this setting.</p>
220
+ */
221
+ updateConfiguration(args: UpdateConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<UpdateConfigurationCommandOutput>;
222
+ updateConfiguration(args: UpdateConfigurationCommandInput, cb: (err: any, data?: UpdateConfigurationCommandOutput) => void): void;
223
+ updateConfiguration(args: UpdateConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateConfigurationCommandOutput) => void): void;
210
224
  /**
211
225
  * <p>Specifies the action that is to be applied to the findings that match the filter.</p>
212
226
  */
@@ -19,6 +19,7 @@ import { DisableDelegatedAdminAccountCommandInput, DisableDelegatedAdminAccountC
19
19
  import { DisassociateMemberCommandInput, DisassociateMemberCommandOutput } from "./commands/DisassociateMemberCommand";
20
20
  import { EnableCommandInput, EnableCommandOutput } from "./commands/EnableCommand";
21
21
  import { EnableDelegatedAdminAccountCommandInput, EnableDelegatedAdminAccountCommandOutput } from "./commands/EnableDelegatedAdminAccountCommand";
22
+ import { GetConfigurationCommandInput, GetConfigurationCommandOutput } from "./commands/GetConfigurationCommand";
22
23
  import { GetDelegatedAdminAccountCommandInput, GetDelegatedAdminAccountCommandOutput } from "./commands/GetDelegatedAdminAccountCommand";
23
24
  import { GetFindingsReportStatusCommandInput, GetFindingsReportStatusCommandOutput } from "./commands/GetFindingsReportStatusCommand";
24
25
  import { GetMemberCommandInput, GetMemberCommandOutput } from "./commands/GetMemberCommand";
@@ -34,10 +35,11 @@ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } fro
34
35
  import { ListUsageTotalsCommandInput, ListUsageTotalsCommandOutput } from "./commands/ListUsageTotalsCommand";
35
36
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
36
37
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
38
+ import { UpdateConfigurationCommandInput, UpdateConfigurationCommandOutput } from "./commands/UpdateConfigurationCommand";
37
39
  import { UpdateFilterCommandInput, UpdateFilterCommandOutput } from "./commands/UpdateFilterCommand";
38
40
  import { UpdateOrganizationConfigurationCommandInput, UpdateOrganizationConfigurationCommandOutput } from "./commands/UpdateOrganizationConfigurationCommand";
39
- export declare type ServiceInputTypes = AssociateMemberCommandInput | BatchGetAccountStatusCommandInput | BatchGetFreeTrialInfoCommandInput | CancelFindingsReportCommandInput | CreateFilterCommandInput | CreateFindingsReportCommandInput | DeleteFilterCommandInput | DescribeOrganizationConfigurationCommandInput | DisableCommandInput | DisableDelegatedAdminAccountCommandInput | DisassociateMemberCommandInput | EnableCommandInput | EnableDelegatedAdminAccountCommandInput | GetDelegatedAdminAccountCommandInput | GetFindingsReportStatusCommandInput | GetMemberCommandInput | ListAccountPermissionsCommandInput | ListCoverageCommandInput | ListCoverageStatisticsCommandInput | ListDelegatedAdminAccountsCommandInput | ListFiltersCommandInput | ListFindingAggregationsCommandInput | ListFindingsCommandInput | ListMembersCommandInput | ListTagsForResourceCommandInput | ListUsageTotalsCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateFilterCommandInput | UpdateOrganizationConfigurationCommandInput;
40
- export declare type ServiceOutputTypes = AssociateMemberCommandOutput | BatchGetAccountStatusCommandOutput | BatchGetFreeTrialInfoCommandOutput | CancelFindingsReportCommandOutput | CreateFilterCommandOutput | CreateFindingsReportCommandOutput | DeleteFilterCommandOutput | DescribeOrganizationConfigurationCommandOutput | DisableCommandOutput | DisableDelegatedAdminAccountCommandOutput | DisassociateMemberCommandOutput | EnableCommandOutput | EnableDelegatedAdminAccountCommandOutput | GetDelegatedAdminAccountCommandOutput | GetFindingsReportStatusCommandOutput | GetMemberCommandOutput | ListAccountPermissionsCommandOutput | ListCoverageCommandOutput | ListCoverageStatisticsCommandOutput | ListDelegatedAdminAccountsCommandOutput | ListFiltersCommandOutput | ListFindingAggregationsCommandOutput | ListFindingsCommandOutput | ListMembersCommandOutput | ListTagsForResourceCommandOutput | ListUsageTotalsCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateFilterCommandOutput | UpdateOrganizationConfigurationCommandOutput;
41
+ export declare type ServiceInputTypes = AssociateMemberCommandInput | BatchGetAccountStatusCommandInput | BatchGetFreeTrialInfoCommandInput | CancelFindingsReportCommandInput | CreateFilterCommandInput | CreateFindingsReportCommandInput | DeleteFilterCommandInput | DescribeOrganizationConfigurationCommandInput | DisableCommandInput | DisableDelegatedAdminAccountCommandInput | DisassociateMemberCommandInput | EnableCommandInput | EnableDelegatedAdminAccountCommandInput | GetConfigurationCommandInput | GetDelegatedAdminAccountCommandInput | GetFindingsReportStatusCommandInput | GetMemberCommandInput | ListAccountPermissionsCommandInput | ListCoverageCommandInput | ListCoverageStatisticsCommandInput | ListDelegatedAdminAccountsCommandInput | ListFiltersCommandInput | ListFindingAggregationsCommandInput | ListFindingsCommandInput | ListMembersCommandInput | ListTagsForResourceCommandInput | ListUsageTotalsCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateConfigurationCommandInput | UpdateFilterCommandInput | UpdateOrganizationConfigurationCommandInput;
42
+ export declare type ServiceOutputTypes = AssociateMemberCommandOutput | BatchGetAccountStatusCommandOutput | BatchGetFreeTrialInfoCommandOutput | CancelFindingsReportCommandOutput | CreateFilterCommandOutput | CreateFindingsReportCommandOutput | DeleteFilterCommandOutput | DescribeOrganizationConfigurationCommandOutput | DisableCommandOutput | DisableDelegatedAdminAccountCommandOutput | DisassociateMemberCommandOutput | EnableCommandOutput | EnableDelegatedAdminAccountCommandOutput | GetConfigurationCommandOutput | GetDelegatedAdminAccountCommandOutput | GetFindingsReportStatusCommandOutput | GetMemberCommandOutput | ListAccountPermissionsCommandOutput | ListCoverageCommandOutput | ListCoverageStatisticsCommandOutput | ListDelegatedAdminAccountsCommandOutput | ListFiltersCommandOutput | ListFindingAggregationsCommandOutput | ListFindingsCommandOutput | ListMembersCommandOutput | ListTagsForResourceCommandOutput | ListUsageTotalsCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateConfigurationCommandOutput | UpdateFilterCommandOutput | UpdateOrganizationConfigurationCommandOutput;
41
43
  export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
42
44
  /**
43
45
  * The HTTP handler to use. Fetch in browser and Https in Nodejs.
@@ -0,0 +1,35 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { Inspector2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../Inspector2Client";
4
+ import { GetConfigurationRequest, GetConfigurationResponse } from "../models/models_0";
5
+ export interface GetConfigurationCommandInput extends GetConfigurationRequest {
6
+ }
7
+ export interface GetConfigurationCommandOutput extends GetConfigurationResponse, __MetadataBearer {
8
+ }
9
+ /**
10
+ * <p>Retrieves setting configurations for Inspector scans.</p>
11
+ * @example
12
+ * Use a bare-bones client and the command you need to make an API call.
13
+ * ```javascript
14
+ * import { Inspector2Client, GetConfigurationCommand } from "@aws-sdk/client-inspector2"; // ES Modules import
15
+ * // const { Inspector2Client, GetConfigurationCommand } = require("@aws-sdk/client-inspector2"); // CommonJS import
16
+ * const client = new Inspector2Client(config);
17
+ * const command = new GetConfigurationCommand(input);
18
+ * const response = await client.send(command);
19
+ * ```
20
+ *
21
+ * @see {@link GetConfigurationCommandInput} for command's `input` shape.
22
+ * @see {@link GetConfigurationCommandOutput} for command's `response` shape.
23
+ * @see {@link Inspector2ClientResolvedConfig | config} for Inspector2Client's `config` shape.
24
+ *
25
+ */
26
+ export declare class GetConfigurationCommand extends $Command<GetConfigurationCommandInput, GetConfigurationCommandOutput, Inspector2ClientResolvedConfig> {
27
+ readonly input: GetConfigurationCommandInput;
28
+ constructor(input: GetConfigurationCommandInput);
29
+ /**
30
+ * @internal
31
+ */
32
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: Inspector2ClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetConfigurationCommandInput, GetConfigurationCommandOutput>;
33
+ private serialize;
34
+ private deserialize;
35
+ }
@@ -0,0 +1,35 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { Inspector2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../Inspector2Client";
4
+ import { UpdateConfigurationRequest, UpdateConfigurationResponse } from "../models/models_0";
5
+ export interface UpdateConfigurationCommandInput extends UpdateConfigurationRequest {
6
+ }
7
+ export interface UpdateConfigurationCommandOutput extends UpdateConfigurationResponse, __MetadataBearer {
8
+ }
9
+ /**
10
+ * <p>Updates setting configurations for your Amazon Inspector account. When you use this API as an Amazon Inspector delegated administrator this updates the setting for all accounts you manage. Member accounts in an organization cannot update this setting.</p>
11
+ * @example
12
+ * Use a bare-bones client and the command you need to make an API call.
13
+ * ```javascript
14
+ * import { Inspector2Client, UpdateConfigurationCommand } from "@aws-sdk/client-inspector2"; // ES Modules import
15
+ * // const { Inspector2Client, UpdateConfigurationCommand } = require("@aws-sdk/client-inspector2"); // CommonJS import
16
+ * const client = new Inspector2Client(config);
17
+ * const command = new UpdateConfigurationCommand(input);
18
+ * const response = await client.send(command);
19
+ * ```
20
+ *
21
+ * @see {@link UpdateConfigurationCommandInput} for command's `input` shape.
22
+ * @see {@link UpdateConfigurationCommandOutput} for command's `response` shape.
23
+ * @see {@link Inspector2ClientResolvedConfig | config} for Inspector2Client's `config` shape.
24
+ *
25
+ */
26
+ export declare class UpdateConfigurationCommand extends $Command<UpdateConfigurationCommandInput, UpdateConfigurationCommandOutput, Inspector2ClientResolvedConfig> {
27
+ readonly input: UpdateConfigurationCommandInput;
28
+ constructor(input: UpdateConfigurationCommandInput);
29
+ /**
30
+ * @internal
31
+ */
32
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: Inspector2ClientResolvedConfig, options?: __HttpHandlerOptions): Handler<UpdateConfigurationCommandInput, UpdateConfigurationCommandOutput>;
33
+ private serialize;
34
+ private deserialize;
35
+ }
@@ -11,6 +11,7 @@ export * from "./DisableDelegatedAdminAccountCommand";
11
11
  export * from "./DisassociateMemberCommand";
12
12
  export * from "./EnableCommand";
13
13
  export * from "./EnableDelegatedAdminAccountCommand";
14
+ export * from "./GetConfigurationCommand";
14
15
  export * from "./GetDelegatedAdminAccountCommand";
15
16
  export * from "./GetFindingsReportStatusCommand";
16
17
  export * from "./GetMemberCommand";
@@ -26,5 +27,6 @@ export * from "./ListTagsForResourceCommand";
26
27
  export * from "./ListUsageTotalsCommand";
27
28
  export * from "./TagResourceCommand";
28
29
  export * from "./UntagResourceCommand";
30
+ export * from "./UpdateConfigurationCommand";
29
31
  export * from "./UpdateFilterCommand";
30
32
  export * from "./UpdateOrganizationConfigurationCommand";