@aws-sdk/client-codeguru-security 3.901.0 → 3.907.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/dist-cjs/index.js +1098 -1295
- package/package.json +6 -6
package/dist-cjs/index.js
CHANGED
|
@@ -1,1345 +1,1148 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
|
|
4
|
+
var middlewareLogger = require('@aws-sdk/middleware-logger');
|
|
5
|
+
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
|
|
6
|
+
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
|
+
var configResolver = require('@smithy/config-resolver');
|
|
8
|
+
var core = require('@smithy/core');
|
|
9
|
+
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
10
|
+
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
11
|
+
var middlewareRetry = require('@smithy/middleware-retry');
|
|
12
|
+
var smithyClient = require('@smithy/smithy-client');
|
|
13
|
+
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
14
|
+
var runtimeConfig = require('./runtimeConfig');
|
|
15
|
+
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
16
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
17
|
+
var middlewareSerde = require('@smithy/middleware-serde');
|
|
18
|
+
var core$1 = require('@aws-sdk/core');
|
|
19
|
+
var uuid = require('@smithy/uuid');
|
|
20
|
+
|
|
21
|
+
const resolveClientEndpointParameters = (options) => {
|
|
22
|
+
return Object.assign(options, {
|
|
23
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
24
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
25
|
+
defaultSigningName: "codeguru-security",
|
|
26
|
+
});
|
|
10
27
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
28
|
+
const commonParams = {
|
|
29
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
30
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
31
|
+
Region: { type: "builtInParams", name: "region" },
|
|
32
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
18
33
|
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/index.ts
|
|
22
|
-
var index_exports = {};
|
|
23
|
-
__export(index_exports, {
|
|
24
|
-
AccessDeniedException: () => AccessDeniedException,
|
|
25
|
-
AnalysisType: () => AnalysisType,
|
|
26
|
-
BatchGetFindingsCommand: () => BatchGetFindingsCommand,
|
|
27
|
-
CodeGuruSecurity: () => CodeGuruSecurity,
|
|
28
|
-
CodeGuruSecurityClient: () => CodeGuruSecurityClient,
|
|
29
|
-
CodeGuruSecurityServiceException: () => CodeGuruSecurityServiceException,
|
|
30
|
-
ConflictException: () => ConflictException,
|
|
31
|
-
CreateScanCommand: () => CreateScanCommand,
|
|
32
|
-
CreateUploadUrlCommand: () => CreateUploadUrlCommand,
|
|
33
|
-
CreateUploadUrlResponseFilterSensitiveLog: () => CreateUploadUrlResponseFilterSensitiveLog,
|
|
34
|
-
ErrorCode: () => ErrorCode,
|
|
35
|
-
GetAccountConfigurationCommand: () => GetAccountConfigurationCommand,
|
|
36
|
-
GetFindingsCommand: () => GetFindingsCommand,
|
|
37
|
-
GetMetricsSummaryCommand: () => GetMetricsSummaryCommand,
|
|
38
|
-
GetScanCommand: () => GetScanCommand,
|
|
39
|
-
InternalServerException: () => InternalServerException,
|
|
40
|
-
ListFindingsMetricsCommand: () => ListFindingsMetricsCommand,
|
|
41
|
-
ListScansCommand: () => ListScansCommand,
|
|
42
|
-
ListTagsForResourceCommand: () => ListTagsForResourceCommand,
|
|
43
|
-
ResourceId: () => ResourceId,
|
|
44
|
-
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
45
|
-
ScanState: () => ScanState,
|
|
46
|
-
ScanType: () => ScanType,
|
|
47
|
-
Severity: () => Severity,
|
|
48
|
-
Status: () => Status,
|
|
49
|
-
TagResourceCommand: () => TagResourceCommand,
|
|
50
|
-
ThrottlingException: () => ThrottlingException,
|
|
51
|
-
UntagResourceCommand: () => UntagResourceCommand,
|
|
52
|
-
UpdateAccountConfigurationCommand: () => UpdateAccountConfigurationCommand,
|
|
53
|
-
ValidationException: () => ValidationException,
|
|
54
|
-
ValidationExceptionReason: () => ValidationExceptionReason,
|
|
55
|
-
__Client: () => import_smithy_client.Client,
|
|
56
|
-
paginateGetFindings: () => paginateGetFindings,
|
|
57
|
-
paginateListFindingsMetrics: () => paginateListFindingsMetrics,
|
|
58
|
-
paginateListScans: () => paginateListScans
|
|
59
|
-
});
|
|
60
|
-
module.exports = __toCommonJS(index_exports);
|
|
61
34
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
35
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
36
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
37
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
38
|
+
let _credentials = runtimeConfig.credentials;
|
|
39
|
+
return {
|
|
40
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
41
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
42
|
+
if (index === -1) {
|
|
43
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
httpAuthSchemes() {
|
|
50
|
+
return _httpAuthSchemes;
|
|
51
|
+
},
|
|
52
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
53
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
54
|
+
},
|
|
55
|
+
httpAuthSchemeProvider() {
|
|
56
|
+
return _httpAuthSchemeProvider;
|
|
57
|
+
},
|
|
58
|
+
setCredentials(credentials) {
|
|
59
|
+
_credentials = credentials;
|
|
60
|
+
},
|
|
61
|
+
credentials() {
|
|
62
|
+
return _credentials;
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
67
|
+
return {
|
|
68
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
69
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
70
|
+
credentials: config.credentials(),
|
|
71
|
+
};
|
|
88
72
|
};
|
|
89
73
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
var import_protocol_http = require("@smithy/protocol-http");
|
|
96
|
-
var import_smithy_client = require("@smithy/smithy-client");
|
|
74
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
75
|
+
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
76
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
77
|
+
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
78
|
+
};
|
|
97
79
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
80
|
+
class CodeGuruSecurityClient extends smithyClient.Client {
|
|
81
|
+
config;
|
|
82
|
+
constructor(...[configuration]) {
|
|
83
|
+
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
|
84
|
+
super(_config_0);
|
|
85
|
+
this.initConfig = _config_0;
|
|
86
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
87
|
+
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
|
88
|
+
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
|
|
89
|
+
const _config_4 = configResolver.resolveRegionConfig(_config_3);
|
|
90
|
+
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
|
91
|
+
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
|
|
92
|
+
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
93
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
94
|
+
this.config = _config_8;
|
|
95
|
+
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
96
|
+
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
97
|
+
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
98
|
+
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
|
99
|
+
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
|
100
|
+
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
|
101
|
+
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
102
|
+
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultCodeGuruSecurityHttpAuthSchemeParametersProvider,
|
|
103
|
+
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
|
104
|
+
"aws.auth#sigv4": config.credentials,
|
|
105
|
+
}),
|
|
106
|
+
}));
|
|
107
|
+
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
|
126
108
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
httpAuthSchemes: config.httpAuthSchemes(),
|
|
132
|
-
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
133
|
-
credentials: config.credentials()
|
|
134
|
-
};
|
|
135
|
-
}, "resolveHttpAuthRuntimeConfig");
|
|
136
|
-
|
|
137
|
-
// src/runtimeExtensions.ts
|
|
138
|
-
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
139
|
-
const extensionConfiguration = Object.assign(
|
|
140
|
-
(0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
|
|
141
|
-
(0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
|
|
142
|
-
(0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
|
|
143
|
-
getHttpAuthExtensionConfiguration(runtimeConfig)
|
|
144
|
-
);
|
|
145
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
146
|
-
return Object.assign(
|
|
147
|
-
runtimeConfig,
|
|
148
|
-
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
149
|
-
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
150
|
-
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
151
|
-
resolveHttpAuthRuntimeConfig(extensionConfiguration)
|
|
152
|
-
);
|
|
153
|
-
}, "resolveRuntimeExtensions");
|
|
109
|
+
destroy() {
|
|
110
|
+
super.destroy();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
154
113
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
this.middlewareStack.use(
|
|
184
|
-
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
185
|
-
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultCodeGuruSecurityHttpAuthSchemeParametersProvider,
|
|
186
|
-
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
|
|
187
|
-
"aws.auth#sigv4": config.credentials
|
|
188
|
-
}), "identityProviderConfigProvider")
|
|
189
|
-
})
|
|
190
|
-
);
|
|
191
|
-
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
195
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
196
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
197
|
-
*/
|
|
198
|
-
destroy() {
|
|
199
|
-
super.destroy();
|
|
200
|
-
}
|
|
114
|
+
class CodeGuruSecurityServiceException extends smithyClient.ServiceException {
|
|
115
|
+
constructor(options) {
|
|
116
|
+
super(options);
|
|
117
|
+
Object.setPrototypeOf(this, CodeGuruSecurityServiceException.prototype);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
class AccessDeniedException extends CodeGuruSecurityServiceException {
|
|
122
|
+
name = "AccessDeniedException";
|
|
123
|
+
$fault = "client";
|
|
124
|
+
errorCode;
|
|
125
|
+
resourceId;
|
|
126
|
+
resourceType;
|
|
127
|
+
constructor(opts) {
|
|
128
|
+
super({
|
|
129
|
+
name: "AccessDeniedException",
|
|
130
|
+
$fault: "client",
|
|
131
|
+
...opts,
|
|
132
|
+
});
|
|
133
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
134
|
+
this.errorCode = opts.errorCode;
|
|
135
|
+
this.resourceId = opts.resourceId;
|
|
136
|
+
this.resourceType = opts.resourceType;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
const AnalysisType = {
|
|
140
|
+
ALL: "All",
|
|
141
|
+
SECURITY: "Security",
|
|
201
142
|
};
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
var import_middleware_serde = require("@smithy/middleware-serde");
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
// src/protocols/Aws_restJson1.ts
|
|
212
|
-
var import_core2 = require("@aws-sdk/core");
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
var import_uuid = require("@smithy/uuid");
|
|
216
|
-
|
|
217
|
-
// src/models/CodeGuruSecurityServiceException.ts
|
|
218
|
-
|
|
219
|
-
var CodeGuruSecurityServiceException = class _CodeGuruSecurityServiceException extends import_smithy_client.ServiceException {
|
|
220
|
-
static {
|
|
221
|
-
__name(this, "CodeGuruSecurityServiceException");
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* @internal
|
|
225
|
-
*/
|
|
226
|
-
constructor(options) {
|
|
227
|
-
super(options);
|
|
228
|
-
Object.setPrototypeOf(this, _CodeGuruSecurityServiceException.prototype);
|
|
229
|
-
}
|
|
143
|
+
const ErrorCode = {
|
|
144
|
+
DUPLICATE_IDENTIFIER: "DUPLICATE_IDENTIFIER",
|
|
145
|
+
INTERNAL_ERROR: "INTERNAL_ERROR",
|
|
146
|
+
INVALID_FINDING_ID: "INVALID_FINDING_ID",
|
|
147
|
+
INVALID_SCAN_NAME: "INVALID_SCAN_NAME",
|
|
148
|
+
ITEM_DOES_NOT_EXIST: "ITEM_DOES_NOT_EXIST",
|
|
230
149
|
};
|
|
150
|
+
const Severity = {
|
|
151
|
+
CRITICAL: "Critical",
|
|
152
|
+
HIGH: "High",
|
|
153
|
+
INFO: "Info",
|
|
154
|
+
LOW: "Low",
|
|
155
|
+
MEDIUM: "Medium",
|
|
156
|
+
};
|
|
157
|
+
const Status = {
|
|
158
|
+
ALL: "All",
|
|
159
|
+
CLOSED: "Closed",
|
|
160
|
+
OPEN: "Open",
|
|
161
|
+
};
|
|
162
|
+
class InternalServerException extends CodeGuruSecurityServiceException {
|
|
163
|
+
name = "InternalServerException";
|
|
164
|
+
$fault = "server";
|
|
165
|
+
$retryable = {};
|
|
166
|
+
error;
|
|
167
|
+
constructor(opts) {
|
|
168
|
+
super({
|
|
169
|
+
name: "InternalServerException",
|
|
170
|
+
$fault: "server",
|
|
171
|
+
...opts,
|
|
172
|
+
});
|
|
173
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
174
|
+
this.error = opts.error;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
class ThrottlingException extends CodeGuruSecurityServiceException {
|
|
178
|
+
name = "ThrottlingException";
|
|
179
|
+
$fault = "client";
|
|
180
|
+
$retryable = {
|
|
181
|
+
throttling: true,
|
|
182
|
+
};
|
|
183
|
+
errorCode;
|
|
184
|
+
serviceCode;
|
|
185
|
+
quotaCode;
|
|
186
|
+
constructor(opts) {
|
|
187
|
+
super({
|
|
188
|
+
name: "ThrottlingException",
|
|
189
|
+
$fault: "client",
|
|
190
|
+
...opts,
|
|
191
|
+
});
|
|
192
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
193
|
+
this.errorCode = opts.errorCode;
|
|
194
|
+
this.serviceCode = opts.serviceCode;
|
|
195
|
+
this.quotaCode = opts.quotaCode;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
const ValidationExceptionReason = {
|
|
199
|
+
CANNOT_PARSE: "cannotParse",
|
|
200
|
+
FIELD_VALIDATION_FAILED: "fieldValidationFailed",
|
|
201
|
+
LAMBDA_CODE_SHA_MISMATCH: "lambdaCodeShaMisMatch",
|
|
202
|
+
OTHER: "other",
|
|
203
|
+
UNKNOWN_OPERATION: "unknownOperation",
|
|
204
|
+
};
|
|
205
|
+
class ValidationException extends CodeGuruSecurityServiceException {
|
|
206
|
+
name = "ValidationException";
|
|
207
|
+
$fault = "client";
|
|
208
|
+
errorCode;
|
|
209
|
+
reason;
|
|
210
|
+
fieldList;
|
|
211
|
+
constructor(opts) {
|
|
212
|
+
super({
|
|
213
|
+
name: "ValidationException",
|
|
214
|
+
$fault: "client",
|
|
215
|
+
...opts,
|
|
216
|
+
});
|
|
217
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
218
|
+
this.errorCode = opts.errorCode;
|
|
219
|
+
this.reason = opts.reason;
|
|
220
|
+
this.fieldList = opts.fieldList;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
class ConflictException extends CodeGuruSecurityServiceException {
|
|
224
|
+
name = "ConflictException";
|
|
225
|
+
$fault = "client";
|
|
226
|
+
errorCode;
|
|
227
|
+
resourceId;
|
|
228
|
+
resourceType;
|
|
229
|
+
constructor(opts) {
|
|
230
|
+
super({
|
|
231
|
+
name: "ConflictException",
|
|
232
|
+
$fault: "client",
|
|
233
|
+
...opts,
|
|
234
|
+
});
|
|
235
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
236
|
+
this.errorCode = opts.errorCode;
|
|
237
|
+
this.resourceId = opts.resourceId;
|
|
238
|
+
this.resourceType = opts.resourceType;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
exports.ResourceId = void 0;
|
|
242
|
+
(function (ResourceId) {
|
|
243
|
+
ResourceId.visit = (value, visitor) => {
|
|
244
|
+
if (value.codeArtifactId !== undefined)
|
|
245
|
+
return visitor.codeArtifactId(value.codeArtifactId);
|
|
246
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
247
|
+
};
|
|
248
|
+
})(exports.ResourceId || (exports.ResourceId = {}));
|
|
249
|
+
const ScanType = {
|
|
250
|
+
EXPRESS: "Express",
|
|
251
|
+
STANDARD: "Standard",
|
|
252
|
+
};
|
|
253
|
+
const ScanState = {
|
|
254
|
+
FAILED: "Failed",
|
|
255
|
+
IN_PROGRESS: "InProgress",
|
|
256
|
+
SUCCESSFUL: "Successful",
|
|
257
|
+
};
|
|
258
|
+
class ResourceNotFoundException extends CodeGuruSecurityServiceException {
|
|
259
|
+
name = "ResourceNotFoundException";
|
|
260
|
+
$fault = "client";
|
|
261
|
+
errorCode;
|
|
262
|
+
resourceId;
|
|
263
|
+
resourceType;
|
|
264
|
+
constructor(opts) {
|
|
265
|
+
super({
|
|
266
|
+
name: "ResourceNotFoundException",
|
|
267
|
+
$fault: "client",
|
|
268
|
+
...opts,
|
|
269
|
+
});
|
|
270
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
271
|
+
this.errorCode = opts.errorCode;
|
|
272
|
+
this.resourceId = opts.resourceId;
|
|
273
|
+
this.resourceType = opts.resourceType;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
const CreateUploadUrlResponseFilterSensitiveLog = (obj) => ({
|
|
277
|
+
...obj,
|
|
278
|
+
...(obj.s3Url && { s3Url: smithyClient.SENSITIVE_STRING }),
|
|
279
|
+
...(obj.requestHeaders && { requestHeaders: smithyClient.SENSITIVE_STRING }),
|
|
280
|
+
});
|
|
231
281
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
282
|
+
const se_BatchGetFindingsCommand = async (input, context) => {
|
|
283
|
+
const b = core.requestBuilder(input, context);
|
|
284
|
+
const headers = {
|
|
285
|
+
"content-type": "application/json",
|
|
286
|
+
};
|
|
287
|
+
b.bp("/batchGetFindings");
|
|
288
|
+
let body;
|
|
289
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
290
|
+
findingIdentifiers: (_) => smithyClient._json(_),
|
|
291
|
+
}));
|
|
292
|
+
b.m("POST").h(headers).b(body);
|
|
293
|
+
return b.build();
|
|
294
|
+
};
|
|
295
|
+
const se_CreateScanCommand = async (input, context) => {
|
|
296
|
+
const b = core.requestBuilder(input, context);
|
|
297
|
+
const headers = {
|
|
298
|
+
"content-type": "application/json",
|
|
299
|
+
};
|
|
300
|
+
b.bp("/scans");
|
|
301
|
+
let body;
|
|
302
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
303
|
+
analysisType: [],
|
|
304
|
+
clientToken: [true, (_) => _ ?? uuid.v4()],
|
|
305
|
+
resourceId: (_) => smithyClient._json(_),
|
|
306
|
+
scanName: [],
|
|
307
|
+
scanType: [],
|
|
308
|
+
tags: (_) => smithyClient._json(_),
|
|
309
|
+
}));
|
|
310
|
+
b.m("POST").h(headers).b(body);
|
|
311
|
+
return b.build();
|
|
312
|
+
};
|
|
313
|
+
const se_CreateUploadUrlCommand = async (input, context) => {
|
|
314
|
+
const b = core.requestBuilder(input, context);
|
|
315
|
+
const headers = {
|
|
316
|
+
"content-type": "application/json",
|
|
317
|
+
};
|
|
318
|
+
b.bp("/uploadUrl");
|
|
319
|
+
let body;
|
|
320
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
321
|
+
scanName: [],
|
|
322
|
+
}));
|
|
323
|
+
b.m("POST").h(headers).b(body);
|
|
324
|
+
return b.build();
|
|
325
|
+
};
|
|
326
|
+
const se_GetAccountConfigurationCommand = async (input, context) => {
|
|
327
|
+
const b = core.requestBuilder(input, context);
|
|
328
|
+
const headers = {};
|
|
329
|
+
b.bp("/accountConfiguration/get");
|
|
330
|
+
let body;
|
|
331
|
+
b.m("GET").h(headers).b(body);
|
|
332
|
+
return b.build();
|
|
333
|
+
};
|
|
334
|
+
const se_GetFindingsCommand = async (input, context) => {
|
|
335
|
+
const b = core.requestBuilder(input, context);
|
|
336
|
+
const headers = {};
|
|
337
|
+
b.bp("/findings/{scanName}");
|
|
338
|
+
b.p("scanName", () => input.scanName, "{scanName}", false);
|
|
339
|
+
const query = smithyClient.map({
|
|
340
|
+
[_nT]: [, input[_nT]],
|
|
341
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
342
|
+
[_s]: [, input[_s]],
|
|
343
|
+
});
|
|
344
|
+
let body;
|
|
345
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
346
|
+
return b.build();
|
|
347
|
+
};
|
|
348
|
+
const se_GetMetricsSummaryCommand = async (input, context) => {
|
|
349
|
+
const b = core.requestBuilder(input, context);
|
|
350
|
+
const headers = {};
|
|
351
|
+
b.bp("/metrics/summary");
|
|
352
|
+
const query = smithyClient.map({
|
|
353
|
+
[_d]: [smithyClient.expectNonNull(input.date, `date`) != null, () => smithyClient.serializeDateTime(input[_d]).toString()],
|
|
354
|
+
});
|
|
355
|
+
let body;
|
|
356
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
357
|
+
return b.build();
|
|
358
|
+
};
|
|
359
|
+
const se_GetScanCommand = async (input, context) => {
|
|
360
|
+
const b = core.requestBuilder(input, context);
|
|
361
|
+
const headers = {};
|
|
362
|
+
b.bp("/scans/{scanName}");
|
|
363
|
+
b.p("scanName", () => input.scanName, "{scanName}", false);
|
|
364
|
+
const query = smithyClient.map({
|
|
365
|
+
[_rI]: [, input[_rI]],
|
|
263
366
|
});
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
this.resourceType = opts.resourceType;
|
|
268
|
-
}
|
|
367
|
+
let body;
|
|
368
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
369
|
+
return b.build();
|
|
269
370
|
};
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
371
|
+
const se_ListFindingsMetricsCommand = async (input, context) => {
|
|
372
|
+
const b = core.requestBuilder(input, context);
|
|
373
|
+
const headers = {};
|
|
374
|
+
b.bp("/metrics/findings");
|
|
375
|
+
const query = smithyClient.map({
|
|
376
|
+
[_nT]: [, input[_nT]],
|
|
377
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
378
|
+
[_sD]: [smithyClient.expectNonNull(input.startDate, `startDate`) != null, () => smithyClient.serializeDateTime(input[_sD]).toString()],
|
|
379
|
+
[_eD]: [smithyClient.expectNonNull(input.endDate, `endDate`) != null, () => smithyClient.serializeDateTime(input[_eD]).toString()],
|
|
380
|
+
});
|
|
381
|
+
let body;
|
|
382
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
383
|
+
return b.build();
|
|
273
384
|
};
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
385
|
+
const se_ListScansCommand = async (input, context) => {
|
|
386
|
+
const b = core.requestBuilder(input, context);
|
|
387
|
+
const headers = {};
|
|
388
|
+
b.bp("/scans");
|
|
389
|
+
const query = smithyClient.map({
|
|
390
|
+
[_nT]: [, input[_nT]],
|
|
391
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
392
|
+
});
|
|
393
|
+
let body;
|
|
394
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
395
|
+
return b.build();
|
|
280
396
|
};
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
397
|
+
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
398
|
+
const b = core.requestBuilder(input, context);
|
|
399
|
+
const headers = {};
|
|
400
|
+
b.bp("/tags/{resourceArn}");
|
|
401
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
402
|
+
let body;
|
|
403
|
+
b.m("GET").h(headers).b(body);
|
|
404
|
+
return b.build();
|
|
287
405
|
};
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
406
|
+
const se_TagResourceCommand = async (input, context) => {
|
|
407
|
+
const b = core.requestBuilder(input, context);
|
|
408
|
+
const headers = {
|
|
409
|
+
"content-type": "application/json",
|
|
410
|
+
};
|
|
411
|
+
b.bp("/tags/{resourceArn}");
|
|
412
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
413
|
+
let body;
|
|
414
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
415
|
+
tags: (_) => smithyClient._json(_),
|
|
416
|
+
}));
|
|
417
|
+
b.m("POST").h(headers).b(body);
|
|
418
|
+
return b.build();
|
|
292
419
|
};
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* <p>The internal error encountered by the server.</p>
|
|
302
|
-
* @public
|
|
303
|
-
*/
|
|
304
|
-
error;
|
|
305
|
-
/**
|
|
306
|
-
* @internal
|
|
307
|
-
*/
|
|
308
|
-
constructor(opts) {
|
|
309
|
-
super({
|
|
310
|
-
name: "InternalServerException",
|
|
311
|
-
$fault: "server",
|
|
312
|
-
...opts
|
|
420
|
+
const se_UntagResourceCommand = async (input, context) => {
|
|
421
|
+
const b = core.requestBuilder(input, context);
|
|
422
|
+
const headers = {};
|
|
423
|
+
b.bp("/tags/{resourceArn}");
|
|
424
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
425
|
+
const query = smithyClient.map({
|
|
426
|
+
[_tK]: [smithyClient.expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
|
|
313
427
|
});
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
428
|
+
let body;
|
|
429
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
430
|
+
return b.build();
|
|
317
431
|
};
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* @internal
|
|
344
|
-
*/
|
|
345
|
-
constructor(opts) {
|
|
346
|
-
super({
|
|
347
|
-
name: "ThrottlingException",
|
|
348
|
-
$fault: "client",
|
|
349
|
-
...opts
|
|
432
|
+
const se_UpdateAccountConfigurationCommand = async (input, context) => {
|
|
433
|
+
const b = core.requestBuilder(input, context);
|
|
434
|
+
const headers = {
|
|
435
|
+
"content-type": "application/json",
|
|
436
|
+
};
|
|
437
|
+
b.bp("/updateAccountConfiguration");
|
|
438
|
+
let body;
|
|
439
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
440
|
+
encryptionConfig: (_) => smithyClient._json(_),
|
|
441
|
+
}));
|
|
442
|
+
b.m("PUT").h(headers).b(body);
|
|
443
|
+
return b.build();
|
|
444
|
+
};
|
|
445
|
+
const de_BatchGetFindingsCommand = async (output, context) => {
|
|
446
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
447
|
+
return de_CommandError(output, context);
|
|
448
|
+
}
|
|
449
|
+
const contents = smithyClient.map({
|
|
450
|
+
$metadata: deserializeMetadata(output),
|
|
451
|
+
});
|
|
452
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
453
|
+
const doc = smithyClient.take(data, {
|
|
454
|
+
failedFindings: smithyClient._json,
|
|
455
|
+
findings: (_) => de_Findings(_),
|
|
350
456
|
});
|
|
351
|
-
Object.
|
|
352
|
-
|
|
353
|
-
this.serviceCode = opts.serviceCode;
|
|
354
|
-
this.quotaCode = opts.quotaCode;
|
|
355
|
-
}
|
|
457
|
+
Object.assign(contents, doc);
|
|
458
|
+
return contents;
|
|
356
459
|
};
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
460
|
+
const de_CreateScanCommand = async (output, context) => {
|
|
461
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
462
|
+
return de_CommandError(output, context);
|
|
463
|
+
}
|
|
464
|
+
const contents = smithyClient.map({
|
|
465
|
+
$metadata: deserializeMetadata(output),
|
|
466
|
+
});
|
|
467
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
468
|
+
const doc = smithyClient.take(data, {
|
|
469
|
+
resourceId: (_) => smithyClient._json(core$1.awsExpectUnion(_)),
|
|
470
|
+
runId: smithyClient.expectString,
|
|
471
|
+
scanName: smithyClient.expectString,
|
|
472
|
+
scanNameArn: smithyClient.expectString,
|
|
473
|
+
scanState: smithyClient.expectString,
|
|
474
|
+
});
|
|
475
|
+
Object.assign(contents, doc);
|
|
476
|
+
return contents;
|
|
363
477
|
};
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
* <p>The reason the request failed validation.</p>
|
|
377
|
-
* @public
|
|
378
|
-
*/
|
|
379
|
-
reason;
|
|
380
|
-
/**
|
|
381
|
-
* <p>The field that caused the error, if applicable.</p>
|
|
382
|
-
* @public
|
|
383
|
-
*/
|
|
384
|
-
fieldList;
|
|
385
|
-
/**
|
|
386
|
-
* @internal
|
|
387
|
-
*/
|
|
388
|
-
constructor(opts) {
|
|
389
|
-
super({
|
|
390
|
-
name: "ValidationException",
|
|
391
|
-
$fault: "client",
|
|
392
|
-
...opts
|
|
478
|
+
const de_CreateUploadUrlCommand = async (output, context) => {
|
|
479
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
480
|
+
return de_CommandError(output, context);
|
|
481
|
+
}
|
|
482
|
+
const contents = smithyClient.map({
|
|
483
|
+
$metadata: deserializeMetadata(output),
|
|
484
|
+
});
|
|
485
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
486
|
+
const doc = smithyClient.take(data, {
|
|
487
|
+
codeArtifactId: smithyClient.expectString,
|
|
488
|
+
requestHeaders: smithyClient._json,
|
|
489
|
+
s3Url: smithyClient.expectString,
|
|
393
490
|
});
|
|
394
|
-
Object.
|
|
395
|
-
|
|
396
|
-
this.reason = opts.reason;
|
|
397
|
-
this.fieldList = opts.fieldList;
|
|
398
|
-
}
|
|
491
|
+
Object.assign(contents, doc);
|
|
492
|
+
return contents;
|
|
399
493
|
};
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
errorCode;
|
|
411
|
-
/**
|
|
412
|
-
* <p>The identifier for the service resource associated with the request.</p>
|
|
413
|
-
* @public
|
|
414
|
-
*/
|
|
415
|
-
resourceId;
|
|
416
|
-
/**
|
|
417
|
-
* <p>The type of resource associated with the request.</p>
|
|
418
|
-
* @public
|
|
419
|
-
*/
|
|
420
|
-
resourceType;
|
|
421
|
-
/**
|
|
422
|
-
* @internal
|
|
423
|
-
*/
|
|
424
|
-
constructor(opts) {
|
|
425
|
-
super({
|
|
426
|
-
name: "ConflictException",
|
|
427
|
-
$fault: "client",
|
|
428
|
-
...opts
|
|
494
|
+
const de_GetAccountConfigurationCommand = async (output, context) => {
|
|
495
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
496
|
+
return de_CommandError(output, context);
|
|
497
|
+
}
|
|
498
|
+
const contents = smithyClient.map({
|
|
499
|
+
$metadata: deserializeMetadata(output),
|
|
500
|
+
});
|
|
501
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
502
|
+
const doc = smithyClient.take(data, {
|
|
503
|
+
encryptionConfig: smithyClient._json,
|
|
429
504
|
});
|
|
430
|
-
Object.
|
|
431
|
-
|
|
432
|
-
this.resourceId = opts.resourceId;
|
|
433
|
-
this.resourceType = opts.resourceType;
|
|
434
|
-
}
|
|
505
|
+
Object.assign(contents, doc);
|
|
506
|
+
return contents;
|
|
435
507
|
};
|
|
436
|
-
|
|
437
|
-
(
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
})
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
508
|
+
const de_GetFindingsCommand = async (output, context) => {
|
|
509
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
510
|
+
return de_CommandError(output, context);
|
|
511
|
+
}
|
|
512
|
+
const contents = smithyClient.map({
|
|
513
|
+
$metadata: deserializeMetadata(output),
|
|
514
|
+
});
|
|
515
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
516
|
+
const doc = smithyClient.take(data, {
|
|
517
|
+
findings: (_) => de_Findings(_),
|
|
518
|
+
nextToken: smithyClient.expectString,
|
|
519
|
+
});
|
|
520
|
+
Object.assign(contents, doc);
|
|
521
|
+
return contents;
|
|
446
522
|
};
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
523
|
+
const de_GetMetricsSummaryCommand = async (output, context) => {
|
|
524
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
525
|
+
return de_CommandError(output, context);
|
|
526
|
+
}
|
|
527
|
+
const contents = smithyClient.map({
|
|
528
|
+
$metadata: deserializeMetadata(output),
|
|
529
|
+
});
|
|
530
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
531
|
+
const doc = smithyClient.take(data, {
|
|
532
|
+
metricsSummary: (_) => de_MetricsSummary(_),
|
|
533
|
+
});
|
|
534
|
+
Object.assign(contents, doc);
|
|
535
|
+
return contents;
|
|
451
536
|
};
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
* @public
|
|
471
|
-
*/
|
|
472
|
-
resourceType;
|
|
473
|
-
/**
|
|
474
|
-
* @internal
|
|
475
|
-
*/
|
|
476
|
-
constructor(opts) {
|
|
477
|
-
super({
|
|
478
|
-
name: "ResourceNotFoundException",
|
|
479
|
-
$fault: "client",
|
|
480
|
-
...opts
|
|
537
|
+
const de_GetScanCommand = async (output, context) => {
|
|
538
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
539
|
+
return de_CommandError(output, context);
|
|
540
|
+
}
|
|
541
|
+
const contents = smithyClient.map({
|
|
542
|
+
$metadata: deserializeMetadata(output),
|
|
543
|
+
});
|
|
544
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
545
|
+
const doc = smithyClient.take(data, {
|
|
546
|
+
analysisType: smithyClient.expectString,
|
|
547
|
+
createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
548
|
+
errorMessage: smithyClient.expectString,
|
|
549
|
+
numberOfRevisions: smithyClient.expectLong,
|
|
550
|
+
runId: smithyClient.expectString,
|
|
551
|
+
scanName: smithyClient.expectString,
|
|
552
|
+
scanNameArn: smithyClient.expectString,
|
|
553
|
+
scanState: smithyClient.expectString,
|
|
554
|
+
updatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
481
555
|
});
|
|
482
|
-
Object.
|
|
483
|
-
|
|
484
|
-
this.resourceId = opts.resourceId;
|
|
485
|
-
this.resourceType = opts.resourceType;
|
|
486
|
-
}
|
|
556
|
+
Object.assign(contents, doc);
|
|
557
|
+
return contents;
|
|
487
558
|
};
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
body = JSON.stringify(
|
|
503
|
-
(0, import_smithy_client.take)(input, {
|
|
504
|
-
findingIdentifiers: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "findingIdentifiers")
|
|
505
|
-
})
|
|
506
|
-
);
|
|
507
|
-
b.m("POST").h(headers).b(body);
|
|
508
|
-
return b.build();
|
|
509
|
-
}, "se_BatchGetFindingsCommand");
|
|
510
|
-
var se_CreateScanCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
511
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
512
|
-
const headers = {
|
|
513
|
-
"content-type": "application/json"
|
|
514
|
-
};
|
|
515
|
-
b.bp("/scans");
|
|
516
|
-
let body;
|
|
517
|
-
body = JSON.stringify(
|
|
518
|
-
(0, import_smithy_client.take)(input, {
|
|
519
|
-
analysisType: [],
|
|
520
|
-
clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
|
|
521
|
-
resourceId: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "resourceId"),
|
|
522
|
-
scanName: [],
|
|
523
|
-
scanType: [],
|
|
524
|
-
tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tags")
|
|
525
|
-
})
|
|
526
|
-
);
|
|
527
|
-
b.m("POST").h(headers).b(body);
|
|
528
|
-
return b.build();
|
|
529
|
-
}, "se_CreateScanCommand");
|
|
530
|
-
var se_CreateUploadUrlCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
531
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
532
|
-
const headers = {
|
|
533
|
-
"content-type": "application/json"
|
|
534
|
-
};
|
|
535
|
-
b.bp("/uploadUrl");
|
|
536
|
-
let body;
|
|
537
|
-
body = JSON.stringify(
|
|
538
|
-
(0, import_smithy_client.take)(input, {
|
|
539
|
-
scanName: []
|
|
540
|
-
})
|
|
541
|
-
);
|
|
542
|
-
b.m("POST").h(headers).b(body);
|
|
543
|
-
return b.build();
|
|
544
|
-
}, "se_CreateUploadUrlCommand");
|
|
545
|
-
var se_GetAccountConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
546
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
547
|
-
const headers = {};
|
|
548
|
-
b.bp("/accountConfiguration/get");
|
|
549
|
-
let body;
|
|
550
|
-
b.m("GET").h(headers).b(body);
|
|
551
|
-
return b.build();
|
|
552
|
-
}, "se_GetAccountConfigurationCommand");
|
|
553
|
-
var se_GetFindingsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
554
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
555
|
-
const headers = {};
|
|
556
|
-
b.bp("/findings/{scanName}");
|
|
557
|
-
b.p("scanName", () => input.scanName, "{scanName}", false);
|
|
558
|
-
const query = (0, import_smithy_client.map)({
|
|
559
|
-
[_nT]: [, input[_nT]],
|
|
560
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
561
|
-
[_s]: [, input[_s]]
|
|
562
|
-
});
|
|
563
|
-
let body;
|
|
564
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
565
|
-
return b.build();
|
|
566
|
-
}, "se_GetFindingsCommand");
|
|
567
|
-
var se_GetMetricsSummaryCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
568
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
569
|
-
const headers = {};
|
|
570
|
-
b.bp("/metrics/summary");
|
|
571
|
-
const query = (0, import_smithy_client.map)({
|
|
572
|
-
[_d]: [(0, import_smithy_client.expectNonNull)(input.date, `date`) != null, () => (0, import_smithy_client.serializeDateTime)(input[_d]).toString()]
|
|
573
|
-
});
|
|
574
|
-
let body;
|
|
575
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
576
|
-
return b.build();
|
|
577
|
-
}, "se_GetMetricsSummaryCommand");
|
|
578
|
-
var se_GetScanCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
579
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
580
|
-
const headers = {};
|
|
581
|
-
b.bp("/scans/{scanName}");
|
|
582
|
-
b.p("scanName", () => input.scanName, "{scanName}", false);
|
|
583
|
-
const query = (0, import_smithy_client.map)({
|
|
584
|
-
[_rI]: [, input[_rI]]
|
|
585
|
-
});
|
|
586
|
-
let body;
|
|
587
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
588
|
-
return b.build();
|
|
589
|
-
}, "se_GetScanCommand");
|
|
590
|
-
var se_ListFindingsMetricsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
591
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
592
|
-
const headers = {};
|
|
593
|
-
b.bp("/metrics/findings");
|
|
594
|
-
const query = (0, import_smithy_client.map)({
|
|
595
|
-
[_nT]: [, input[_nT]],
|
|
596
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
597
|
-
[_sD]: [(0, import_smithy_client.expectNonNull)(input.startDate, `startDate`) != null, () => (0, import_smithy_client.serializeDateTime)(input[_sD]).toString()],
|
|
598
|
-
[_eD]: [(0, import_smithy_client.expectNonNull)(input.endDate, `endDate`) != null, () => (0, import_smithy_client.serializeDateTime)(input[_eD]).toString()]
|
|
599
|
-
});
|
|
600
|
-
let body;
|
|
601
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
602
|
-
return b.build();
|
|
603
|
-
}, "se_ListFindingsMetricsCommand");
|
|
604
|
-
var se_ListScansCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
605
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
606
|
-
const headers = {};
|
|
607
|
-
b.bp("/scans");
|
|
608
|
-
const query = (0, import_smithy_client.map)({
|
|
609
|
-
[_nT]: [, input[_nT]],
|
|
610
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()]
|
|
611
|
-
});
|
|
612
|
-
let body;
|
|
613
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
614
|
-
return b.build();
|
|
615
|
-
}, "se_ListScansCommand");
|
|
616
|
-
var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
617
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
618
|
-
const headers = {};
|
|
619
|
-
b.bp("/tags/{resourceArn}");
|
|
620
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
621
|
-
let body;
|
|
622
|
-
b.m("GET").h(headers).b(body);
|
|
623
|
-
return b.build();
|
|
624
|
-
}, "se_ListTagsForResourceCommand");
|
|
625
|
-
var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
626
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
627
|
-
const headers = {
|
|
628
|
-
"content-type": "application/json"
|
|
629
|
-
};
|
|
630
|
-
b.bp("/tags/{resourceArn}");
|
|
631
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
632
|
-
let body;
|
|
633
|
-
body = JSON.stringify(
|
|
634
|
-
(0, import_smithy_client.take)(input, {
|
|
635
|
-
tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tags")
|
|
636
|
-
})
|
|
637
|
-
);
|
|
638
|
-
b.m("POST").h(headers).b(body);
|
|
639
|
-
return b.build();
|
|
640
|
-
}, "se_TagResourceCommand");
|
|
641
|
-
var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
642
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
643
|
-
const headers = {};
|
|
644
|
-
b.bp("/tags/{resourceArn}");
|
|
645
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
646
|
-
const query = (0, import_smithy_client.map)({
|
|
647
|
-
[_tK]: [(0, import_smithy_client.expectNonNull)(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []]
|
|
648
|
-
});
|
|
649
|
-
let body;
|
|
650
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
651
|
-
return b.build();
|
|
652
|
-
}, "se_UntagResourceCommand");
|
|
653
|
-
var se_UpdateAccountConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
654
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
655
|
-
const headers = {
|
|
656
|
-
"content-type": "application/json"
|
|
657
|
-
};
|
|
658
|
-
b.bp("/updateAccountConfiguration");
|
|
659
|
-
let body;
|
|
660
|
-
body = JSON.stringify(
|
|
661
|
-
(0, import_smithy_client.take)(input, {
|
|
662
|
-
encryptionConfig: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "encryptionConfig")
|
|
663
|
-
})
|
|
664
|
-
);
|
|
665
|
-
b.m("PUT").h(headers).b(body);
|
|
666
|
-
return b.build();
|
|
667
|
-
}, "se_UpdateAccountConfigurationCommand");
|
|
668
|
-
var de_BatchGetFindingsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
669
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
670
|
-
return de_CommandError(output, context);
|
|
671
|
-
}
|
|
672
|
-
const contents = (0, import_smithy_client.map)({
|
|
673
|
-
$metadata: deserializeMetadata(output)
|
|
674
|
-
});
|
|
675
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
676
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
677
|
-
failedFindings: import_smithy_client._json,
|
|
678
|
-
findings: /* @__PURE__ */ __name((_) => de_Findings(_, context), "findings")
|
|
679
|
-
});
|
|
680
|
-
Object.assign(contents, doc);
|
|
681
|
-
return contents;
|
|
682
|
-
}, "de_BatchGetFindingsCommand");
|
|
683
|
-
var de_CreateScanCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
684
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
685
|
-
return de_CommandError(output, context);
|
|
686
|
-
}
|
|
687
|
-
const contents = (0, import_smithy_client.map)({
|
|
688
|
-
$metadata: deserializeMetadata(output)
|
|
689
|
-
});
|
|
690
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
691
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
692
|
-
resourceId: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)((0, import_core2.awsExpectUnion)(_)), "resourceId"),
|
|
693
|
-
runId: import_smithy_client.expectString,
|
|
694
|
-
scanName: import_smithy_client.expectString,
|
|
695
|
-
scanNameArn: import_smithy_client.expectString,
|
|
696
|
-
scanState: import_smithy_client.expectString
|
|
697
|
-
});
|
|
698
|
-
Object.assign(contents, doc);
|
|
699
|
-
return contents;
|
|
700
|
-
}, "de_CreateScanCommand");
|
|
701
|
-
var de_CreateUploadUrlCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
702
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
703
|
-
return de_CommandError(output, context);
|
|
704
|
-
}
|
|
705
|
-
const contents = (0, import_smithy_client.map)({
|
|
706
|
-
$metadata: deserializeMetadata(output)
|
|
707
|
-
});
|
|
708
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
709
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
710
|
-
codeArtifactId: import_smithy_client.expectString,
|
|
711
|
-
requestHeaders: import_smithy_client._json,
|
|
712
|
-
s3Url: import_smithy_client.expectString
|
|
713
|
-
});
|
|
714
|
-
Object.assign(contents, doc);
|
|
715
|
-
return contents;
|
|
716
|
-
}, "de_CreateUploadUrlCommand");
|
|
717
|
-
var de_GetAccountConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
718
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
719
|
-
return de_CommandError(output, context);
|
|
720
|
-
}
|
|
721
|
-
const contents = (0, import_smithy_client.map)({
|
|
722
|
-
$metadata: deserializeMetadata(output)
|
|
723
|
-
});
|
|
724
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
725
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
726
|
-
encryptionConfig: import_smithy_client._json
|
|
727
|
-
});
|
|
728
|
-
Object.assign(contents, doc);
|
|
729
|
-
return contents;
|
|
730
|
-
}, "de_GetAccountConfigurationCommand");
|
|
731
|
-
var de_GetFindingsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
732
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
733
|
-
return de_CommandError(output, context);
|
|
734
|
-
}
|
|
735
|
-
const contents = (0, import_smithy_client.map)({
|
|
736
|
-
$metadata: deserializeMetadata(output)
|
|
737
|
-
});
|
|
738
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
739
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
740
|
-
findings: /* @__PURE__ */ __name((_) => de_Findings(_, context), "findings"),
|
|
741
|
-
nextToken: import_smithy_client.expectString
|
|
742
|
-
});
|
|
743
|
-
Object.assign(contents, doc);
|
|
744
|
-
return contents;
|
|
745
|
-
}, "de_GetFindingsCommand");
|
|
746
|
-
var de_GetMetricsSummaryCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
747
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
748
|
-
return de_CommandError(output, context);
|
|
749
|
-
}
|
|
750
|
-
const contents = (0, import_smithy_client.map)({
|
|
751
|
-
$metadata: deserializeMetadata(output)
|
|
752
|
-
});
|
|
753
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
754
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
755
|
-
metricsSummary: /* @__PURE__ */ __name((_) => de_MetricsSummary(_, context), "metricsSummary")
|
|
756
|
-
});
|
|
757
|
-
Object.assign(contents, doc);
|
|
758
|
-
return contents;
|
|
759
|
-
}, "de_GetMetricsSummaryCommand");
|
|
760
|
-
var de_GetScanCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
761
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
762
|
-
return de_CommandError(output, context);
|
|
763
|
-
}
|
|
764
|
-
const contents = (0, import_smithy_client.map)({
|
|
765
|
-
$metadata: deserializeMetadata(output)
|
|
766
|
-
});
|
|
767
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
768
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
769
|
-
analysisType: import_smithy_client.expectString,
|
|
770
|
-
createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"),
|
|
771
|
-
errorMessage: import_smithy_client.expectString,
|
|
772
|
-
numberOfRevisions: import_smithy_client.expectLong,
|
|
773
|
-
runId: import_smithy_client.expectString,
|
|
774
|
-
scanName: import_smithy_client.expectString,
|
|
775
|
-
scanNameArn: import_smithy_client.expectString,
|
|
776
|
-
scanState: import_smithy_client.expectString,
|
|
777
|
-
updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt")
|
|
778
|
-
});
|
|
779
|
-
Object.assign(contents, doc);
|
|
780
|
-
return contents;
|
|
781
|
-
}, "de_GetScanCommand");
|
|
782
|
-
var de_ListFindingsMetricsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
783
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
784
|
-
return de_CommandError(output, context);
|
|
785
|
-
}
|
|
786
|
-
const contents = (0, import_smithy_client.map)({
|
|
787
|
-
$metadata: deserializeMetadata(output)
|
|
788
|
-
});
|
|
789
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
790
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
791
|
-
findingsMetrics: /* @__PURE__ */ __name((_) => de_FindingsMetricList(_, context), "findingsMetrics"),
|
|
792
|
-
nextToken: import_smithy_client.expectString
|
|
793
|
-
});
|
|
794
|
-
Object.assign(contents, doc);
|
|
795
|
-
return contents;
|
|
796
|
-
}, "de_ListFindingsMetricsCommand");
|
|
797
|
-
var de_ListScansCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
798
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
799
|
-
return de_CommandError(output, context);
|
|
800
|
-
}
|
|
801
|
-
const contents = (0, import_smithy_client.map)({
|
|
802
|
-
$metadata: deserializeMetadata(output)
|
|
803
|
-
});
|
|
804
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
805
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
806
|
-
nextToken: import_smithy_client.expectString,
|
|
807
|
-
summaries: /* @__PURE__ */ __name((_) => de_ScanSummaries(_, context), "summaries")
|
|
808
|
-
});
|
|
809
|
-
Object.assign(contents, doc);
|
|
810
|
-
return contents;
|
|
811
|
-
}, "de_ListScansCommand");
|
|
812
|
-
var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
813
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
814
|
-
return de_CommandError(output, context);
|
|
815
|
-
}
|
|
816
|
-
const contents = (0, import_smithy_client.map)({
|
|
817
|
-
$metadata: deserializeMetadata(output)
|
|
818
|
-
});
|
|
819
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
820
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
821
|
-
tags: import_smithy_client._json
|
|
822
|
-
});
|
|
823
|
-
Object.assign(contents, doc);
|
|
824
|
-
return contents;
|
|
825
|
-
}, "de_ListTagsForResourceCommand");
|
|
826
|
-
var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
827
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
828
|
-
return de_CommandError(output, context);
|
|
829
|
-
}
|
|
830
|
-
const contents = (0, import_smithy_client.map)({
|
|
831
|
-
$metadata: deserializeMetadata(output)
|
|
832
|
-
});
|
|
833
|
-
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
834
|
-
return contents;
|
|
835
|
-
}, "de_TagResourceCommand");
|
|
836
|
-
var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
837
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
838
|
-
return de_CommandError(output, context);
|
|
839
|
-
}
|
|
840
|
-
const contents = (0, import_smithy_client.map)({
|
|
841
|
-
$metadata: deserializeMetadata(output)
|
|
842
|
-
});
|
|
843
|
-
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
844
|
-
return contents;
|
|
845
|
-
}, "de_UntagResourceCommand");
|
|
846
|
-
var de_UpdateAccountConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
847
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
848
|
-
return de_CommandError(output, context);
|
|
849
|
-
}
|
|
850
|
-
const contents = (0, import_smithy_client.map)({
|
|
851
|
-
$metadata: deserializeMetadata(output)
|
|
852
|
-
});
|
|
853
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
854
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
855
|
-
encryptionConfig: import_smithy_client._json
|
|
856
|
-
});
|
|
857
|
-
Object.assign(contents, doc);
|
|
858
|
-
return contents;
|
|
859
|
-
}, "de_UpdateAccountConfigurationCommand");
|
|
860
|
-
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
861
|
-
const parsedOutput = {
|
|
862
|
-
...output,
|
|
863
|
-
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
864
|
-
};
|
|
865
|
-
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
866
|
-
switch (errorCode) {
|
|
867
|
-
case "AccessDeniedException":
|
|
868
|
-
case "com.amazonaws.codegurusecurity#AccessDeniedException":
|
|
869
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
870
|
-
case "InternalServerException":
|
|
871
|
-
case "com.amazonaws.codegurusecurity#InternalServerException":
|
|
872
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
873
|
-
case "ThrottlingException":
|
|
874
|
-
case "com.amazonaws.codegurusecurity#ThrottlingException":
|
|
875
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
876
|
-
case "ValidationException":
|
|
877
|
-
case "com.amazonaws.codegurusecurity#ValidationException":
|
|
878
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
879
|
-
case "ConflictException":
|
|
880
|
-
case "com.amazonaws.codegurusecurity#ConflictException":
|
|
881
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
882
|
-
case "ResourceNotFoundException":
|
|
883
|
-
case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
|
|
884
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
885
|
-
default:
|
|
886
|
-
const parsedBody = parsedOutput.body;
|
|
887
|
-
return throwDefaultError({
|
|
888
|
-
output,
|
|
889
|
-
parsedBody,
|
|
890
|
-
errorCode
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
}, "de_CommandError");
|
|
894
|
-
var throwDefaultError = (0, import_smithy_client.withBaseException)(CodeGuruSecurityServiceException);
|
|
895
|
-
var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
896
|
-
const contents = (0, import_smithy_client.map)({});
|
|
897
|
-
const data = parsedOutput.body;
|
|
898
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
899
|
-
errorCode: import_smithy_client.expectString,
|
|
900
|
-
message: import_smithy_client.expectString,
|
|
901
|
-
resourceId: import_smithy_client.expectString,
|
|
902
|
-
resourceType: import_smithy_client.expectString
|
|
903
|
-
});
|
|
904
|
-
Object.assign(contents, doc);
|
|
905
|
-
const exception = new AccessDeniedException({
|
|
906
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
907
|
-
...contents
|
|
908
|
-
});
|
|
909
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
910
|
-
}, "de_AccessDeniedExceptionRes");
|
|
911
|
-
var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
912
|
-
const contents = (0, import_smithy_client.map)({});
|
|
913
|
-
const data = parsedOutput.body;
|
|
914
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
915
|
-
errorCode: import_smithy_client.expectString,
|
|
916
|
-
message: import_smithy_client.expectString,
|
|
917
|
-
resourceId: import_smithy_client.expectString,
|
|
918
|
-
resourceType: import_smithy_client.expectString
|
|
919
|
-
});
|
|
920
|
-
Object.assign(contents, doc);
|
|
921
|
-
const exception = new ConflictException({
|
|
922
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
923
|
-
...contents
|
|
924
|
-
});
|
|
925
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
926
|
-
}, "de_ConflictExceptionRes");
|
|
927
|
-
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
928
|
-
const contents = (0, import_smithy_client.map)({});
|
|
929
|
-
const data = parsedOutput.body;
|
|
930
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
931
|
-
error: import_smithy_client.expectString,
|
|
932
|
-
message: import_smithy_client.expectString
|
|
933
|
-
});
|
|
934
|
-
Object.assign(contents, doc);
|
|
935
|
-
const exception = new InternalServerException({
|
|
936
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
937
|
-
...contents
|
|
938
|
-
});
|
|
939
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
940
|
-
}, "de_InternalServerExceptionRes");
|
|
941
|
-
var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
942
|
-
const contents = (0, import_smithy_client.map)({});
|
|
943
|
-
const data = parsedOutput.body;
|
|
944
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
945
|
-
errorCode: import_smithy_client.expectString,
|
|
946
|
-
message: import_smithy_client.expectString,
|
|
947
|
-
resourceId: import_smithy_client.expectString,
|
|
948
|
-
resourceType: import_smithy_client.expectString
|
|
949
|
-
});
|
|
950
|
-
Object.assign(contents, doc);
|
|
951
|
-
const exception = new ResourceNotFoundException({
|
|
952
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
953
|
-
...contents
|
|
954
|
-
});
|
|
955
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
956
|
-
}, "de_ResourceNotFoundExceptionRes");
|
|
957
|
-
var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
958
|
-
const contents = (0, import_smithy_client.map)({});
|
|
959
|
-
const data = parsedOutput.body;
|
|
960
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
961
|
-
errorCode: import_smithy_client.expectString,
|
|
962
|
-
message: import_smithy_client.expectString,
|
|
963
|
-
quotaCode: import_smithy_client.expectString,
|
|
964
|
-
serviceCode: import_smithy_client.expectString
|
|
965
|
-
});
|
|
966
|
-
Object.assign(contents, doc);
|
|
967
|
-
const exception = new ThrottlingException({
|
|
968
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
969
|
-
...contents
|
|
970
|
-
});
|
|
971
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
972
|
-
}, "de_ThrottlingExceptionRes");
|
|
973
|
-
var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
974
|
-
const contents = (0, import_smithy_client.map)({});
|
|
975
|
-
const data = parsedOutput.body;
|
|
976
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
977
|
-
errorCode: import_smithy_client.expectString,
|
|
978
|
-
fieldList: import_smithy_client._json,
|
|
979
|
-
message: import_smithy_client.expectString,
|
|
980
|
-
reason: import_smithy_client.expectString
|
|
981
|
-
});
|
|
982
|
-
Object.assign(contents, doc);
|
|
983
|
-
const exception = new ValidationException({
|
|
984
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
985
|
-
...contents
|
|
986
|
-
});
|
|
987
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
988
|
-
}, "de_ValidationExceptionRes");
|
|
989
|
-
var de_AccountFindingsMetric = /* @__PURE__ */ __name((output, context) => {
|
|
990
|
-
return (0, import_smithy_client.take)(output, {
|
|
991
|
-
closedFindings: /* @__PURE__ */ __name((_) => de_FindingMetricsValuePerSeverity(_, context), "closedFindings"),
|
|
992
|
-
date: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "date"),
|
|
993
|
-
meanTimeToClose: /* @__PURE__ */ __name((_) => de_FindingMetricsValuePerSeverity(_, context), "meanTimeToClose"),
|
|
994
|
-
newFindings: /* @__PURE__ */ __name((_) => de_FindingMetricsValuePerSeverity(_, context), "newFindings"),
|
|
995
|
-
openFindings: /* @__PURE__ */ __name((_) => de_FindingMetricsValuePerSeverity(_, context), "openFindings")
|
|
996
|
-
});
|
|
997
|
-
}, "de_AccountFindingsMetric");
|
|
998
|
-
var de_Finding = /* @__PURE__ */ __name((output, context) => {
|
|
999
|
-
return (0, import_smithy_client.take)(output, {
|
|
1000
|
-
createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"),
|
|
1001
|
-
description: import_smithy_client.expectString,
|
|
1002
|
-
detectorId: import_smithy_client.expectString,
|
|
1003
|
-
detectorName: import_smithy_client.expectString,
|
|
1004
|
-
detectorTags: import_smithy_client._json,
|
|
1005
|
-
generatorId: import_smithy_client.expectString,
|
|
1006
|
-
id: import_smithy_client.expectString,
|
|
1007
|
-
remediation: import_smithy_client._json,
|
|
1008
|
-
resource: import_smithy_client._json,
|
|
1009
|
-
ruleId: import_smithy_client.expectString,
|
|
1010
|
-
severity: import_smithy_client.expectString,
|
|
1011
|
-
status: import_smithy_client.expectString,
|
|
1012
|
-
title: import_smithy_client.expectString,
|
|
1013
|
-
type: import_smithy_client.expectString,
|
|
1014
|
-
updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt"),
|
|
1015
|
-
vulnerability: import_smithy_client._json
|
|
1016
|
-
});
|
|
1017
|
-
}, "de_Finding");
|
|
1018
|
-
var de_FindingMetricsValuePerSeverity = /* @__PURE__ */ __name((output, context) => {
|
|
1019
|
-
return (0, import_smithy_client.take)(output, {
|
|
1020
|
-
critical: import_smithy_client.limitedParseDouble,
|
|
1021
|
-
high: import_smithy_client.limitedParseDouble,
|
|
1022
|
-
info: import_smithy_client.limitedParseDouble,
|
|
1023
|
-
low: import_smithy_client.limitedParseDouble,
|
|
1024
|
-
medium: import_smithy_client.limitedParseDouble
|
|
1025
|
-
});
|
|
1026
|
-
}, "de_FindingMetricsValuePerSeverity");
|
|
1027
|
-
var de_Findings = /* @__PURE__ */ __name((output, context) => {
|
|
1028
|
-
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1029
|
-
return de_Finding(entry, context);
|
|
1030
|
-
});
|
|
1031
|
-
return retVal;
|
|
1032
|
-
}, "de_Findings");
|
|
1033
|
-
var de_FindingsMetricList = /* @__PURE__ */ __name((output, context) => {
|
|
1034
|
-
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1035
|
-
return de_AccountFindingsMetric(entry, context);
|
|
1036
|
-
});
|
|
1037
|
-
return retVal;
|
|
1038
|
-
}, "de_FindingsMetricList");
|
|
1039
|
-
var de_MetricsSummary = /* @__PURE__ */ __name((output, context) => {
|
|
1040
|
-
return (0, import_smithy_client.take)(output, {
|
|
1041
|
-
categoriesWithMostFindings: import_smithy_client._json,
|
|
1042
|
-
date: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "date"),
|
|
1043
|
-
openFindings: /* @__PURE__ */ __name((_) => de_FindingMetricsValuePerSeverity(_, context), "openFindings"),
|
|
1044
|
-
scansWithMostOpenCriticalFindings: import_smithy_client._json,
|
|
1045
|
-
scansWithMostOpenFindings: import_smithy_client._json
|
|
1046
|
-
});
|
|
1047
|
-
}, "de_MetricsSummary");
|
|
1048
|
-
var de_ScanSummaries = /* @__PURE__ */ __name((output, context) => {
|
|
1049
|
-
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1050
|
-
return de_ScanSummary(entry, context);
|
|
1051
|
-
});
|
|
1052
|
-
return retVal;
|
|
1053
|
-
}, "de_ScanSummaries");
|
|
1054
|
-
var de_ScanSummary = /* @__PURE__ */ __name((output, context) => {
|
|
1055
|
-
return (0, import_smithy_client.take)(output, {
|
|
1056
|
-
createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"),
|
|
1057
|
-
runId: import_smithy_client.expectString,
|
|
1058
|
-
scanName: import_smithy_client.expectString,
|
|
1059
|
-
scanNameArn: import_smithy_client.expectString,
|
|
1060
|
-
scanState: import_smithy_client.expectString,
|
|
1061
|
-
updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt")
|
|
1062
|
-
});
|
|
1063
|
-
}, "de_ScanSummary");
|
|
1064
|
-
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
1065
|
-
httpStatusCode: output.statusCode,
|
|
1066
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1067
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1068
|
-
cfId: output.headers["x-amz-cf-id"]
|
|
1069
|
-
}), "deserializeMetadata");
|
|
1070
|
-
var _d = "date";
|
|
1071
|
-
var _eD = "endDate";
|
|
1072
|
-
var _mR = "maxResults";
|
|
1073
|
-
var _nT = "nextToken";
|
|
1074
|
-
var _rI = "runId";
|
|
1075
|
-
var _s = "status";
|
|
1076
|
-
var _sD = "startDate";
|
|
1077
|
-
var _tK = "tagKeys";
|
|
1078
|
-
|
|
1079
|
-
// src/commands/BatchGetFindingsCommand.ts
|
|
1080
|
-
var BatchGetFindingsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
1081
|
-
return [
|
|
1082
|
-
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1083
|
-
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1084
|
-
];
|
|
1085
|
-
}).s("AwsCodeGuruSecurity", "BatchGetFindings", {}).n("CodeGuruSecurityClient", "BatchGetFindingsCommand").f(void 0, void 0).ser(se_BatchGetFindingsCommand).de(de_BatchGetFindingsCommand).build() {
|
|
1086
|
-
static {
|
|
1087
|
-
__name(this, "BatchGetFindingsCommand");
|
|
1088
|
-
}
|
|
559
|
+
const de_ListFindingsMetricsCommand = async (output, context) => {
|
|
560
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
561
|
+
return de_CommandError(output, context);
|
|
562
|
+
}
|
|
563
|
+
const contents = smithyClient.map({
|
|
564
|
+
$metadata: deserializeMetadata(output),
|
|
565
|
+
});
|
|
566
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
567
|
+
const doc = smithyClient.take(data, {
|
|
568
|
+
findingsMetrics: (_) => de_FindingsMetricList(_),
|
|
569
|
+
nextToken: smithyClient.expectString,
|
|
570
|
+
});
|
|
571
|
+
Object.assign(contents, doc);
|
|
572
|
+
return contents;
|
|
1089
573
|
};
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
(
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
574
|
+
const de_ListScansCommand = async (output, context) => {
|
|
575
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
576
|
+
return de_CommandError(output, context);
|
|
577
|
+
}
|
|
578
|
+
const contents = smithyClient.map({
|
|
579
|
+
$metadata: deserializeMetadata(output),
|
|
580
|
+
});
|
|
581
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
582
|
+
const doc = smithyClient.take(data, {
|
|
583
|
+
nextToken: smithyClient.expectString,
|
|
584
|
+
summaries: (_) => de_ScanSummaries(_),
|
|
585
|
+
});
|
|
586
|
+
Object.assign(contents, doc);
|
|
587
|
+
return contents;
|
|
1104
588
|
};
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
(
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
})
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
}
|
|
589
|
+
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
590
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
591
|
+
return de_CommandError(output, context);
|
|
592
|
+
}
|
|
593
|
+
const contents = smithyClient.map({
|
|
594
|
+
$metadata: deserializeMetadata(output),
|
|
595
|
+
});
|
|
596
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
597
|
+
const doc = smithyClient.take(data, {
|
|
598
|
+
tags: smithyClient._json,
|
|
599
|
+
});
|
|
600
|
+
Object.assign(contents, doc);
|
|
601
|
+
return contents;
|
|
1119
602
|
};
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
];
|
|
1130
|
-
}).s("AwsCodeGuruSecurity", "GetAccountConfiguration", {}).n("CodeGuruSecurityClient", "GetAccountConfigurationCommand").f(void 0, void 0).ser(se_GetAccountConfigurationCommand).de(de_GetAccountConfigurationCommand).build() {
|
|
1131
|
-
static {
|
|
1132
|
-
__name(this, "GetAccountConfigurationCommand");
|
|
1133
|
-
}
|
|
603
|
+
const de_TagResourceCommand = async (output, context) => {
|
|
604
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
605
|
+
return de_CommandError(output, context);
|
|
606
|
+
}
|
|
607
|
+
const contents = smithyClient.map({
|
|
608
|
+
$metadata: deserializeMetadata(output),
|
|
609
|
+
});
|
|
610
|
+
await smithyClient.collectBody(output.body, context);
|
|
611
|
+
return contents;
|
|
1134
612
|
};
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
];
|
|
1145
|
-
}).s("AwsCodeGuruSecurity", "GetFindings", {}).n("CodeGuruSecurityClient", "GetFindingsCommand").f(void 0, void 0).ser(se_GetFindingsCommand).de(de_GetFindingsCommand).build() {
|
|
1146
|
-
static {
|
|
1147
|
-
__name(this, "GetFindingsCommand");
|
|
1148
|
-
}
|
|
613
|
+
const de_UntagResourceCommand = async (output, context) => {
|
|
614
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
615
|
+
return de_CommandError(output, context);
|
|
616
|
+
}
|
|
617
|
+
const contents = smithyClient.map({
|
|
618
|
+
$metadata: deserializeMetadata(output),
|
|
619
|
+
});
|
|
620
|
+
await smithyClient.collectBody(output.body, context);
|
|
621
|
+
return contents;
|
|
1149
622
|
};
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
(
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
})
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
}
|
|
623
|
+
const de_UpdateAccountConfigurationCommand = async (output, context) => {
|
|
624
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
625
|
+
return de_CommandError(output, context);
|
|
626
|
+
}
|
|
627
|
+
const contents = smithyClient.map({
|
|
628
|
+
$metadata: deserializeMetadata(output),
|
|
629
|
+
});
|
|
630
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
631
|
+
const doc = smithyClient.take(data, {
|
|
632
|
+
encryptionConfig: smithyClient._json,
|
|
633
|
+
});
|
|
634
|
+
Object.assign(contents, doc);
|
|
635
|
+
return contents;
|
|
1164
636
|
};
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
637
|
+
const de_CommandError = async (output, context) => {
|
|
638
|
+
const parsedOutput = {
|
|
639
|
+
...output,
|
|
640
|
+
body: await core$1.parseJsonErrorBody(output.body, context),
|
|
641
|
+
};
|
|
642
|
+
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
643
|
+
switch (errorCode) {
|
|
644
|
+
case "AccessDeniedException":
|
|
645
|
+
case "com.amazonaws.codegurusecurity#AccessDeniedException":
|
|
646
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput);
|
|
647
|
+
case "InternalServerException":
|
|
648
|
+
case "com.amazonaws.codegurusecurity#InternalServerException":
|
|
649
|
+
throw await de_InternalServerExceptionRes(parsedOutput);
|
|
650
|
+
case "ThrottlingException":
|
|
651
|
+
case "com.amazonaws.codegurusecurity#ThrottlingException":
|
|
652
|
+
throw await de_ThrottlingExceptionRes(parsedOutput);
|
|
653
|
+
case "ValidationException":
|
|
654
|
+
case "com.amazonaws.codegurusecurity#ValidationException":
|
|
655
|
+
throw await de_ValidationExceptionRes(parsedOutput);
|
|
656
|
+
case "ConflictException":
|
|
657
|
+
case "com.amazonaws.codegurusecurity#ConflictException":
|
|
658
|
+
throw await de_ConflictExceptionRes(parsedOutput);
|
|
659
|
+
case "ResourceNotFoundException":
|
|
660
|
+
case "com.amazonaws.codegurusecurity#ResourceNotFoundException":
|
|
661
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput);
|
|
662
|
+
default:
|
|
663
|
+
const parsedBody = parsedOutput.body;
|
|
664
|
+
return throwDefaultError({
|
|
665
|
+
output,
|
|
666
|
+
parsedBody,
|
|
667
|
+
errorCode,
|
|
668
|
+
});
|
|
669
|
+
}
|
|
1179
670
|
};
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
671
|
+
const throwDefaultError = smithyClient.withBaseException(CodeGuruSecurityServiceException);
|
|
672
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
673
|
+
const contents = smithyClient.map({});
|
|
674
|
+
const data = parsedOutput.body;
|
|
675
|
+
const doc = smithyClient.take(data, {
|
|
676
|
+
errorCode: smithyClient.expectString,
|
|
677
|
+
message: smithyClient.expectString,
|
|
678
|
+
resourceId: smithyClient.expectString,
|
|
679
|
+
resourceType: smithyClient.expectString,
|
|
680
|
+
});
|
|
681
|
+
Object.assign(contents, doc);
|
|
682
|
+
const exception = new AccessDeniedException({
|
|
683
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
684
|
+
...contents,
|
|
685
|
+
});
|
|
686
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1194
687
|
};
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
688
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
689
|
+
const contents = smithyClient.map({});
|
|
690
|
+
const data = parsedOutput.body;
|
|
691
|
+
const doc = smithyClient.take(data, {
|
|
692
|
+
errorCode: smithyClient.expectString,
|
|
693
|
+
message: smithyClient.expectString,
|
|
694
|
+
resourceId: smithyClient.expectString,
|
|
695
|
+
resourceType: smithyClient.expectString,
|
|
696
|
+
});
|
|
697
|
+
Object.assign(contents, doc);
|
|
698
|
+
const exception = new ConflictException({
|
|
699
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
700
|
+
...contents,
|
|
701
|
+
});
|
|
702
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1209
703
|
};
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
}
|
|
704
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
705
|
+
const contents = smithyClient.map({});
|
|
706
|
+
const data = parsedOutput.body;
|
|
707
|
+
const doc = smithyClient.take(data, {
|
|
708
|
+
error: smithyClient.expectString,
|
|
709
|
+
message: smithyClient.expectString,
|
|
710
|
+
});
|
|
711
|
+
Object.assign(contents, doc);
|
|
712
|
+
const exception = new InternalServerException({
|
|
713
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
714
|
+
...contents,
|
|
715
|
+
});
|
|
716
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1224
717
|
};
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
718
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
719
|
+
const contents = smithyClient.map({});
|
|
720
|
+
const data = parsedOutput.body;
|
|
721
|
+
const doc = smithyClient.take(data, {
|
|
722
|
+
errorCode: smithyClient.expectString,
|
|
723
|
+
message: smithyClient.expectString,
|
|
724
|
+
resourceId: smithyClient.expectString,
|
|
725
|
+
resourceType: smithyClient.expectString,
|
|
726
|
+
});
|
|
727
|
+
Object.assign(contents, doc);
|
|
728
|
+
const exception = new ResourceNotFoundException({
|
|
729
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
730
|
+
...contents,
|
|
731
|
+
});
|
|
732
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1239
733
|
};
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
734
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
735
|
+
const contents = smithyClient.map({});
|
|
736
|
+
const data = parsedOutput.body;
|
|
737
|
+
const doc = smithyClient.take(data, {
|
|
738
|
+
errorCode: smithyClient.expectString,
|
|
739
|
+
message: smithyClient.expectString,
|
|
740
|
+
quotaCode: smithyClient.expectString,
|
|
741
|
+
serviceCode: smithyClient.expectString,
|
|
742
|
+
});
|
|
743
|
+
Object.assign(contents, doc);
|
|
744
|
+
const exception = new ThrottlingException({
|
|
745
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
746
|
+
...contents,
|
|
747
|
+
});
|
|
748
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1254
749
|
};
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
750
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
751
|
+
const contents = smithyClient.map({});
|
|
752
|
+
const data = parsedOutput.body;
|
|
753
|
+
const doc = smithyClient.take(data, {
|
|
754
|
+
errorCode: smithyClient.expectString,
|
|
755
|
+
fieldList: smithyClient._json,
|
|
756
|
+
message: smithyClient.expectString,
|
|
757
|
+
reason: smithyClient.expectString,
|
|
758
|
+
});
|
|
759
|
+
Object.assign(contents, doc);
|
|
760
|
+
const exception = new ValidationException({
|
|
761
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
762
|
+
...contents,
|
|
763
|
+
});
|
|
764
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1269
765
|
};
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
GetMetricsSummaryCommand,
|
|
1279
|
-
GetScanCommand,
|
|
1280
|
-
ListFindingsMetricsCommand,
|
|
1281
|
-
ListScansCommand,
|
|
1282
|
-
ListTagsForResourceCommand,
|
|
1283
|
-
TagResourceCommand,
|
|
1284
|
-
UntagResourceCommand,
|
|
1285
|
-
UpdateAccountConfigurationCommand
|
|
766
|
+
const de_AccountFindingsMetric = (output, context) => {
|
|
767
|
+
return smithyClient.take(output, {
|
|
768
|
+
closedFindings: (_) => de_FindingMetricsValuePerSeverity(_),
|
|
769
|
+
date: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
770
|
+
meanTimeToClose: (_) => de_FindingMetricsValuePerSeverity(_),
|
|
771
|
+
newFindings: (_) => de_FindingMetricsValuePerSeverity(_),
|
|
772
|
+
openFindings: (_) => de_FindingMetricsValuePerSeverity(_),
|
|
773
|
+
});
|
|
1286
774
|
};
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
775
|
+
const de_Finding = (output, context) => {
|
|
776
|
+
return smithyClient.take(output, {
|
|
777
|
+
createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
778
|
+
description: smithyClient.expectString,
|
|
779
|
+
detectorId: smithyClient.expectString,
|
|
780
|
+
detectorName: smithyClient.expectString,
|
|
781
|
+
detectorTags: smithyClient._json,
|
|
782
|
+
generatorId: smithyClient.expectString,
|
|
783
|
+
id: smithyClient.expectString,
|
|
784
|
+
remediation: smithyClient._json,
|
|
785
|
+
resource: smithyClient._json,
|
|
786
|
+
ruleId: smithyClient.expectString,
|
|
787
|
+
severity: smithyClient.expectString,
|
|
788
|
+
status: smithyClient.expectString,
|
|
789
|
+
title: smithyClient.expectString,
|
|
790
|
+
type: smithyClient.expectString,
|
|
791
|
+
updatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
792
|
+
vulnerability: smithyClient._json,
|
|
793
|
+
});
|
|
1291
794
|
};
|
|
1292
|
-
(
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
795
|
+
const de_FindingMetricsValuePerSeverity = (output, context) => {
|
|
796
|
+
return smithyClient.take(output, {
|
|
797
|
+
critical: smithyClient.limitedParseDouble,
|
|
798
|
+
high: smithyClient.limitedParseDouble,
|
|
799
|
+
info: smithyClient.limitedParseDouble,
|
|
800
|
+
low: smithyClient.limitedParseDouble,
|
|
801
|
+
medium: smithyClient.limitedParseDouble,
|
|
802
|
+
});
|
|
803
|
+
};
|
|
804
|
+
const de_Findings = (output, context) => {
|
|
805
|
+
const retVal = (output || [])
|
|
806
|
+
.filter((e) => e != null)
|
|
807
|
+
.map((entry) => {
|
|
808
|
+
return de_Finding(entry);
|
|
809
|
+
});
|
|
810
|
+
return retVal;
|
|
811
|
+
};
|
|
812
|
+
const de_FindingsMetricList = (output, context) => {
|
|
813
|
+
const retVal = (output || [])
|
|
814
|
+
.filter((e) => e != null)
|
|
815
|
+
.map((entry) => {
|
|
816
|
+
return de_AccountFindingsMetric(entry);
|
|
817
|
+
});
|
|
818
|
+
return retVal;
|
|
819
|
+
};
|
|
820
|
+
const de_MetricsSummary = (output, context) => {
|
|
821
|
+
return smithyClient.take(output, {
|
|
822
|
+
categoriesWithMostFindings: smithyClient._json,
|
|
823
|
+
date: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
824
|
+
openFindings: (_) => de_FindingMetricsValuePerSeverity(_),
|
|
825
|
+
scansWithMostOpenCriticalFindings: smithyClient._json,
|
|
826
|
+
scansWithMostOpenFindings: smithyClient._json,
|
|
827
|
+
});
|
|
828
|
+
};
|
|
829
|
+
const de_ScanSummaries = (output, context) => {
|
|
830
|
+
const retVal = (output || [])
|
|
831
|
+
.filter((e) => e != null)
|
|
832
|
+
.map((entry) => {
|
|
833
|
+
return de_ScanSummary(entry);
|
|
834
|
+
});
|
|
835
|
+
return retVal;
|
|
836
|
+
};
|
|
837
|
+
const de_ScanSummary = (output, context) => {
|
|
838
|
+
return smithyClient.take(output, {
|
|
839
|
+
createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
840
|
+
runId: smithyClient.expectString,
|
|
841
|
+
scanName: smithyClient.expectString,
|
|
842
|
+
scanNameArn: smithyClient.expectString,
|
|
843
|
+
scanState: smithyClient.expectString,
|
|
844
|
+
updatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
845
|
+
});
|
|
846
|
+
};
|
|
847
|
+
const deserializeMetadata = (output) => ({
|
|
848
|
+
httpStatusCode: output.statusCode,
|
|
849
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
850
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
851
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
852
|
+
});
|
|
853
|
+
const _d = "date";
|
|
854
|
+
const _eD = "endDate";
|
|
855
|
+
const _mR = "maxResults";
|
|
856
|
+
const _nT = "nextToken";
|
|
857
|
+
const _rI = "runId";
|
|
858
|
+
const _s = "status";
|
|
859
|
+
const _sD = "startDate";
|
|
860
|
+
const _tK = "tagKeys";
|
|
861
|
+
|
|
862
|
+
class BatchGetFindingsCommand extends smithyClient.Command
|
|
863
|
+
.classBuilder()
|
|
864
|
+
.ep(commonParams)
|
|
865
|
+
.m(function (Command, cs, config, o) {
|
|
866
|
+
return [
|
|
867
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
868
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
869
|
+
];
|
|
870
|
+
})
|
|
871
|
+
.s("AwsCodeGuruSecurity", "BatchGetFindings", {})
|
|
872
|
+
.n("CodeGuruSecurityClient", "BatchGetFindingsCommand")
|
|
873
|
+
.f(void 0, void 0)
|
|
874
|
+
.ser(se_BatchGetFindingsCommand)
|
|
875
|
+
.de(de_BatchGetFindingsCommand)
|
|
876
|
+
.build() {
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
class CreateScanCommand extends smithyClient.Command
|
|
880
|
+
.classBuilder()
|
|
881
|
+
.ep(commonParams)
|
|
882
|
+
.m(function (Command, cs, config, o) {
|
|
883
|
+
return [
|
|
884
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
885
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
886
|
+
];
|
|
887
|
+
})
|
|
888
|
+
.s("AwsCodeGuruSecurity", "CreateScan", {})
|
|
889
|
+
.n("CodeGuruSecurityClient", "CreateScanCommand")
|
|
890
|
+
.f(void 0, void 0)
|
|
891
|
+
.ser(se_CreateScanCommand)
|
|
892
|
+
.de(de_CreateScanCommand)
|
|
893
|
+
.build() {
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
class CreateUploadUrlCommand extends smithyClient.Command
|
|
897
|
+
.classBuilder()
|
|
898
|
+
.ep(commonParams)
|
|
899
|
+
.m(function (Command, cs, config, o) {
|
|
900
|
+
return [
|
|
901
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
902
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
903
|
+
];
|
|
904
|
+
})
|
|
905
|
+
.s("AwsCodeGuruSecurity", "CreateUploadUrl", {})
|
|
906
|
+
.n("CodeGuruSecurityClient", "CreateUploadUrlCommand")
|
|
907
|
+
.f(void 0, CreateUploadUrlResponseFilterSensitiveLog)
|
|
908
|
+
.ser(se_CreateUploadUrlCommand)
|
|
909
|
+
.de(de_CreateUploadUrlCommand)
|
|
910
|
+
.build() {
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
class GetAccountConfigurationCommand extends smithyClient.Command
|
|
914
|
+
.classBuilder()
|
|
915
|
+
.ep(commonParams)
|
|
916
|
+
.m(function (Command, cs, config, o) {
|
|
917
|
+
return [
|
|
918
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
919
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
920
|
+
];
|
|
921
|
+
})
|
|
922
|
+
.s("AwsCodeGuruSecurity", "GetAccountConfiguration", {})
|
|
923
|
+
.n("CodeGuruSecurityClient", "GetAccountConfigurationCommand")
|
|
924
|
+
.f(void 0, void 0)
|
|
925
|
+
.ser(se_GetAccountConfigurationCommand)
|
|
926
|
+
.de(de_GetAccountConfigurationCommand)
|
|
927
|
+
.build() {
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
class GetFindingsCommand extends smithyClient.Command
|
|
931
|
+
.classBuilder()
|
|
932
|
+
.ep(commonParams)
|
|
933
|
+
.m(function (Command, cs, config, o) {
|
|
934
|
+
return [
|
|
935
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
936
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
937
|
+
];
|
|
938
|
+
})
|
|
939
|
+
.s("AwsCodeGuruSecurity", "GetFindings", {})
|
|
940
|
+
.n("CodeGuruSecurityClient", "GetFindingsCommand")
|
|
941
|
+
.f(void 0, void 0)
|
|
942
|
+
.ser(se_GetFindingsCommand)
|
|
943
|
+
.de(de_GetFindingsCommand)
|
|
944
|
+
.build() {
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
class GetMetricsSummaryCommand extends smithyClient.Command
|
|
948
|
+
.classBuilder()
|
|
949
|
+
.ep(commonParams)
|
|
950
|
+
.m(function (Command, cs, config, o) {
|
|
951
|
+
return [
|
|
952
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
953
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
954
|
+
];
|
|
955
|
+
})
|
|
956
|
+
.s("AwsCodeGuruSecurity", "GetMetricsSummary", {})
|
|
957
|
+
.n("CodeGuruSecurityClient", "GetMetricsSummaryCommand")
|
|
958
|
+
.f(void 0, void 0)
|
|
959
|
+
.ser(se_GetMetricsSummaryCommand)
|
|
960
|
+
.de(de_GetMetricsSummaryCommand)
|
|
961
|
+
.build() {
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
class GetScanCommand extends smithyClient.Command
|
|
965
|
+
.classBuilder()
|
|
966
|
+
.ep(commonParams)
|
|
967
|
+
.m(function (Command, cs, config, o) {
|
|
968
|
+
return [
|
|
969
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
970
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
971
|
+
];
|
|
972
|
+
})
|
|
973
|
+
.s("AwsCodeGuruSecurity", "GetScan", {})
|
|
974
|
+
.n("CodeGuruSecurityClient", "GetScanCommand")
|
|
975
|
+
.f(void 0, void 0)
|
|
976
|
+
.ser(se_GetScanCommand)
|
|
977
|
+
.de(de_GetScanCommand)
|
|
978
|
+
.build() {
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
class ListFindingsMetricsCommand extends smithyClient.Command
|
|
982
|
+
.classBuilder()
|
|
983
|
+
.ep(commonParams)
|
|
984
|
+
.m(function (Command, cs, config, o) {
|
|
985
|
+
return [
|
|
986
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
987
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
988
|
+
];
|
|
989
|
+
})
|
|
990
|
+
.s("AwsCodeGuruSecurity", "ListFindingsMetrics", {})
|
|
991
|
+
.n("CodeGuruSecurityClient", "ListFindingsMetricsCommand")
|
|
992
|
+
.f(void 0, void 0)
|
|
993
|
+
.ser(se_ListFindingsMetricsCommand)
|
|
994
|
+
.de(de_ListFindingsMetricsCommand)
|
|
995
|
+
.build() {
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
class ListScansCommand extends smithyClient.Command
|
|
999
|
+
.classBuilder()
|
|
1000
|
+
.ep(commonParams)
|
|
1001
|
+
.m(function (Command, cs, config, o) {
|
|
1002
|
+
return [
|
|
1003
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
1004
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
1005
|
+
];
|
|
1006
|
+
})
|
|
1007
|
+
.s("AwsCodeGuruSecurity", "ListScans", {})
|
|
1008
|
+
.n("CodeGuruSecurityClient", "ListScansCommand")
|
|
1009
|
+
.f(void 0, void 0)
|
|
1010
|
+
.ser(se_ListScansCommand)
|
|
1011
|
+
.de(de_ListScansCommand)
|
|
1012
|
+
.build() {
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
class ListTagsForResourceCommand extends smithyClient.Command
|
|
1016
|
+
.classBuilder()
|
|
1017
|
+
.ep(commonParams)
|
|
1018
|
+
.m(function (Command, cs, config, o) {
|
|
1019
|
+
return [
|
|
1020
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
1021
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
1022
|
+
];
|
|
1023
|
+
})
|
|
1024
|
+
.s("AwsCodeGuruSecurity", "ListTagsForResource", {})
|
|
1025
|
+
.n("CodeGuruSecurityClient", "ListTagsForResourceCommand")
|
|
1026
|
+
.f(void 0, void 0)
|
|
1027
|
+
.ser(se_ListTagsForResourceCommand)
|
|
1028
|
+
.de(de_ListTagsForResourceCommand)
|
|
1029
|
+
.build() {
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
class TagResourceCommand extends smithyClient.Command
|
|
1033
|
+
.classBuilder()
|
|
1034
|
+
.ep(commonParams)
|
|
1035
|
+
.m(function (Command, cs, config, o) {
|
|
1036
|
+
return [
|
|
1037
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
1038
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
1039
|
+
];
|
|
1040
|
+
})
|
|
1041
|
+
.s("AwsCodeGuruSecurity", "TagResource", {})
|
|
1042
|
+
.n("CodeGuruSecurityClient", "TagResourceCommand")
|
|
1043
|
+
.f(void 0, void 0)
|
|
1044
|
+
.ser(se_TagResourceCommand)
|
|
1045
|
+
.de(de_TagResourceCommand)
|
|
1046
|
+
.build() {
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
class UntagResourceCommand extends smithyClient.Command
|
|
1050
|
+
.classBuilder()
|
|
1051
|
+
.ep(commonParams)
|
|
1052
|
+
.m(function (Command, cs, config, o) {
|
|
1053
|
+
return [
|
|
1054
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
1055
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
1056
|
+
];
|
|
1057
|
+
})
|
|
1058
|
+
.s("AwsCodeGuruSecurity", "UntagResource", {})
|
|
1059
|
+
.n("CodeGuruSecurityClient", "UntagResourceCommand")
|
|
1060
|
+
.f(void 0, void 0)
|
|
1061
|
+
.ser(se_UntagResourceCommand)
|
|
1062
|
+
.de(de_UntagResourceCommand)
|
|
1063
|
+
.build() {
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
class UpdateAccountConfigurationCommand extends smithyClient.Command
|
|
1067
|
+
.classBuilder()
|
|
1068
|
+
.ep(commonParams)
|
|
1069
|
+
.m(function (Command, cs, config, o) {
|
|
1070
|
+
return [
|
|
1071
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
1072
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
1073
|
+
];
|
|
1074
|
+
})
|
|
1075
|
+
.s("AwsCodeGuruSecurity", "UpdateAccountConfiguration", {})
|
|
1076
|
+
.n("CodeGuruSecurityClient", "UpdateAccountConfigurationCommand")
|
|
1077
|
+
.f(void 0, void 0)
|
|
1078
|
+
.ser(se_UpdateAccountConfigurationCommand)
|
|
1079
|
+
.de(de_UpdateAccountConfigurationCommand)
|
|
1080
|
+
.build() {
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
const commands = {
|
|
1084
|
+
BatchGetFindingsCommand,
|
|
1085
|
+
CreateScanCommand,
|
|
1086
|
+
CreateUploadUrlCommand,
|
|
1087
|
+
GetAccountConfigurationCommand,
|
|
1088
|
+
GetFindingsCommand,
|
|
1089
|
+
GetMetricsSummaryCommand,
|
|
1090
|
+
GetScanCommand,
|
|
1091
|
+
ListFindingsMetricsCommand,
|
|
1092
|
+
ListScansCommand,
|
|
1093
|
+
ListTagsForResourceCommand,
|
|
1094
|
+
TagResourceCommand,
|
|
1095
|
+
UntagResourceCommand,
|
|
1096
|
+
UpdateAccountConfigurationCommand,
|
|
1097
|
+
};
|
|
1098
|
+
class CodeGuruSecurity extends CodeGuruSecurityClient {
|
|
1099
|
+
}
|
|
1100
|
+
smithyClient.createAggregatedClient(commands, CodeGuruSecurity);
|
|
1299
1101
|
|
|
1300
|
-
|
|
1102
|
+
const paginateGetFindings = core.createPaginator(CodeGuruSecurityClient, GetFindingsCommand, "nextToken", "nextToken", "maxResults");
|
|
1301
1103
|
|
|
1302
|
-
|
|
1104
|
+
const paginateListFindingsMetrics = core.createPaginator(CodeGuruSecurityClient, ListFindingsMetricsCommand, "nextToken", "nextToken", "maxResults");
|
|
1303
1105
|
|
|
1304
|
-
|
|
1305
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
1106
|
+
const paginateListScans = core.createPaginator(CodeGuruSecurityClient, ListScansCommand, "nextToken", "nextToken", "maxResults");
|
|
1306
1107
|
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
CodeGuruSecurityClient,
|
|
1311
|
-
CodeGuruSecurity,
|
|
1312
|
-
$Command,
|
|
1313
|
-
BatchGetFindingsCommand,
|
|
1314
|
-
CreateScanCommand,
|
|
1315
|
-
CreateUploadUrlCommand,
|
|
1316
|
-
GetAccountConfigurationCommand,
|
|
1317
|
-
GetFindingsCommand,
|
|
1318
|
-
GetMetricsSummaryCommand,
|
|
1319
|
-
GetScanCommand,
|
|
1320
|
-
ListFindingsMetricsCommand,
|
|
1321
|
-
ListScansCommand,
|
|
1322
|
-
ListTagsForResourceCommand,
|
|
1323
|
-
TagResourceCommand,
|
|
1324
|
-
UntagResourceCommand,
|
|
1325
|
-
UpdateAccountConfigurationCommand,
|
|
1326
|
-
paginateGetFindings,
|
|
1327
|
-
paginateListFindingsMetrics,
|
|
1328
|
-
paginateListScans,
|
|
1329
|
-
AccessDeniedException,
|
|
1330
|
-
AnalysisType,
|
|
1331
|
-
ErrorCode,
|
|
1332
|
-
Severity,
|
|
1333
|
-
Status,
|
|
1334
|
-
InternalServerException,
|
|
1335
|
-
ThrottlingException,
|
|
1336
|
-
ValidationExceptionReason,
|
|
1337
|
-
ValidationException,
|
|
1338
|
-
ConflictException,
|
|
1339
|
-
ResourceId,
|
|
1340
|
-
ScanType,
|
|
1341
|
-
ScanState,
|
|
1342
|
-
ResourceNotFoundException,
|
|
1343
|
-
CreateUploadUrlResponseFilterSensitiveLog
|
|
1108
|
+
Object.defineProperty(exports, "$Command", {
|
|
1109
|
+
enumerable: true,
|
|
1110
|
+
get: function () { return smithyClient.Command; }
|
|
1344
1111
|
});
|
|
1345
|
-
|
|
1112
|
+
Object.defineProperty(exports, "__Client", {
|
|
1113
|
+
enumerable: true,
|
|
1114
|
+
get: function () { return smithyClient.Client; }
|
|
1115
|
+
});
|
|
1116
|
+
exports.AccessDeniedException = AccessDeniedException;
|
|
1117
|
+
exports.AnalysisType = AnalysisType;
|
|
1118
|
+
exports.BatchGetFindingsCommand = BatchGetFindingsCommand;
|
|
1119
|
+
exports.CodeGuruSecurity = CodeGuruSecurity;
|
|
1120
|
+
exports.CodeGuruSecurityClient = CodeGuruSecurityClient;
|
|
1121
|
+
exports.CodeGuruSecurityServiceException = CodeGuruSecurityServiceException;
|
|
1122
|
+
exports.ConflictException = ConflictException;
|
|
1123
|
+
exports.CreateScanCommand = CreateScanCommand;
|
|
1124
|
+
exports.CreateUploadUrlCommand = CreateUploadUrlCommand;
|
|
1125
|
+
exports.CreateUploadUrlResponseFilterSensitiveLog = CreateUploadUrlResponseFilterSensitiveLog;
|
|
1126
|
+
exports.ErrorCode = ErrorCode;
|
|
1127
|
+
exports.GetAccountConfigurationCommand = GetAccountConfigurationCommand;
|
|
1128
|
+
exports.GetFindingsCommand = GetFindingsCommand;
|
|
1129
|
+
exports.GetMetricsSummaryCommand = GetMetricsSummaryCommand;
|
|
1130
|
+
exports.GetScanCommand = GetScanCommand;
|
|
1131
|
+
exports.InternalServerException = InternalServerException;
|
|
1132
|
+
exports.ListFindingsMetricsCommand = ListFindingsMetricsCommand;
|
|
1133
|
+
exports.ListScansCommand = ListScansCommand;
|
|
1134
|
+
exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
|
|
1135
|
+
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
1136
|
+
exports.ScanState = ScanState;
|
|
1137
|
+
exports.ScanType = ScanType;
|
|
1138
|
+
exports.Severity = Severity;
|
|
1139
|
+
exports.Status = Status;
|
|
1140
|
+
exports.TagResourceCommand = TagResourceCommand;
|
|
1141
|
+
exports.ThrottlingException = ThrottlingException;
|
|
1142
|
+
exports.UntagResourceCommand = UntagResourceCommand;
|
|
1143
|
+
exports.UpdateAccountConfigurationCommand = UpdateAccountConfigurationCommand;
|
|
1144
|
+
exports.ValidationException = ValidationException;
|
|
1145
|
+
exports.ValidationExceptionReason = ValidationExceptionReason;
|
|
1146
|
+
exports.paginateGetFindings = paginateGetFindings;
|
|
1147
|
+
exports.paginateListFindingsMetrics = paginateListFindingsMetrics;
|
|
1148
|
+
exports.paginateListScans = paginateListScans;
|