@aws-sdk/client-codeguru-security 3.352.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +316 -0
  3. package/dist-cjs/CodeGuruSecurity.js +37 -0
  4. package/dist-cjs/CodeGuruSecurityClient.js +41 -0
  5. package/dist-cjs/commands/BatchGetFindingsCommand.js +46 -0
  6. package/dist-cjs/commands/CreateScanCommand.js +46 -0
  7. package/dist-cjs/commands/CreateUploadUrlCommand.js +47 -0
  8. package/dist-cjs/commands/GetAccountConfigurationCommand.js +46 -0
  9. package/dist-cjs/commands/GetFindingsCommand.js +46 -0
  10. package/dist-cjs/commands/GetMetricsSummaryCommand.js +46 -0
  11. package/dist-cjs/commands/GetScanCommand.js +46 -0
  12. package/dist-cjs/commands/ListFindingsMetricsCommand.js +46 -0
  13. package/dist-cjs/commands/ListScansCommand.js +46 -0
  14. package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
  15. package/dist-cjs/commands/TagResourceCommand.js +46 -0
  16. package/dist-cjs/commands/UntagResourceCommand.js +46 -0
  17. package/dist-cjs/commands/UpdateAccountConfigurationCommand.js +46 -0
  18. package/dist-cjs/commands/index.js +16 -0
  19. package/dist-cjs/endpoint/EndpointParameters.js +12 -0
  20. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  21. package/dist-cjs/endpoint/ruleset.js +7 -0
  22. package/dist-cjs/index.js +11 -0
  23. package/dist-cjs/models/CodeGuruSecurityServiceException.js +12 -0
  24. package/dist-cjs/models/index.js +4 -0
  25. package/dist-cjs/models/models_0.js +156 -0
  26. package/dist-cjs/pagination/GetFindingsPaginator.js +29 -0
  27. package/dist-cjs/pagination/Interfaces.js +2 -0
  28. package/dist-cjs/pagination/ListFindingsMetricsPaginator.js +29 -0
  29. package/dist-cjs/pagination/ListScansPaginator.js +29 -0
  30. package/dist-cjs/pagination/index.js +7 -0
  31. package/dist-cjs/protocols/Aws_restJson1.js +1131 -0
  32. package/dist-cjs/runtimeConfig.browser.js +39 -0
  33. package/dist-cjs/runtimeConfig.js +48 -0
  34. package/dist-cjs/runtimeConfig.native.js +15 -0
  35. package/dist-cjs/runtimeConfig.shared.js +21 -0
  36. package/dist-es/CodeGuruSecurity.js +33 -0
  37. package/dist-es/CodeGuruSecurityClient.js +37 -0
  38. package/dist-es/commands/BatchGetFindingsCommand.js +42 -0
  39. package/dist-es/commands/CreateScanCommand.js +42 -0
  40. package/dist-es/commands/CreateUploadUrlCommand.js +43 -0
  41. package/dist-es/commands/GetAccountConfigurationCommand.js +42 -0
  42. package/dist-es/commands/GetFindingsCommand.js +42 -0
  43. package/dist-es/commands/GetMetricsSummaryCommand.js +42 -0
  44. package/dist-es/commands/GetScanCommand.js +42 -0
  45. package/dist-es/commands/ListFindingsMetricsCommand.js +42 -0
  46. package/dist-es/commands/ListScansCommand.js +42 -0
  47. package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
  48. package/dist-es/commands/TagResourceCommand.js +42 -0
  49. package/dist-es/commands/UntagResourceCommand.js +42 -0
  50. package/dist-es/commands/UpdateAccountConfigurationCommand.js +42 -0
  51. package/dist-es/commands/index.js +13 -0
  52. package/dist-es/endpoint/EndpointParameters.js +8 -0
  53. package/dist-es/endpoint/endpointResolver.js +8 -0
  54. package/dist-es/endpoint/ruleset.js +4 -0
  55. package/dist-es/index.js +6 -0
  56. package/dist-es/models/CodeGuruSecurityServiceException.js +8 -0
  57. package/dist-es/models/index.js +1 -0
  58. package/dist-es/models/models_0.js +146 -0
  59. package/dist-es/pagination/GetFindingsPaginator.js +25 -0
  60. package/dist-es/pagination/Interfaces.js +1 -0
  61. package/dist-es/pagination/ListFindingsMetricsPaginator.js +25 -0
  62. package/dist-es/pagination/ListScansPaginator.js +25 -0
  63. package/dist-es/pagination/index.js +4 -0
  64. package/dist-es/protocols/Aws_restJson1.js +1102 -0
  65. package/dist-es/runtimeConfig.browser.js +34 -0
  66. package/dist-es/runtimeConfig.js +43 -0
  67. package/dist-es/runtimeConfig.native.js +11 -0
  68. package/dist-es/runtimeConfig.shared.js +17 -0
  69. package/dist-types/CodeGuruSecurity.d.ts +108 -0
  70. package/dist-types/CodeGuruSecurityClient.d.ts +182 -0
  71. package/dist-types/commands/BatchGetFindingsCommand.d.ts +154 -0
  72. package/dist-types/commands/CreateScanCommand.d.ts +108 -0
  73. package/dist-types/commands/CreateUploadUrlCommand.d.ts +91 -0
  74. package/dist-types/commands/GetAccountConfigurationCommand.d.ts +85 -0
  75. package/dist-types/commands/GetFindingsCommand.d.ts +153 -0
  76. package/dist-types/commands/GetMetricsSummaryCommand.d.ts +114 -0
  77. package/dist-types/commands/GetScanCommand.d.ts +93 -0
  78. package/dist-types/commands/ListFindingsMetricsCommand.d.ts +121 -0
  79. package/dist-types/commands/ListScansCommand.d.ts +96 -0
  80. package/dist-types/commands/ListTagsForResourceCommand.d.ts +95 -0
  81. package/dist-types/commands/TagResourceCommand.d.ts +94 -0
  82. package/dist-types/commands/UntagResourceCommand.d.ts +94 -0
  83. package/dist-types/commands/UpdateAccountConfigurationCommand.d.ts +92 -0
  84. package/dist-types/commands/index.d.ts +13 -0
  85. package/dist-types/endpoint/EndpointParameters.d.ts +20 -0
  86. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  87. package/dist-types/endpoint/ruleset.d.ts +2 -0
  88. package/dist-types/index.d.ts +18 -0
  89. package/dist-types/models/CodeGuruSecurityServiceException.d.ts +13 -0
  90. package/dist-types/models/index.d.ts +1 -0
  91. package/dist-types/models/models_0.d.ts +1114 -0
  92. package/dist-types/pagination/GetFindingsPaginator.d.ts +7 -0
  93. package/dist-types/pagination/Interfaces.d.ts +8 -0
  94. package/dist-types/pagination/ListFindingsMetricsPaginator.d.ts +7 -0
  95. package/dist-types/pagination/ListScansPaginator.d.ts +7 -0
  96. package/dist-types/pagination/index.d.ts +4 -0
  97. package/dist-types/protocols/Aws_restJson1.d.ts +119 -0
  98. package/dist-types/runtimeConfig.browser.d.ts +42 -0
  99. package/dist-types/runtimeConfig.d.ts +42 -0
  100. package/dist-types/runtimeConfig.native.d.ts +41 -0
  101. package/dist-types/runtimeConfig.shared.d.ts +18 -0
  102. package/dist-types/ts3.4/CodeGuruSecurity.d.ts +228 -0
  103. package/dist-types/ts3.4/CodeGuruSecurityClient.d.ts +193 -0
  104. package/dist-types/ts3.4/commands/BatchGetFindingsCommand.d.ts +38 -0
  105. package/dist-types/ts3.4/commands/CreateScanCommand.d.ts +35 -0
  106. package/dist-types/ts3.4/commands/CreateUploadUrlCommand.d.ts +38 -0
  107. package/dist-types/ts3.4/commands/GetAccountConfigurationCommand.d.ts +42 -0
  108. package/dist-types/ts3.4/commands/GetFindingsCommand.d.ts +35 -0
  109. package/dist-types/ts3.4/commands/GetMetricsSummaryCommand.d.ts +39 -0
  110. package/dist-types/ts3.4/commands/GetScanCommand.d.ts +35 -0
  111. package/dist-types/ts3.4/commands/ListFindingsMetricsCommand.d.ts +39 -0
  112. package/dist-types/ts3.4/commands/ListScansCommand.d.ts +35 -0
  113. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
  114. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
  115. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
  116. package/dist-types/ts3.4/commands/UpdateAccountConfigurationCommand.d.ts +42 -0
  117. package/dist-types/ts3.4/commands/index.d.ts +13 -0
  118. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +32 -0
  119. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  120. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  121. package/dist-types/ts3.4/index.d.ts +6 -0
  122. package/dist-types/ts3.4/models/CodeGuruSecurityServiceException.d.ts +8 -0
  123. package/dist-types/ts3.4/models/index.d.ts +1 -0
  124. package/dist-types/ts3.4/models/models_0.d.ts +340 -0
  125. package/dist-types/ts3.4/pagination/GetFindingsPaginator.d.ts +11 -0
  126. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  127. package/dist-types/ts3.4/pagination/ListFindingsMetricsPaginator.d.ts +11 -0
  128. package/dist-types/ts3.4/pagination/ListScansPaginator.d.ts +11 -0
  129. package/dist-types/ts3.4/pagination/index.d.ts +4 -0
  130. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +161 -0
  131. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +96 -0
  132. package/dist-types/ts3.4/runtimeConfig.d.ts +93 -0
  133. package/dist-types/ts3.4/runtimeConfig.native.d.ts +87 -0
  134. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +20 -0
  135. package/package.json +101 -0
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_restJson1";
5
+ export { $Command };
6
+ export class TagResourceCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, TagResourceCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "CodeGuruSecurityClient";
25
+ const commandName = "TagResourceCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (_) => _,
31
+ outputFilterSensitiveLog: (_) => _,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return se_TagResourceCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return de_TagResourceCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_restJson1";
5
+ export { $Command };
6
+ export class UntagResourceCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, UntagResourceCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "CodeGuruSecurityClient";
25
+ const commandName = "UntagResourceCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (_) => _,
31
+ outputFilterSensitiveLog: (_) => _,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return se_UntagResourceCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return de_UntagResourceCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { de_UpdateAccountConfigurationCommand, se_UpdateAccountConfigurationCommand } from "../protocols/Aws_restJson1";
5
+ export { $Command };
6
+ export class UpdateAccountConfigurationCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, UpdateAccountConfigurationCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "CodeGuruSecurityClient";
25
+ const commandName = "UpdateAccountConfigurationCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (_) => _,
31
+ outputFilterSensitiveLog: (_) => _,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return se_UpdateAccountConfigurationCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return de_UpdateAccountConfigurationCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,13 @@
1
+ export * from "./BatchGetFindingsCommand";
2
+ export * from "./CreateScanCommand";
3
+ export * from "./CreateUploadUrlCommand";
4
+ export * from "./GetAccountConfigurationCommand";
5
+ export * from "./GetFindingsCommand";
6
+ export * from "./GetMetricsSummaryCommand";
7
+ export * from "./GetScanCommand";
8
+ export * from "./ListFindingsMetricsCommand";
9
+ export * from "./ListScansCommand";
10
+ export * from "./ListTagsForResourceCommand";
11
+ export * from "./TagResourceCommand";
12
+ export * from "./UntagResourceCommand";
13
+ export * from "./UpdateAccountConfigurationCommand";
@@ -0,0 +1,8 @@
1
+ export const resolveClientEndpointParameters = (options) => {
2
+ return {
3
+ ...options,
4
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
5
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
6
+ defaultSigningName: "codeguru-security",
7
+ };
8
+ };
@@ -0,0 +1,8 @@
1
+ import { resolveEndpoint } from "@aws-sdk/util-endpoints";
2
+ import { ruleSet } from "./ruleset";
3
+ export const defaultEndpointResolver = (endpointParams, context = {}) => {
4
+ return resolveEndpoint(ruleSet, {
5
+ endpointParams: endpointParams,
6
+ logger: context.logger,
7
+ });
8
+ };
@@ -0,0 +1,4 @@
1
+ const q = "required", r = "fn", s = "argv", t = "ref";
2
+ const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
3
+ const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeguru-security-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeguru-security-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://codeguru-security.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://codeguru-security.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
4
+ export const ruleSet = _data;
@@ -0,0 +1,6 @@
1
+ export * from "./CodeGuruSecurityClient";
2
+ export * from "./CodeGuruSecurity";
3
+ export * from "./commands";
4
+ export * from "./pagination";
5
+ export * from "./models";
6
+ export { CodeGuruSecurityServiceException } from "./models/CodeGuruSecurityServiceException";
@@ -0,0 +1,8 @@
1
+ import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
2
+ export { __ServiceException };
3
+ export class CodeGuruSecurityServiceException extends __ServiceException {
4
+ constructor(options) {
5
+ super(options);
6
+ Object.setPrototypeOf(this, CodeGuruSecurityServiceException.prototype);
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export * from "./models_0";
@@ -0,0 +1,146 @@
1
+ import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
2
+ import { CodeGuruSecurityServiceException as __BaseException } from "./CodeGuruSecurityServiceException";
3
+ export class AccessDeniedException extends __BaseException {
4
+ constructor(opts) {
5
+ super({
6
+ name: "AccessDeniedException",
7
+ $fault: "client",
8
+ ...opts,
9
+ });
10
+ this.name = "AccessDeniedException";
11
+ this.$fault = "client";
12
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
13
+ this.errorCode = opts.errorCode;
14
+ this.resourceId = opts.resourceId;
15
+ this.resourceType = opts.resourceType;
16
+ }
17
+ }
18
+ export const AnalysisType = {
19
+ ALL: "All",
20
+ SECURITY: "Security",
21
+ };
22
+ export const ErrorCode = {
23
+ DUPLICATE_IDENTIFIER: "DUPLICATE_IDENTIFIER",
24
+ INTERNAL_ERROR: "INTERNAL_ERROR",
25
+ INVALID_FINDING_ID: "INVALID_FINDING_ID",
26
+ INVALID_SCAN_NAME: "INVALID_SCAN_NAME",
27
+ ITEM_DOES_NOT_EXIST: "ITEM_DOES_NOT_EXIST",
28
+ };
29
+ export const Severity = {
30
+ CRITICAL: "Critical",
31
+ HIGH: "High",
32
+ INFO: "Info",
33
+ LOW: "Low",
34
+ MEDIUM: "Medium",
35
+ };
36
+ export const Status = {
37
+ ALL: "All",
38
+ CLOSED: "Closed",
39
+ OPEN: "Open",
40
+ };
41
+ export class InternalServerException extends __BaseException {
42
+ constructor(opts) {
43
+ super({
44
+ name: "InternalServerException",
45
+ $fault: "server",
46
+ ...opts,
47
+ });
48
+ this.name = "InternalServerException";
49
+ this.$fault = "server";
50
+ this.$retryable = {};
51
+ Object.setPrototypeOf(this, InternalServerException.prototype);
52
+ this.error = opts.error;
53
+ }
54
+ }
55
+ export class ThrottlingException extends __BaseException {
56
+ constructor(opts) {
57
+ super({
58
+ name: "ThrottlingException",
59
+ $fault: "client",
60
+ ...opts,
61
+ });
62
+ this.name = "ThrottlingException";
63
+ this.$fault = "client";
64
+ this.$retryable = {
65
+ throttling: true,
66
+ };
67
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
68
+ this.errorCode = opts.errorCode;
69
+ this.serviceCode = opts.serviceCode;
70
+ this.quotaCode = opts.quotaCode;
71
+ }
72
+ }
73
+ export const ValidationExceptionReason = {
74
+ CANNOT_PARSE: "cannotParse",
75
+ FIELD_VALIDATION_FAILED: "fieldValidationFailed",
76
+ LAMBDA_CODE_SHA_MISMATCH: "lambdaCodeShaMisMatch",
77
+ OTHER: "other",
78
+ UNKNOWN_OPERATION: "unknownOperation",
79
+ };
80
+ export class ValidationException extends __BaseException {
81
+ constructor(opts) {
82
+ super({
83
+ name: "ValidationException",
84
+ $fault: "client",
85
+ ...opts,
86
+ });
87
+ this.name = "ValidationException";
88
+ this.$fault = "client";
89
+ Object.setPrototypeOf(this, ValidationException.prototype);
90
+ this.errorCode = opts.errorCode;
91
+ this.reason = opts.reason;
92
+ this.fieldList = opts.fieldList;
93
+ }
94
+ }
95
+ export class ConflictException extends __BaseException {
96
+ constructor(opts) {
97
+ super({
98
+ name: "ConflictException",
99
+ $fault: "client",
100
+ ...opts,
101
+ });
102
+ this.name = "ConflictException";
103
+ this.$fault = "client";
104
+ Object.setPrototypeOf(this, ConflictException.prototype);
105
+ this.errorCode = opts.errorCode;
106
+ this.resourceId = opts.resourceId;
107
+ this.resourceType = opts.resourceType;
108
+ }
109
+ }
110
+ export var ResourceId;
111
+ (function (ResourceId) {
112
+ ResourceId.visit = (value, visitor) => {
113
+ if (value.codeArtifactId !== undefined)
114
+ return visitor.codeArtifactId(value.codeArtifactId);
115
+ return visitor._(value.$unknown[0], value.$unknown[1]);
116
+ };
117
+ })(ResourceId || (ResourceId = {}));
118
+ export const ScanType = {
119
+ EXPRESS: "Express",
120
+ STANDARD: "Standard",
121
+ };
122
+ export const ScanState = {
123
+ FAILED: "Failed",
124
+ IN_PROGRESS: "InProgress",
125
+ SUCCESSFUL: "Successful",
126
+ };
127
+ export class ResourceNotFoundException extends __BaseException {
128
+ constructor(opts) {
129
+ super({
130
+ name: "ResourceNotFoundException",
131
+ $fault: "client",
132
+ ...opts,
133
+ });
134
+ this.name = "ResourceNotFoundException";
135
+ this.$fault = "client";
136
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
137
+ this.errorCode = opts.errorCode;
138
+ this.resourceId = opts.resourceId;
139
+ this.resourceType = opts.resourceType;
140
+ }
141
+ }
142
+ export const CreateUploadUrlResponseFilterSensitiveLog = (obj) => ({
143
+ ...obj,
144
+ ...(obj.s3Url && { s3Url: SENSITIVE_STRING }),
145
+ ...(obj.requestHeaders && { requestHeaders: SENSITIVE_STRING }),
146
+ });
@@ -0,0 +1,25 @@
1
+ import { CodeGuruSecurityClient } from "../CodeGuruSecurityClient";
2
+ import { GetFindingsCommand } from "../commands/GetFindingsCommand";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new GetFindingsCommand(input), ...args);
5
+ };
6
+ export async function* paginateGetFindings(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ input["maxResults"] = config.pageSize;
13
+ if (config.client instanceof CodeGuruSecurityClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected CodeGuruSecurity | CodeGuruSecurityClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.nextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import { CodeGuruSecurityClient } from "../CodeGuruSecurityClient";
2
+ import { ListFindingsMetricsCommand, } from "../commands/ListFindingsMetricsCommand";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new ListFindingsMetricsCommand(input), ...args);
5
+ };
6
+ export async function* paginateListFindingsMetrics(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ input["maxResults"] = config.pageSize;
13
+ if (config.client instanceof CodeGuruSecurityClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected CodeGuruSecurity | CodeGuruSecurityClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.nextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -0,0 +1,25 @@
1
+ import { CodeGuruSecurityClient } from "../CodeGuruSecurityClient";
2
+ import { ListScansCommand } from "../commands/ListScansCommand";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new ListScansCommand(input), ...args);
5
+ };
6
+ export async function* paginateListScans(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ input["maxResults"] = config.pageSize;
13
+ if (config.client instanceof CodeGuruSecurityClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected CodeGuruSecurity | CodeGuruSecurityClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.nextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./GetFindingsPaginator";
2
+ export * from "./Interfaces";
3
+ export * from "./ListFindingsMetricsPaginator";
4
+ export * from "./ListScansPaginator";