@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.
- package/CHANGELOG.md +32 -0
- package/dist-cjs/Inspector2.js +30 -0
- package/dist-cjs/commands/GetConfigurationCommand.js +36 -0
- package/dist-cjs/commands/UpdateConfigurationCommand.js +36 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +66 -2
- package/dist-cjs/protocols/Aws_restJson1.js +155 -2
- package/dist-es/Inspector2.js +30 -0
- package/dist-es/commands/GetConfigurationCommand.js +39 -0
- package/dist-es/commands/UpdateConfigurationCommand.js +39 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +50 -0
- package/dist-es/protocols/Aws_restJson1.js +202 -4
- package/dist-types/Inspector2.d.ts +14 -0
- package/dist-types/Inspector2Client.d.ts +4 -2
- package/dist-types/commands/GetConfigurationCommand.d.ts +35 -0
- package/dist-types/commands/UpdateConfigurationCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +123 -2
- package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
- package/dist-types/ts3.4/Inspector2.d.ts +10 -0
- package/dist-types/ts3.4/Inspector2Client.d.ts +4 -2
- package/dist-types/ts3.4/commands/GetConfigurationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateConfigurationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +84 -1
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-inspector2
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.130.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.129.0...v3.130.0) (2022-07-14)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **codegen:** fix error code parsing when it's a number ([#3371](https://github.com/aws/aws-sdk-js-v3/issues/3371)) ([c2d8522](https://github.com/aws/aws-sdk-js-v3/commit/c2d852279a3d23958521a6ceb4f4c642b0cb1848))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **client-inspector2:** This release adds support for Inspector V2 scan configurations through the get and update configuration APIs. Currently this allows configuring ECR automated re-scan duration to lifetime or 180 days or 30 days. ([36bccb8](https://github.com/aws/aws-sdk-js-v3/commit/36bccb8557955688b1589fad74f5354b6e929a16))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [3.128.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.127.0...v3.128.0) (2022-07-12)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @aws-sdk/client-inspector2
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
# [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @aws-sdk/client-inspector2
|
package/dist-cjs/Inspector2.js
CHANGED
|
@@ -14,6 +14,7 @@ const DisableDelegatedAdminAccountCommand_1 = require("./commands/DisableDelegat
|
|
|
14
14
|
const DisassociateMemberCommand_1 = require("./commands/DisassociateMemberCommand");
|
|
15
15
|
const EnableCommand_1 = require("./commands/EnableCommand");
|
|
16
16
|
const EnableDelegatedAdminAccountCommand_1 = require("./commands/EnableDelegatedAdminAccountCommand");
|
|
17
|
+
const GetConfigurationCommand_1 = require("./commands/GetConfigurationCommand");
|
|
17
18
|
const GetDelegatedAdminAccountCommand_1 = require("./commands/GetDelegatedAdminAccountCommand");
|
|
18
19
|
const GetFindingsReportStatusCommand_1 = require("./commands/GetFindingsReportStatusCommand");
|
|
19
20
|
const GetMemberCommand_1 = require("./commands/GetMemberCommand");
|
|
@@ -29,6 +30,7 @@ const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceComm
|
|
|
29
30
|
const ListUsageTotalsCommand_1 = require("./commands/ListUsageTotalsCommand");
|
|
30
31
|
const TagResourceCommand_1 = require("./commands/TagResourceCommand");
|
|
31
32
|
const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
|
|
33
|
+
const UpdateConfigurationCommand_1 = require("./commands/UpdateConfigurationCommand");
|
|
32
34
|
const UpdateFilterCommand_1 = require("./commands/UpdateFilterCommand");
|
|
33
35
|
const UpdateOrganizationConfigurationCommand_1 = require("./commands/UpdateOrganizationConfigurationCommand");
|
|
34
36
|
const Inspector2Client_1 = require("./Inspector2Client");
|
|
@@ -215,6 +217,20 @@ class Inspector2 extends Inspector2Client_1.Inspector2Client {
|
|
|
215
217
|
return this.send(command, optionsOrCb);
|
|
216
218
|
}
|
|
217
219
|
}
|
|
220
|
+
getConfiguration(args, optionsOrCb, cb) {
|
|
221
|
+
const command = new GetConfigurationCommand_1.GetConfigurationCommand(args);
|
|
222
|
+
if (typeof optionsOrCb === "function") {
|
|
223
|
+
this.send(command, optionsOrCb);
|
|
224
|
+
}
|
|
225
|
+
else if (typeof cb === "function") {
|
|
226
|
+
if (typeof optionsOrCb !== "object")
|
|
227
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
228
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
return this.send(command, optionsOrCb);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
218
234
|
getDelegatedAdminAccount(args, optionsOrCb, cb) {
|
|
219
235
|
const command = new GetDelegatedAdminAccountCommand_1.GetDelegatedAdminAccountCommand(args);
|
|
220
236
|
if (typeof optionsOrCb === "function") {
|
|
@@ -425,6 +441,20 @@ class Inspector2 extends Inspector2Client_1.Inspector2Client {
|
|
|
425
441
|
return this.send(command, optionsOrCb);
|
|
426
442
|
}
|
|
427
443
|
}
|
|
444
|
+
updateConfiguration(args, optionsOrCb, cb) {
|
|
445
|
+
const command = new UpdateConfigurationCommand_1.UpdateConfigurationCommand(args);
|
|
446
|
+
if (typeof optionsOrCb === "function") {
|
|
447
|
+
this.send(command, optionsOrCb);
|
|
448
|
+
}
|
|
449
|
+
else if (typeof cb === "function") {
|
|
450
|
+
if (typeof optionsOrCb !== "object")
|
|
451
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
452
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
return this.send(command, optionsOrCb);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
428
458
|
updateFilter(args, optionsOrCb, cb) {
|
|
429
459
|
const command = new UpdateFilterCommand_1.UpdateFilterCommand(args);
|
|
430
460
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetConfigurationCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
8
|
+
class GetConfigurationCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "Inspector2Client";
|
|
18
|
+
const commandName = "GetConfigurationCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.GetConfigurationRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.GetConfigurationResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return (0, Aws_restJson1_1.serializeAws_restJson1GetConfigurationCommand)(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return (0, Aws_restJson1_1.deserializeAws_restJson1GetConfigurationCommand)(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.GetConfigurationCommand = GetConfigurationCommand;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateConfigurationCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
8
|
+
class UpdateConfigurationCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "Inspector2Client";
|
|
18
|
+
const commandName = "UpdateConfigurationCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.UpdateConfigurationRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.UpdateConfigurationResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return (0, Aws_restJson1_1.serializeAws_restJson1UpdateConfigurationCommand)(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return (0, Aws_restJson1_1.deserializeAws_restJson1UpdateConfigurationCommand)(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.UpdateConfigurationCommand = UpdateConfigurationCommand;
|
|
@@ -14,6 +14,7 @@ tslib_1.__exportStar(require("./DisableDelegatedAdminAccountCommand"), exports);
|
|
|
14
14
|
tslib_1.__exportStar(require("./DisassociateMemberCommand"), exports);
|
|
15
15
|
tslib_1.__exportStar(require("./EnableCommand"), exports);
|
|
16
16
|
tslib_1.__exportStar(require("./EnableDelegatedAdminAccountCommand"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./GetConfigurationCommand"), exports);
|
|
17
18
|
tslib_1.__exportStar(require("./GetDelegatedAdminAccountCommand"), exports);
|
|
18
19
|
tslib_1.__exportStar(require("./GetFindingsReportStatusCommand"), exports);
|
|
19
20
|
tslib_1.__exportStar(require("./GetMemberCommand"), exports);
|
|
@@ -29,5 +30,6 @@ tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
|
|
|
29
30
|
tslib_1.__exportStar(require("./ListUsageTotalsCommand"), exports);
|
|
30
31
|
tslib_1.__exportStar(require("./TagResourceCommand"), exports);
|
|
31
32
|
tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
|
|
33
|
+
tslib_1.__exportStar(require("./UpdateConfigurationCommand"), exports);
|
|
32
34
|
tslib_1.__exportStar(require("./UpdateFilterCommand"), exports);
|
|
33
35
|
tslib_1.__exportStar(require("./UpdateOrganizationConfigurationCommand"), exports);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ThrottlingException = exports.InternalServerException = exports.AssociateMemberResponse = exports.AssociateMemberRequest = exports.AggregationType = exports.AggregationResponse = exports.TitleAggregationResponse = exports.RepositoryAggregationResponse = exports.PackageAggregationResponse = exports.ImageLayerAggregationResponse = exports.FindingTypeAggregationResponse = exports.Ec2InstanceAggregationResponse = exports.AwsEcrContainerAggregationResponse = exports.AmiAggregationResponse = exports.AggregationRequest = exports.TitleAggregation = exports.TitleSortBy = exports.RepositoryAggregation = exports.RepositorySortBy = exports.PackageAggregation = exports.PackageSortBy = exports.ImageLayerAggregation = exports.ImageLayerSortBy = exports.FindingTypeAggregation = exports.FindingTypeSortBy = exports.Ec2InstanceAggregation = exports.Ec2InstanceSortBy = exports.MapFilter = exports.MapComparison = exports.AwsEcrContainerAggregation = exports.AwsEcrContainerSortBy = exports.AmiAggregation = exports.AmiSortBy = exports.StringFilter = exports.StringComparison = exports.AccountState = exports.ResourceState = exports.State = exports.ErrorCode = exports.AccountAggregationResponse = exports.SeverityCounts = exports.AccountAggregation = exports.SortOrder = exports.AccountSortBy = exports.AggregationResourceType = exports.AggregationFindingType = exports.Account = exports.ResourceStatus = exports.Status = exports.AccessDeniedException = void 0;
|
|
4
4
|
exports.ServiceQuotaExceededException = exports.CreateFilterResponse = exports.CreateFilterRequest = exports.FilterCriteria = exports.PackageFilter = exports.PortRangeFilter = exports.NumberFilter = exports.DateFilter = exports.FilterAction = exports.CoveredResource = exports.ScanType = exports.ScanStatus = exports.ScanStatusCode = exports.ScanStatusReason = exports.ResourceScanMetadata = exports.EcrRepositoryMetadata = exports.EcrScanFrequency = exports.EcrContainerImageMetadata = exports.Ec2Metadata = exports.Ec2Platform = exports.CoverageResourceType = exports.CoverageFilterCriteria = exports.CoverageMapFilter = exports.CoverageMapComparison = exports.CoverageStringFilter = exports.CoverageStringComparison = exports.Counts = exports.GroupKey = exports.ConflictException = exports.CancelFindingsReportResponse = exports.CancelFindingsReportRequest = exports.BatchGetFreeTrialInfoResponse = exports.FreeTrialInfoError = exports.FreeTrialInfoErrorCode = exports.FreeTrialAccountInfo = exports.FreeTrialInfo = exports.FreeTrialType = exports.FreeTrialStatus = exports.BatchGetFreeTrialInfoRequest = exports.ResourceNotFoundException = exports.BatchGetAccountStatusResponse = exports.FailedAccount = exports.BatchGetAccountStatusRequest = exports.BadRequestException = exports.AwsEcrContainerImageDetails = exports.AwsEc2InstanceDetails = exports.AutoEnable = exports.ValidationException = exports.ValidationExceptionReason = exports.ValidationExceptionField = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.UpdateOrganizationConfigurationResponse = exports.UpdateOrganizationConfigurationRequest = exports.UpdateFilterResponse = exports.UpdateFilterRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.ListUsageTotalsResponse = exports.UsageTotal = exports.Usage = exports.UsageType = exports.ListUsageTotalsRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListMembersResponse = exports.ListMembersRequest = exports.ListFindingsResponse = exports.ListFindingsRequest = exports.SortCriteria = exports.SortField = exports.ListFindingAggregationsResponse = exports.ListFindingAggregationsRequest = exports.ListFiltersResponse = exports.ListFiltersRequest = exports.ListDelegatedAdminAccountsResponse = exports.ListDelegatedAdminAccountsRequest = exports.ListCoverageStatisticsResponse = exports.ListCoverageStatisticsRequest = exports.ListCoverageResponse = exports.ListCoverageRequest = exports.ListAccountPermissionsResponse = exports.Permission = exports.Operation = exports.ListAccountPermissionsRequest = exports.Service = exports.GetMemberResponse = exports.Member = exports.GetMemberRequest = exports.GetFindingsReportStatusResponse = exports.ReportingErrorCode = void 0;
|
|
5
|
+
exports.FindingStatus = exports.Severity = exports.Resource = exports.ResourceType = exports.ResourceDetails = exports.Remediation = exports.Recommendation = exports.PackageVulnerabilityDetails = exports.VulnerablePackage = exports.PackageManager = exports.NetworkReachabilityDetails = exports.NetworkProtocol = exports.PortRange = exports.NetworkPath = exports.Step = exports.InspectorScoreDetails = exports.Filter = exports.ExternalReportStatus = exports.EnableDelegatedAdminAccountResponse = exports.EnableDelegatedAdminAccountRequest = exports.EnableResponse = exports.EnableRequest = exports.EcrConfigurationState = exports.EcrRescanDurationState = exports.EcrRescanDurationStatus = exports.EcrConfiguration = exports.EcrRescanDuration = exports.DisassociateMemberResponse = exports.DisassociateMemberRequest = exports.DisableDelegatedAdminAccountResponse = exports.DisableDelegatedAdminAccountRequest = exports.DisableResponse = exports.DisableRequest = exports.ResourceScanType = exports.DescribeOrganizationConfigurationResponse = exports.DescribeOrganizationConfigurationRequest = exports.DeleteFilterResponse = exports.DeleteFilterRequest = exports.DelegatedAdminAccount = exports.DelegatedAdminStatus = exports.DelegatedAdmin = exports.RelationshipStatus = exports.CvssScoreDetails = exports.CvssScoreAdjustment = exports.CvssScore = exports.Currency = exports.CreateFindingsReportResponse = exports.CreateFindingsReportRequest = exports.Destination = exports.ReportFormat = void 0;
|
|
6
|
+
exports.UpdateOrganizationConfigurationResponse = exports.UpdateOrganizationConfigurationRequest = exports.UpdateFilterResponse = exports.UpdateFilterRequest = exports.UpdateConfigurationResponse = exports.UpdateConfigurationRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.ListUsageTotalsResponse = exports.UsageTotal = exports.Usage = exports.UsageType = exports.ListUsageTotalsRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListMembersResponse = exports.ListMembersRequest = exports.ListFindingsResponse = exports.ListFindingsRequest = exports.SortCriteria = exports.SortField = exports.ListFindingAggregationsResponse = exports.ListFindingAggregationsRequest = exports.ListFiltersResponse = exports.ListFiltersRequest = exports.ListDelegatedAdminAccountsResponse = exports.ListDelegatedAdminAccountsRequest = exports.ListCoverageStatisticsResponse = exports.ListCoverageStatisticsRequest = exports.ListCoverageResponse = exports.ListCoverageRequest = exports.ListAccountPermissionsResponse = exports.Permission = exports.Operation = exports.ListAccountPermissionsRequest = exports.Service = exports.GetMemberResponse = exports.Member = exports.GetMemberRequest = exports.GetFindingsReportStatusResponse = exports.ReportingErrorCode = exports.GetFindingsReportStatusRequest = exports.GetDelegatedAdminAccountResponse = exports.GetDelegatedAdminAccountRequest = exports.GetConfigurationResponse = exports.GetConfigurationRequest = exports.Finding = exports.FindingType = void 0;
|
|
7
7
|
const Inspector2ServiceException_1 = require("./Inspector2ServiceException");
|
|
8
8
|
class AccessDeniedException extends Inspector2ServiceException_1.Inspector2ServiceException {
|
|
9
9
|
constructor(opts) {
|
|
@@ -81,6 +81,7 @@ var AccountAggregationResponse;
|
|
|
81
81
|
var ErrorCode;
|
|
82
82
|
(function (ErrorCode) {
|
|
83
83
|
ErrorCode["ACCESS_DENIED"] = "ACCESS_DENIED";
|
|
84
|
+
ErrorCode["ACCOUNT_IS_ISOLATED"] = "ACCOUNT_IS_ISOLATED";
|
|
84
85
|
ErrorCode["ALREADY_ENABLED"] = "ALREADY_ENABLED";
|
|
85
86
|
ErrorCode["DISABLE_IN_PROGRESS"] = "DISABLE_IN_PROGRESS";
|
|
86
87
|
ErrorCode["DISASSOCIATE_ALL_MEMBERS"] = "DISASSOCIATE_ALL_MEMBERS";
|
|
@@ -680,6 +681,7 @@ var ScanStatusReason;
|
|
|
680
681
|
ScanStatusReason["IMAGE_SIZE_EXCEEDED"] = "IMAGE_SIZE_EXCEEDED";
|
|
681
682
|
ScanStatusReason["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
|
682
683
|
ScanStatusReason["NO_RESOURCES_FOUND"] = "NO_RESOURCES_FOUND";
|
|
684
|
+
ScanStatusReason["PENDING_DISABLE"] = "PENDING_DISABLE";
|
|
683
685
|
ScanStatusReason["PENDING_INITIAL_SCAN"] = "PENDING_INITIAL_SCAN";
|
|
684
686
|
ScanStatusReason["RESOURCE_TERMINATED"] = "RESOURCE_TERMINATED";
|
|
685
687
|
ScanStatusReason["SCAN_ELIGIBILITY_EXPIRED"] = "SCAN_ELIGIBILITY_EXPIRED";
|
|
@@ -914,6 +916,36 @@ var DisassociateMemberResponse;
|
|
|
914
916
|
...obj,
|
|
915
917
|
});
|
|
916
918
|
})(DisassociateMemberResponse = exports.DisassociateMemberResponse || (exports.DisassociateMemberResponse = {}));
|
|
919
|
+
var EcrRescanDuration;
|
|
920
|
+
(function (EcrRescanDuration) {
|
|
921
|
+
EcrRescanDuration["DAYS_180"] = "DAYS_180";
|
|
922
|
+
EcrRescanDuration["DAYS_30"] = "DAYS_30";
|
|
923
|
+
EcrRescanDuration["LIFETIME"] = "LIFETIME";
|
|
924
|
+
})(EcrRescanDuration = exports.EcrRescanDuration || (exports.EcrRescanDuration = {}));
|
|
925
|
+
var EcrConfiguration;
|
|
926
|
+
(function (EcrConfiguration) {
|
|
927
|
+
EcrConfiguration.filterSensitiveLog = (obj) => ({
|
|
928
|
+
...obj,
|
|
929
|
+
});
|
|
930
|
+
})(EcrConfiguration = exports.EcrConfiguration || (exports.EcrConfiguration = {}));
|
|
931
|
+
var EcrRescanDurationStatus;
|
|
932
|
+
(function (EcrRescanDurationStatus) {
|
|
933
|
+
EcrRescanDurationStatus["FAILED"] = "FAILED";
|
|
934
|
+
EcrRescanDurationStatus["PENDING"] = "PENDING";
|
|
935
|
+
EcrRescanDurationStatus["SUCCESS"] = "SUCCESS";
|
|
936
|
+
})(EcrRescanDurationStatus = exports.EcrRescanDurationStatus || (exports.EcrRescanDurationStatus = {}));
|
|
937
|
+
var EcrRescanDurationState;
|
|
938
|
+
(function (EcrRescanDurationState) {
|
|
939
|
+
EcrRescanDurationState.filterSensitiveLog = (obj) => ({
|
|
940
|
+
...obj,
|
|
941
|
+
});
|
|
942
|
+
})(EcrRescanDurationState = exports.EcrRescanDurationState || (exports.EcrRescanDurationState = {}));
|
|
943
|
+
var EcrConfigurationState;
|
|
944
|
+
(function (EcrConfigurationState) {
|
|
945
|
+
EcrConfigurationState.filterSensitiveLog = (obj) => ({
|
|
946
|
+
...obj,
|
|
947
|
+
});
|
|
948
|
+
})(EcrConfigurationState = exports.EcrConfigurationState || (exports.EcrConfigurationState = {}));
|
|
917
949
|
var EnableRequest;
|
|
918
950
|
(function (EnableRequest) {
|
|
919
951
|
EnableRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -994,11 +1026,15 @@ var PackageManager;
|
|
|
994
1026
|
PackageManager["GOBINARY"] = "GOBINARY";
|
|
995
1027
|
PackageManager["GOMOD"] = "GOMOD";
|
|
996
1028
|
PackageManager["JAR"] = "JAR";
|
|
1029
|
+
PackageManager["NODEPKG"] = "NODEPKG";
|
|
997
1030
|
PackageManager["NPM"] = "NPM";
|
|
998
1031
|
PackageManager["NUGET"] = "NUGET";
|
|
999
1032
|
PackageManager["OS"] = "OS";
|
|
1033
|
+
PackageManager["PIP"] = "PIP";
|
|
1000
1034
|
PackageManager["PIPENV"] = "PIPENV";
|
|
1001
1035
|
PackageManager["POETRY"] = "POETRY";
|
|
1036
|
+
PackageManager["POM"] = "POM";
|
|
1037
|
+
PackageManager["PYTHONPKG"] = "PYTHONPKG";
|
|
1002
1038
|
PackageManager["YARN"] = "YARN";
|
|
1003
1039
|
})(PackageManager = exports.PackageManager || (exports.PackageManager = {}));
|
|
1004
1040
|
var VulnerablePackage;
|
|
@@ -1069,6 +1105,18 @@ var Finding;
|
|
|
1069
1105
|
...obj,
|
|
1070
1106
|
});
|
|
1071
1107
|
})(Finding = exports.Finding || (exports.Finding = {}));
|
|
1108
|
+
var GetConfigurationRequest;
|
|
1109
|
+
(function (GetConfigurationRequest) {
|
|
1110
|
+
GetConfigurationRequest.filterSensitiveLog = (obj) => ({
|
|
1111
|
+
...obj,
|
|
1112
|
+
});
|
|
1113
|
+
})(GetConfigurationRequest = exports.GetConfigurationRequest || (exports.GetConfigurationRequest = {}));
|
|
1114
|
+
var GetConfigurationResponse;
|
|
1115
|
+
(function (GetConfigurationResponse) {
|
|
1116
|
+
GetConfigurationResponse.filterSensitiveLog = (obj) => ({
|
|
1117
|
+
...obj,
|
|
1118
|
+
});
|
|
1119
|
+
})(GetConfigurationResponse = exports.GetConfigurationResponse || (exports.GetConfigurationResponse = {}));
|
|
1072
1120
|
var GetDelegatedAdminAccountRequest;
|
|
1073
1121
|
(function (GetDelegatedAdminAccountRequest) {
|
|
1074
1122
|
GetDelegatedAdminAccountRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -1089,8 +1137,12 @@ var GetFindingsReportStatusRequest;
|
|
|
1089
1137
|
})(GetFindingsReportStatusRequest = exports.GetFindingsReportStatusRequest || (exports.GetFindingsReportStatusRequest = {}));
|
|
1090
1138
|
var ReportingErrorCode;
|
|
1091
1139
|
(function (ReportingErrorCode) {
|
|
1140
|
+
ReportingErrorCode["BUCKET_NOT_FOUND"] = "BUCKET_NOT_FOUND";
|
|
1141
|
+
ReportingErrorCode["INCOMPATIBLE_BUCKET_REGION"] = "INCOMPATIBLE_BUCKET_REGION";
|
|
1092
1142
|
ReportingErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
|
1093
1143
|
ReportingErrorCode["INVALID_PERMISSIONS"] = "INVALID_PERMISSIONS";
|
|
1144
|
+
ReportingErrorCode["MALFORMED_KMS_KEY"] = "MALFORMED_KMS_KEY";
|
|
1145
|
+
ReportingErrorCode["NO_FINDINGS_FOUND"] = "NO_FINDINGS_FOUND";
|
|
1094
1146
|
})(ReportingErrorCode = exports.ReportingErrorCode || (exports.ReportingErrorCode = {}));
|
|
1095
1147
|
var GetFindingsReportStatusResponse;
|
|
1096
1148
|
(function (GetFindingsReportStatusResponse) {
|
|
@@ -1325,6 +1377,18 @@ var UntagResourceResponse;
|
|
|
1325
1377
|
...obj,
|
|
1326
1378
|
});
|
|
1327
1379
|
})(UntagResourceResponse = exports.UntagResourceResponse || (exports.UntagResourceResponse = {}));
|
|
1380
|
+
var UpdateConfigurationRequest;
|
|
1381
|
+
(function (UpdateConfigurationRequest) {
|
|
1382
|
+
UpdateConfigurationRequest.filterSensitiveLog = (obj) => ({
|
|
1383
|
+
...obj,
|
|
1384
|
+
});
|
|
1385
|
+
})(UpdateConfigurationRequest = exports.UpdateConfigurationRequest || (exports.UpdateConfigurationRequest = {}));
|
|
1386
|
+
var UpdateConfigurationResponse;
|
|
1387
|
+
(function (UpdateConfigurationResponse) {
|
|
1388
|
+
UpdateConfigurationResponse.filterSensitiveLog = (obj) => ({
|
|
1389
|
+
...obj,
|
|
1390
|
+
});
|
|
1391
|
+
})(UpdateConfigurationResponse = exports.UpdateConfigurationResponse || (exports.UpdateConfigurationResponse = {}));
|
|
1328
1392
|
var UpdateFilterRequest;
|
|
1329
1393
|
(function (UpdateFilterRequest) {
|
|
1330
1394
|
UpdateFilterRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.deserializeAws_restJson1UpdateOrganizationConfigurationCommand = exports.deserializeAws_restJson1UpdateFilterCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1ListUsageTotalsCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListMembersCommand = exports.deserializeAws_restJson1ListFindingsCommand = exports.deserializeAws_restJson1ListFindingAggregationsCommand = exports.deserializeAws_restJson1ListFiltersCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1ListAccountPermissionsCommand = exports.deserializeAws_restJson1GetMemberCommand = exports.deserializeAws_restJson1GetFindingsReportStatusCommand = exports.deserializeAws_restJson1GetDelegatedAdminAccountCommand = exports.deserializeAws_restJson1GetConfigurationCommand = exports.deserializeAws_restJson1EnableDelegatedAdminAccountCommand = exports.deserializeAws_restJson1EnableCommand = exports.deserializeAws_restJson1DisassociateMemberCommand = exports.deserializeAws_restJson1DisableDelegatedAdminAccountCommand = exports.deserializeAws_restJson1DisableCommand = exports.deserializeAws_restJson1DescribeOrganizationConfigurationCommand = exports.deserializeAws_restJson1DeleteFilterCommand = exports.deserializeAws_restJson1CreateFindingsReportCommand = exports.deserializeAws_restJson1CreateFilterCommand = exports.deserializeAws_restJson1CancelFindingsReportCommand = exports.deserializeAws_restJson1BatchGetFreeTrialInfoCommand = exports.deserializeAws_restJson1BatchGetAccountStatusCommand = exports.deserializeAws_restJson1AssociateMemberCommand = exports.serializeAws_restJson1UpdateOrganizationConfigurationCommand = exports.serializeAws_restJson1UpdateFilterCommand = exports.serializeAws_restJson1UpdateConfigurationCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1ListUsageTotalsCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListMembersCommand = exports.serializeAws_restJson1ListFindingsCommand = exports.serializeAws_restJson1ListFindingAggregationsCommand = exports.serializeAws_restJson1ListFiltersCommand = exports.serializeAws_restJson1ListDelegatedAdminAccountsCommand = exports.serializeAws_restJson1ListCoverageStatisticsCommand = exports.serializeAws_restJson1ListCoverageCommand = exports.serializeAws_restJson1ListAccountPermissionsCommand = exports.serializeAws_restJson1GetMemberCommand = exports.serializeAws_restJson1GetFindingsReportStatusCommand = exports.serializeAws_restJson1GetDelegatedAdminAccountCommand = exports.serializeAws_restJson1GetConfigurationCommand = exports.serializeAws_restJson1EnableDelegatedAdminAccountCommand = exports.serializeAws_restJson1EnableCommand = exports.serializeAws_restJson1DisassociateMemberCommand = exports.serializeAws_restJson1DisableDelegatedAdminAccountCommand = exports.serializeAws_restJson1DisableCommand = exports.serializeAws_restJson1DescribeOrganizationConfigurationCommand = exports.serializeAws_restJson1DeleteFilterCommand = exports.serializeAws_restJson1CreateFindingsReportCommand = exports.serializeAws_restJson1CreateFilterCommand = exports.serializeAws_restJson1CancelFindingsReportCommand = exports.serializeAws_restJson1BatchGetFreeTrialInfoCommand = exports.serializeAws_restJson1BatchGetAccountStatusCommand = exports.serializeAws_restJson1AssociateMemberCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1UpdateOrganizationConfigurationCommand = exports.deserializeAws_restJson1UpdateFilterCommand = exports.deserializeAws_restJson1UpdateConfigurationCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1ListUsageTotalsCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListMembersCommand = exports.deserializeAws_restJson1ListFindingsCommand = exports.deserializeAws_restJson1ListFindingAggregationsCommand = exports.deserializeAws_restJson1ListFiltersCommand = exports.deserializeAws_restJson1ListDelegatedAdminAccountsCommand = exports.deserializeAws_restJson1ListCoverageStatisticsCommand = exports.deserializeAws_restJson1ListCoverageCommand = void 0;
|
|
5
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
const uuid_1 = require("uuid");
|
|
@@ -107,6 +107,7 @@ const serializeAws_restJson1CreateFilterCommand = async (input, context) => {
|
|
|
107
107
|
filterCriteria: serializeAws_restJson1FilterCriteria(input.filterCriteria, context),
|
|
108
108
|
}),
|
|
109
109
|
...(input.name != null && { name: input.name }),
|
|
110
|
+
...(input.reason != null && { reason: input.reason }),
|
|
110
111
|
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
111
112
|
});
|
|
112
113
|
return new protocol_http_1.HttpRequest({
|
|
@@ -302,6 +303,25 @@ const serializeAws_restJson1EnableDelegatedAdminAccountCommand = async (input, c
|
|
|
302
303
|
});
|
|
303
304
|
};
|
|
304
305
|
exports.serializeAws_restJson1EnableDelegatedAdminAccountCommand = serializeAws_restJson1EnableDelegatedAdminAccountCommand;
|
|
306
|
+
const serializeAws_restJson1GetConfigurationCommand = async (input, context) => {
|
|
307
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
308
|
+
const headers = {
|
|
309
|
+
"content-type": "application/json",
|
|
310
|
+
};
|
|
311
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/get";
|
|
312
|
+
let body;
|
|
313
|
+
body = "";
|
|
314
|
+
return new protocol_http_1.HttpRequest({
|
|
315
|
+
protocol,
|
|
316
|
+
hostname,
|
|
317
|
+
port,
|
|
318
|
+
method: "POST",
|
|
319
|
+
headers,
|
|
320
|
+
path: resolvedPath,
|
|
321
|
+
body,
|
|
322
|
+
});
|
|
323
|
+
};
|
|
324
|
+
exports.serializeAws_restJson1GetConfigurationCommand = serializeAws_restJson1GetConfigurationCommand;
|
|
305
325
|
const serializeAws_restJson1GetDelegatedAdminAccountCommand = async (input, context) => {
|
|
306
326
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
307
327
|
const headers = {
|
|
@@ -672,6 +692,29 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
|
672
692
|
});
|
|
673
693
|
};
|
|
674
694
|
exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand;
|
|
695
|
+
const serializeAws_restJson1UpdateConfigurationCommand = async (input, context) => {
|
|
696
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
697
|
+
const headers = {
|
|
698
|
+
"content-type": "application/json",
|
|
699
|
+
};
|
|
700
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/update";
|
|
701
|
+
let body;
|
|
702
|
+
body = JSON.stringify({
|
|
703
|
+
...(input.ecrConfiguration != null && {
|
|
704
|
+
ecrConfiguration: serializeAws_restJson1EcrConfiguration(input.ecrConfiguration, context),
|
|
705
|
+
}),
|
|
706
|
+
});
|
|
707
|
+
return new protocol_http_1.HttpRequest({
|
|
708
|
+
protocol,
|
|
709
|
+
hostname,
|
|
710
|
+
port,
|
|
711
|
+
method: "POST",
|
|
712
|
+
headers,
|
|
713
|
+
path: resolvedPath,
|
|
714
|
+
body,
|
|
715
|
+
});
|
|
716
|
+
};
|
|
717
|
+
exports.serializeAws_restJson1UpdateConfigurationCommand = serializeAws_restJson1UpdateConfigurationCommand;
|
|
675
718
|
const serializeAws_restJson1UpdateFilterCommand = async (input, context) => {
|
|
676
719
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
677
720
|
const headers = {
|
|
@@ -687,6 +730,7 @@ const serializeAws_restJson1UpdateFilterCommand = async (input, context) => {
|
|
|
687
730
|
filterCriteria: serializeAws_restJson1FilterCriteria(input.filterCriteria, context),
|
|
688
731
|
}),
|
|
689
732
|
...(input.name != null && { name: input.name }),
|
|
733
|
+
...(input.reason != null && { reason: input.reason }),
|
|
690
734
|
});
|
|
691
735
|
return new protocol_http_1.HttpRequest({
|
|
692
736
|
protocol,
|
|
@@ -1387,6 +1431,50 @@ const deserializeAws_restJson1EnableDelegatedAdminAccountCommandError = async (o
|
|
|
1387
1431
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1388
1432
|
}
|
|
1389
1433
|
};
|
|
1434
|
+
const deserializeAws_restJson1GetConfigurationCommand = async (output, context) => {
|
|
1435
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1436
|
+
return deserializeAws_restJson1GetConfigurationCommandError(output, context);
|
|
1437
|
+
}
|
|
1438
|
+
const contents = {
|
|
1439
|
+
$metadata: deserializeMetadata(output),
|
|
1440
|
+
ecrConfiguration: undefined,
|
|
1441
|
+
};
|
|
1442
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1443
|
+
if (data.ecrConfiguration !== undefined && data.ecrConfiguration !== null) {
|
|
1444
|
+
contents.ecrConfiguration = deserializeAws_restJson1EcrConfigurationState(data.ecrConfiguration, context);
|
|
1445
|
+
}
|
|
1446
|
+
return Promise.resolve(contents);
|
|
1447
|
+
};
|
|
1448
|
+
exports.deserializeAws_restJson1GetConfigurationCommand = deserializeAws_restJson1GetConfigurationCommand;
|
|
1449
|
+
const deserializeAws_restJson1GetConfigurationCommandError = async (output, context) => {
|
|
1450
|
+
const parsedOutput = {
|
|
1451
|
+
...output,
|
|
1452
|
+
body: await parseBody(output.body, context),
|
|
1453
|
+
};
|
|
1454
|
+
let response;
|
|
1455
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1456
|
+
switch (errorCode) {
|
|
1457
|
+
case "InternalServerException":
|
|
1458
|
+
case "com.amazonaws.inspector2#InternalServerException":
|
|
1459
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1460
|
+
case "ResourceNotFoundException":
|
|
1461
|
+
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1462
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1463
|
+
case "ThrottlingException":
|
|
1464
|
+
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1465
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1466
|
+
default:
|
|
1467
|
+
const parsedBody = parsedOutput.body;
|
|
1468
|
+
const $metadata = deserializeMetadata(output);
|
|
1469
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1470
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1471
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1472
|
+
$fault: "client",
|
|
1473
|
+
$metadata,
|
|
1474
|
+
});
|
|
1475
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1476
|
+
}
|
|
1477
|
+
};
|
|
1390
1478
|
const deserializeAws_restJson1GetDelegatedAdminAccountCommand = async (output, context) => {
|
|
1391
1479
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1392
1480
|
return deserializeAws_restJson1GetDelegatedAdminAccountCommandError(output, context);
|
|
@@ -2148,6 +2236,49 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2148
2236
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2149
2237
|
}
|
|
2150
2238
|
};
|
|
2239
|
+
const deserializeAws_restJson1UpdateConfigurationCommand = async (output, context) => {
|
|
2240
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2241
|
+
return deserializeAws_restJson1UpdateConfigurationCommandError(output, context);
|
|
2242
|
+
}
|
|
2243
|
+
const contents = {
|
|
2244
|
+
$metadata: deserializeMetadata(output),
|
|
2245
|
+
};
|
|
2246
|
+
await collectBody(output.body, context);
|
|
2247
|
+
return Promise.resolve(contents);
|
|
2248
|
+
};
|
|
2249
|
+
exports.deserializeAws_restJson1UpdateConfigurationCommand = deserializeAws_restJson1UpdateConfigurationCommand;
|
|
2250
|
+
const deserializeAws_restJson1UpdateConfigurationCommandError = async (output, context) => {
|
|
2251
|
+
const parsedOutput = {
|
|
2252
|
+
...output,
|
|
2253
|
+
body: await parseBody(output.body, context),
|
|
2254
|
+
};
|
|
2255
|
+
let response;
|
|
2256
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2257
|
+
switch (errorCode) {
|
|
2258
|
+
case "AccessDeniedException":
|
|
2259
|
+
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
2260
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2261
|
+
case "InternalServerException":
|
|
2262
|
+
case "com.amazonaws.inspector2#InternalServerException":
|
|
2263
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2264
|
+
case "ThrottlingException":
|
|
2265
|
+
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2266
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2267
|
+
case "ValidationException":
|
|
2268
|
+
case "com.amazonaws.inspector2#ValidationException":
|
|
2269
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2270
|
+
default:
|
|
2271
|
+
const parsedBody = parsedOutput.body;
|
|
2272
|
+
const $metadata = deserializeMetadata(output);
|
|
2273
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
2274
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
2275
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
2276
|
+
$fault: "client",
|
|
2277
|
+
$metadata,
|
|
2278
|
+
});
|
|
2279
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2280
|
+
}
|
|
2281
|
+
};
|
|
2151
2282
|
const deserializeAws_restJson1UpdateFilterCommand = async (output, context) => {
|
|
2152
2283
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2153
2284
|
return deserializeAws_restJson1UpdateFilterCommandError(output, context);
|
|
@@ -2544,6 +2675,11 @@ const serializeAws_restJson1Ec2InstanceAggregation = (input, context) => {
|
|
|
2544
2675
|
...(input.sortOrder != null && { sortOrder: input.sortOrder }),
|
|
2545
2676
|
};
|
|
2546
2677
|
};
|
|
2678
|
+
const serializeAws_restJson1EcrConfiguration = (input, context) => {
|
|
2679
|
+
return {
|
|
2680
|
+
...(input.rescanDuration != null && { rescanDuration: input.rescanDuration }),
|
|
2681
|
+
};
|
|
2682
|
+
};
|
|
2547
2683
|
const serializeAws_restJson1EnableResourceTypeList = (input, context) => {
|
|
2548
2684
|
return input
|
|
2549
2685
|
.filter((e) => e != null)
|
|
@@ -3146,6 +3282,13 @@ const deserializeAws_restJson1Ec2Metadata = (output, context) => {
|
|
|
3146
3282
|
tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
|
|
3147
3283
|
};
|
|
3148
3284
|
};
|
|
3285
|
+
const deserializeAws_restJson1EcrConfigurationState = (output, context) => {
|
|
3286
|
+
return {
|
|
3287
|
+
rescanDurationState: output.rescanDurationState != null
|
|
3288
|
+
? deserializeAws_restJson1EcrRescanDurationState(output.rescanDurationState, context)
|
|
3289
|
+
: undefined,
|
|
3290
|
+
};
|
|
3291
|
+
};
|
|
3149
3292
|
const deserializeAws_restJson1EcrContainerImageMetadata = (output, context) => {
|
|
3150
3293
|
return {
|
|
3151
3294
|
tags: output.tags != null ? deserializeAws_restJson1TagList(output.tags, context) : undefined,
|
|
@@ -3157,6 +3300,13 @@ const deserializeAws_restJson1EcrRepositoryMetadata = (output, context) => {
|
|
|
3157
3300
|
scanFrequency: (0, smithy_client_1.expectString)(output.scanFrequency),
|
|
3158
3301
|
};
|
|
3159
3302
|
};
|
|
3303
|
+
const deserializeAws_restJson1EcrRescanDurationState = (output, context) => {
|
|
3304
|
+
return {
|
|
3305
|
+
rescanDuration: (0, smithy_client_1.expectString)(output.rescanDuration),
|
|
3306
|
+
status: (0, smithy_client_1.expectString)(output.status),
|
|
3307
|
+
updatedAt: output.updatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.updatedAt))) : undefined,
|
|
3308
|
+
};
|
|
3309
|
+
};
|
|
3160
3310
|
const deserializeAws_restJson1FailedAccount = (output, context) => {
|
|
3161
3311
|
return {
|
|
3162
3312
|
accountId: (0, smithy_client_1.expectString)(output.accountId),
|
|
@@ -3894,6 +4044,9 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
3894
4044
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
3895
4045
|
const sanitizeErrorCode = (rawValue) => {
|
|
3896
4046
|
let cleanValue = rawValue;
|
|
4047
|
+
if (typeof cleanValue === "number") {
|
|
4048
|
+
cleanValue = cleanValue.toString();
|
|
4049
|
+
}
|
|
3897
4050
|
if (cleanValue.indexOf(":") >= 0) {
|
|
3898
4051
|
cleanValue = cleanValue.split(":")[0];
|
|
3899
4052
|
}
|
package/dist-es/Inspector2.js
CHANGED
|
@@ -12,6 +12,7 @@ import { DisableDelegatedAdminAccountCommand, } from "./commands/DisableDelegate
|
|
|
12
12
|
import { DisassociateMemberCommand, } from "./commands/DisassociateMemberCommand";
|
|
13
13
|
import { EnableCommand } from "./commands/EnableCommand";
|
|
14
14
|
import { EnableDelegatedAdminAccountCommand, } from "./commands/EnableDelegatedAdminAccountCommand";
|
|
15
|
+
import { GetConfigurationCommand, } from "./commands/GetConfigurationCommand";
|
|
15
16
|
import { GetDelegatedAdminAccountCommand, } from "./commands/GetDelegatedAdminAccountCommand";
|
|
16
17
|
import { GetFindingsReportStatusCommand, } from "./commands/GetFindingsReportStatusCommand";
|
|
17
18
|
import { GetMemberCommand } from "./commands/GetMemberCommand";
|
|
@@ -27,6 +28,7 @@ import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceComma
|
|
|
27
28
|
import { ListUsageTotalsCommand, } from "./commands/ListUsageTotalsCommand";
|
|
28
29
|
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
29
30
|
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
31
|
+
import { UpdateConfigurationCommand, } from "./commands/UpdateConfigurationCommand";
|
|
30
32
|
import { UpdateFilterCommand, } from "./commands/UpdateFilterCommand";
|
|
31
33
|
import { UpdateOrganizationConfigurationCommand, } from "./commands/UpdateOrganizationConfigurationCommand";
|
|
32
34
|
import { Inspector2Client } from "./Inspector2Client";
|
|
@@ -217,6 +219,20 @@ var Inspector2 = (function (_super) {
|
|
|
217
219
|
return this.send(command, optionsOrCb);
|
|
218
220
|
}
|
|
219
221
|
};
|
|
222
|
+
Inspector2.prototype.getConfiguration = function (args, optionsOrCb, cb) {
|
|
223
|
+
var command = new GetConfigurationCommand(args);
|
|
224
|
+
if (typeof optionsOrCb === "function") {
|
|
225
|
+
this.send(command, optionsOrCb);
|
|
226
|
+
}
|
|
227
|
+
else if (typeof cb === "function") {
|
|
228
|
+
if (typeof optionsOrCb !== "object")
|
|
229
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
230
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
return this.send(command, optionsOrCb);
|
|
234
|
+
}
|
|
235
|
+
};
|
|
220
236
|
Inspector2.prototype.getDelegatedAdminAccount = function (args, optionsOrCb, cb) {
|
|
221
237
|
var command = new GetDelegatedAdminAccountCommand(args);
|
|
222
238
|
if (typeof optionsOrCb === "function") {
|
|
@@ -427,6 +443,20 @@ var Inspector2 = (function (_super) {
|
|
|
427
443
|
return this.send(command, optionsOrCb);
|
|
428
444
|
}
|
|
429
445
|
};
|
|
446
|
+
Inspector2.prototype.updateConfiguration = function (args, optionsOrCb, cb) {
|
|
447
|
+
var command = new UpdateConfigurationCommand(args);
|
|
448
|
+
if (typeof optionsOrCb === "function") {
|
|
449
|
+
this.send(command, optionsOrCb);
|
|
450
|
+
}
|
|
451
|
+
else if (typeof cb === "function") {
|
|
452
|
+
if (typeof optionsOrCb !== "object")
|
|
453
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
454
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
return this.send(command, optionsOrCb);
|
|
458
|
+
}
|
|
459
|
+
};
|
|
430
460
|
Inspector2.prototype.updateFilter = function (args, optionsOrCb, cb) {
|
|
431
461
|
var command = new UpdateFilterCommand(args);
|
|
432
462
|
if (typeof optionsOrCb === "function") {
|