@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,34 @@
1
+ import packageInfo from "../package.json";
2
+ import { Sha256 } from "@aws-crypto/sha256-browser";
3
+ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
4
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
+ import { invalidProvider } from "@aws-sdk/invalid-dependency";
6
+ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
7
+ import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/util-retry";
8
+ import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
9
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
10
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
11
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
12
+ export const getRuntimeConfig = (config) => {
13
+ const defaultsMode = resolveDefaultsModeConfig(config);
14
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
+ const clientSharedValues = getSharedRuntimeConfig(config);
16
+ return {
17
+ ...clientSharedValues,
18
+ ...config,
19
+ runtime: "browser",
20
+ defaultsMode,
21
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
22
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
23
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
24
+ defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
25
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
26
+ region: config?.region ?? invalidProvider("Region is missing"),
27
+ requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
28
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
29
+ sha256: config?.sha256 ?? Sha256,
30
+ streamCollector: config?.streamCollector ?? streamCollector,
31
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
32
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
33
+ };
34
+ };
@@ -0,0 +1,43 @@
1
+ import packageInfo from "../package.json";
2
+ import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
3
+ import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
4
+ import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
5
+ import { Hash } from "@aws-sdk/hash-node";
6
+ import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
7
+ import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
8
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
+ import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
10
+ import { DEFAULT_RETRY_MODE } from "@aws-sdk/util-retry";
11
+ import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
12
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
15
+ import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
16
+ export const getRuntimeConfig = (config) => {
17
+ emitWarningIfUnsupportedVersion(process.version);
18
+ const defaultsMode = resolveDefaultsModeConfig(config);
19
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
20
+ const clientSharedValues = getSharedRuntimeConfig(config);
21
+ return {
22
+ ...clientSharedValues,
23
+ ...config,
24
+ runtime: "node",
25
+ defaultsMode,
26
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
27
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
28
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
29
+ defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
30
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
31
+ region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
32
+ requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
33
+ retryMode: config?.retryMode ??
34
+ loadNodeConfig({
35
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
36
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
37
+ }),
38
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
39
+ streamCollector: config?.streamCollector ?? streamCollector,
40
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
41
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
42
+ };
43
+ };
@@ -0,0 +1,11 @@
1
+ import { Sha256 } from "@aws-crypto/sha256-js";
2
+ import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
3
+ export const getRuntimeConfig = (config) => {
4
+ const browserDefaults = getBrowserRuntimeConfig(config);
5
+ return {
6
+ ...browserDefaults,
7
+ ...config,
8
+ runtime: "react-native",
9
+ sha256: config?.sha256 ?? Sha256,
10
+ };
11
+ };
@@ -0,0 +1,17 @@
1
+ import { NoOpLogger } from "@aws-sdk/smithy-client";
2
+ import { parseUrl } from "@aws-sdk/url-parser";
3
+ import { fromBase64, toBase64 } from "@aws-sdk/util-base64";
4
+ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8";
5
+ import { defaultEndpointResolver } from "./endpoint/endpointResolver";
6
+ export const getRuntimeConfig = (config) => ({
7
+ apiVersion: "2018-05-10",
8
+ base64Decoder: config?.base64Decoder ?? fromBase64,
9
+ base64Encoder: config?.base64Encoder ?? toBase64,
10
+ disableHostPrefix: config?.disableHostPrefix ?? false,
11
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
12
+ logger: config?.logger ?? new NoOpLogger(),
13
+ serviceId: config?.serviceId ?? "CodeGuru Security",
14
+ urlParser: config?.urlParser ?? parseUrl,
15
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
16
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
17
+ });
@@ -0,0 +1,108 @@
1
+ import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
+ import { CodeGuruSecurityClient } from "./CodeGuruSecurityClient";
3
+ import { BatchGetFindingsCommandInput, BatchGetFindingsCommandOutput } from "./commands/BatchGetFindingsCommand";
4
+ import { CreateScanCommandInput, CreateScanCommandOutput } from "./commands/CreateScanCommand";
5
+ import { CreateUploadUrlCommandInput, CreateUploadUrlCommandOutput } from "./commands/CreateUploadUrlCommand";
6
+ import { GetAccountConfigurationCommandInput, GetAccountConfigurationCommandOutput } from "./commands/GetAccountConfigurationCommand";
7
+ import { GetFindingsCommandInput, GetFindingsCommandOutput } from "./commands/GetFindingsCommand";
8
+ import { GetMetricsSummaryCommandInput, GetMetricsSummaryCommandOutput } from "./commands/GetMetricsSummaryCommand";
9
+ import { GetScanCommandInput, GetScanCommandOutput } from "./commands/GetScanCommand";
10
+ import { ListFindingsMetricsCommandInput, ListFindingsMetricsCommandOutput } from "./commands/ListFindingsMetricsCommand";
11
+ import { ListScansCommandInput, ListScansCommandOutput } from "./commands/ListScansCommand";
12
+ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
13
+ import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
14
+ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
15
+ import { UpdateAccountConfigurationCommandInput, UpdateAccountConfigurationCommandOutput } from "./commands/UpdateAccountConfigurationCommand";
16
+ export interface CodeGuruSecurity {
17
+ /**
18
+ * @see {@link BatchGetFindingsCommand}
19
+ */
20
+ batchGetFindings(args: BatchGetFindingsCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetFindingsCommandOutput>;
21
+ batchGetFindings(args: BatchGetFindingsCommandInput, cb: (err: any, data?: BatchGetFindingsCommandOutput) => void): void;
22
+ batchGetFindings(args: BatchGetFindingsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetFindingsCommandOutput) => void): void;
23
+ /**
24
+ * @see {@link CreateScanCommand}
25
+ */
26
+ createScan(args: CreateScanCommandInput, options?: __HttpHandlerOptions): Promise<CreateScanCommandOutput>;
27
+ createScan(args: CreateScanCommandInput, cb: (err: any, data?: CreateScanCommandOutput) => void): void;
28
+ createScan(args: CreateScanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateScanCommandOutput) => void): void;
29
+ /**
30
+ * @see {@link CreateUploadUrlCommand}
31
+ */
32
+ createUploadUrl(args: CreateUploadUrlCommandInput, options?: __HttpHandlerOptions): Promise<CreateUploadUrlCommandOutput>;
33
+ createUploadUrl(args: CreateUploadUrlCommandInput, cb: (err: any, data?: CreateUploadUrlCommandOutput) => void): void;
34
+ createUploadUrl(args: CreateUploadUrlCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateUploadUrlCommandOutput) => void): void;
35
+ /**
36
+ * @see {@link GetAccountConfigurationCommand}
37
+ */
38
+ getAccountConfiguration(args: GetAccountConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<GetAccountConfigurationCommandOutput>;
39
+ getAccountConfiguration(args: GetAccountConfigurationCommandInput, cb: (err: any, data?: GetAccountConfigurationCommandOutput) => void): void;
40
+ getAccountConfiguration(args: GetAccountConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAccountConfigurationCommandOutput) => void): void;
41
+ /**
42
+ * @see {@link GetFindingsCommand}
43
+ */
44
+ getFindings(args: GetFindingsCommandInput, options?: __HttpHandlerOptions): Promise<GetFindingsCommandOutput>;
45
+ getFindings(args: GetFindingsCommandInput, cb: (err: any, data?: GetFindingsCommandOutput) => void): void;
46
+ getFindings(args: GetFindingsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetFindingsCommandOutput) => void): void;
47
+ /**
48
+ * @see {@link GetMetricsSummaryCommand}
49
+ */
50
+ getMetricsSummary(args: GetMetricsSummaryCommandInput, options?: __HttpHandlerOptions): Promise<GetMetricsSummaryCommandOutput>;
51
+ getMetricsSummary(args: GetMetricsSummaryCommandInput, cb: (err: any, data?: GetMetricsSummaryCommandOutput) => void): void;
52
+ getMetricsSummary(args: GetMetricsSummaryCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetMetricsSummaryCommandOutput) => void): void;
53
+ /**
54
+ * @see {@link GetScanCommand}
55
+ */
56
+ getScan(args: GetScanCommandInput, options?: __HttpHandlerOptions): Promise<GetScanCommandOutput>;
57
+ getScan(args: GetScanCommandInput, cb: (err: any, data?: GetScanCommandOutput) => void): void;
58
+ getScan(args: GetScanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetScanCommandOutput) => void): void;
59
+ /**
60
+ * @see {@link ListFindingsMetricsCommand}
61
+ */
62
+ listFindingsMetrics(args: ListFindingsMetricsCommandInput, options?: __HttpHandlerOptions): Promise<ListFindingsMetricsCommandOutput>;
63
+ listFindingsMetrics(args: ListFindingsMetricsCommandInput, cb: (err: any, data?: ListFindingsMetricsCommandOutput) => void): void;
64
+ listFindingsMetrics(args: ListFindingsMetricsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListFindingsMetricsCommandOutput) => void): void;
65
+ /**
66
+ * @see {@link ListScansCommand}
67
+ */
68
+ listScans(args: ListScansCommandInput, options?: __HttpHandlerOptions): Promise<ListScansCommandOutput>;
69
+ listScans(args: ListScansCommandInput, cb: (err: any, data?: ListScansCommandOutput) => void): void;
70
+ listScans(args: ListScansCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListScansCommandOutput) => void): void;
71
+ /**
72
+ * @see {@link ListTagsForResourceCommand}
73
+ */
74
+ listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
75
+ listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
76
+ listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
77
+ /**
78
+ * @see {@link TagResourceCommand}
79
+ */
80
+ tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
81
+ tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
82
+ tagResource(args: TagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
83
+ /**
84
+ * @see {@link UntagResourceCommand}
85
+ */
86
+ untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
87
+ untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
88
+ untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
89
+ /**
90
+ * @see {@link UpdateAccountConfigurationCommand}
91
+ */
92
+ updateAccountConfiguration(args: UpdateAccountConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<UpdateAccountConfigurationCommandOutput>;
93
+ updateAccountConfiguration(args: UpdateAccountConfigurationCommandInput, cb: (err: any, data?: UpdateAccountConfigurationCommandOutput) => void): void;
94
+ updateAccountConfiguration(args: UpdateAccountConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateAccountConfigurationCommandOutput) => void): void;
95
+ }
96
+ /**
97
+ * @public
98
+ * <p>This section provides documentation for the <a href="https://docs.aws.amazon.com/https:/docs.aws.amazon.com/codeguru/latest/security-ug/what-is-codeguru-security.html">Amazon CodeGuru Security</a> API operations.
99
+ * CodeGuru Security is a service that uses program analysis and machine learning to detect
100
+ * security policy violations and vulnerabilities, and recommends ways to address these security
101
+ * risks.</p>
102
+ * <p>By proactively detecting and providing recommendations for addressing security risks,
103
+ * CodeGuru Security improves the overall security of your application code. For more information
104
+ * about CodeGuru Security, see the
105
+ * <a href="https://docs.aws.amazon.com/codeguru/latest/security-ug/what-is-codeguru-security.html">Amazon CodeGuru Security User Guide</a>. </p>
106
+ */
107
+ export declare class CodeGuruSecurity extends CodeGuruSecurityClient implements CodeGuruSecurity {
108
+ }
@@ -0,0 +1,182 @@
1
+ import { RegionInputConfig, RegionResolvedConfig } from "@aws-sdk/config-resolver";
2
+ import { EndpointInputConfig, EndpointResolvedConfig } from "@aws-sdk/middleware-endpoint";
3
+ import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
4
+ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry";
5
+ import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
6
+ import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
7
+ import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
+ import { BodyLengthCalculator as __BodyLengthCalculator, ChecksumConstructor as __ChecksumConstructor, Credentials as __Credentials, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
+ import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
10
+ import { Decoder as __Decoder, Encoder as __Encoder, Provider as __Provider, StreamCollector as __StreamCollector } from "@smithy/types";
11
+ import { BatchGetFindingsCommandInput, BatchGetFindingsCommandOutput } from "./commands/BatchGetFindingsCommand";
12
+ import { CreateScanCommandInput, CreateScanCommandOutput } from "./commands/CreateScanCommand";
13
+ import { CreateUploadUrlCommandInput, CreateUploadUrlCommandOutput } from "./commands/CreateUploadUrlCommand";
14
+ import { GetAccountConfigurationCommandInput, GetAccountConfigurationCommandOutput } from "./commands/GetAccountConfigurationCommand";
15
+ import { GetFindingsCommandInput, GetFindingsCommandOutput } from "./commands/GetFindingsCommand";
16
+ import { GetMetricsSummaryCommandInput, GetMetricsSummaryCommandOutput } from "./commands/GetMetricsSummaryCommand";
17
+ import { GetScanCommandInput, GetScanCommandOutput } from "./commands/GetScanCommand";
18
+ import { ListFindingsMetricsCommandInput, ListFindingsMetricsCommandOutput } from "./commands/ListFindingsMetricsCommand";
19
+ import { ListScansCommandInput, ListScansCommandOutput } from "./commands/ListScansCommand";
20
+ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
21
+ import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
22
+ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
23
+ import { UpdateAccountConfigurationCommandInput, UpdateAccountConfigurationCommandOutput } from "./commands/UpdateAccountConfigurationCommand";
24
+ import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
25
+ export { __Client };
26
+ /**
27
+ * @public
28
+ */
29
+ export type ServiceInputTypes = BatchGetFindingsCommandInput | CreateScanCommandInput | CreateUploadUrlCommandInput | GetAccountConfigurationCommandInput | GetFindingsCommandInput | GetMetricsSummaryCommandInput | GetScanCommandInput | ListFindingsMetricsCommandInput | ListScansCommandInput | ListTagsForResourceCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAccountConfigurationCommandInput;
30
+ /**
31
+ * @public
32
+ */
33
+ export type ServiceOutputTypes = BatchGetFindingsCommandOutput | CreateScanCommandOutput | CreateUploadUrlCommandOutput | GetAccountConfigurationCommandOutput | GetFindingsCommandOutput | GetMetricsSummaryCommandOutput | GetScanCommandOutput | ListFindingsMetricsCommandOutput | ListScansCommandOutput | ListTagsForResourceCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAccountConfigurationCommandOutput;
34
+ /**
35
+ * @public
36
+ */
37
+ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
38
+ /**
39
+ * The HTTP handler to use. Fetch in browser and Https in Nodejs.
40
+ */
41
+ requestHandler?: __HttpHandler;
42
+ /**
43
+ * A constructor for a class implementing the {@link @aws-sdk/types#ChecksumConstructor} interface
44
+ * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
45
+ * @internal
46
+ */
47
+ sha256?: __ChecksumConstructor | __HashConstructor;
48
+ /**
49
+ * The function that will be used to convert strings into HTTP endpoints.
50
+ * @internal
51
+ */
52
+ urlParser?: __UrlParser;
53
+ /**
54
+ * A function that can calculate the length of a request body.
55
+ * @internal
56
+ */
57
+ bodyLengthChecker?: __BodyLengthCalculator;
58
+ /**
59
+ * A function that converts a stream into an array of bytes.
60
+ * @internal
61
+ */
62
+ streamCollector?: __StreamCollector;
63
+ /**
64
+ * The function that will be used to convert a base64-encoded string to a byte array.
65
+ * @internal
66
+ */
67
+ base64Decoder?: __Decoder;
68
+ /**
69
+ * The function that will be used to convert binary data to a base64-encoded string.
70
+ * @internal
71
+ */
72
+ base64Encoder?: __Encoder;
73
+ /**
74
+ * The function that will be used to convert a UTF8-encoded string to a byte array.
75
+ * @internal
76
+ */
77
+ utf8Decoder?: __Decoder;
78
+ /**
79
+ * The function that will be used to convert binary data to a UTF-8 encoded string.
80
+ * @internal
81
+ */
82
+ utf8Encoder?: __Encoder;
83
+ /**
84
+ * The runtime environment.
85
+ * @internal
86
+ */
87
+ runtime?: string;
88
+ /**
89
+ * Disable dyanamically changing the endpoint of the client based on the hostPrefix
90
+ * trait of an operation.
91
+ */
92
+ disableHostPrefix?: boolean;
93
+ /**
94
+ * Unique service identifier.
95
+ * @internal
96
+ */
97
+ serviceId?: string;
98
+ /**
99
+ * Enables IPv6/IPv4 dualstack endpoint.
100
+ */
101
+ useDualstackEndpoint?: boolean | __Provider<boolean>;
102
+ /**
103
+ * Enables FIPS compatible endpoints.
104
+ */
105
+ useFipsEndpoint?: boolean | __Provider<boolean>;
106
+ /**
107
+ * The AWS region to which this client will send requests
108
+ */
109
+ region?: string | __Provider<string>;
110
+ /**
111
+ * Default credentials provider; Not available in browser runtime.
112
+ * @internal
113
+ */
114
+ credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
115
+ /**
116
+ * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
117
+ * @internal
118
+ */
119
+ defaultUserAgentProvider?: Provider<__UserAgent>;
120
+ /**
121
+ * Value for how many times a request will be made at most in case of retry.
122
+ */
123
+ maxAttempts?: number | __Provider<number>;
124
+ /**
125
+ * Specifies which retry algorithm to use.
126
+ */
127
+ retryMode?: string | __Provider<string>;
128
+ /**
129
+ * Optional logger for logging debug/info/warn/error.
130
+ */
131
+ logger?: __Logger;
132
+ /**
133
+ * The {@link @aws-sdk/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
134
+ */
135
+ defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
136
+ }
137
+ /**
138
+ * @public
139
+ */
140
+ export type CodeGuruSecurityClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & ClientInputEndpointParameters;
141
+ /**
142
+ * @public
143
+ *
144
+ * The configuration interface of CodeGuruSecurityClient class constructor that set the region, credentials and other options.
145
+ */
146
+ export interface CodeGuruSecurityClientConfig extends CodeGuruSecurityClientConfigType {
147
+ }
148
+ /**
149
+ * @public
150
+ */
151
+ export type CodeGuruSecurityClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
152
+ /**
153
+ * @public
154
+ *
155
+ * The resolved configuration interface of CodeGuruSecurityClient class. This is resolved and normalized from the {@link CodeGuruSecurityClientConfig | constructor configuration interface}.
156
+ */
157
+ export interface CodeGuruSecurityClientResolvedConfig extends CodeGuruSecurityClientResolvedConfigType {
158
+ }
159
+ /**
160
+ * @public
161
+ * <p>This section provides documentation for the <a href="https://docs.aws.amazon.com/https:/docs.aws.amazon.com/codeguru/latest/security-ug/what-is-codeguru-security.html">Amazon CodeGuru Security</a> API operations.
162
+ * CodeGuru Security is a service that uses program analysis and machine learning to detect
163
+ * security policy violations and vulnerabilities, and recommends ways to address these security
164
+ * risks.</p>
165
+ * <p>By proactively detecting and providing recommendations for addressing security risks,
166
+ * CodeGuru Security improves the overall security of your application code. For more information
167
+ * about CodeGuru Security, see the
168
+ * <a href="https://docs.aws.amazon.com/codeguru/latest/security-ug/what-is-codeguru-security.html">Amazon CodeGuru Security User Guide</a>. </p>
169
+ */
170
+ export declare class CodeGuruSecurityClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, CodeGuruSecurityClientResolvedConfig> {
171
+ /**
172
+ * The resolved configuration of CodeGuruSecurityClient class. This is resolved and normalized from the {@link CodeGuruSecurityClientConfig | constructor configuration interface}.
173
+ */
174
+ readonly config: CodeGuruSecurityClientResolvedConfig;
175
+ constructor(configuration: CodeGuruSecurityClientConfig);
176
+ /**
177
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
178
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
179
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
180
+ */
181
+ destroy(): void;
182
+ }
@@ -0,0 +1,154 @@
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { CodeGuruSecurityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodeGuruSecurityClient";
5
+ import { BatchGetFindingsRequest, BatchGetFindingsResponse } from "../models/models_0";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link BatchGetFindingsCommand}.
14
+ */
15
+ export interface BatchGetFindingsCommandInput extends BatchGetFindingsRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link BatchGetFindingsCommand}.
21
+ */
22
+ export interface BatchGetFindingsCommandOutput extends BatchGetFindingsResponse, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Returns a list of all requested findings.</p>
27
+ * @example
28
+ * Use a bare-bones client and the command you need to make an API call.
29
+ * ```javascript
30
+ * import { CodeGuruSecurityClient, BatchGetFindingsCommand } from "@aws-sdk/client-codeguru-security"; // ES Modules import
31
+ * // const { CodeGuruSecurityClient, BatchGetFindingsCommand } = require("@aws-sdk/client-codeguru-security"); // CommonJS import
32
+ * const client = new CodeGuruSecurityClient(config);
33
+ * const input = { // BatchGetFindingsRequest
34
+ * findingIdentifiers: [ // FindingIdentifiers // required
35
+ * { // FindingIdentifier
36
+ * scanName: "STRING_VALUE", // required
37
+ * findingId: "STRING_VALUE", // required
38
+ * },
39
+ * ],
40
+ * };
41
+ * const command = new BatchGetFindingsCommand(input);
42
+ * const response = await client.send(command);
43
+ * // { // BatchGetFindingsResponse
44
+ * // findings: [ // Findings // required
45
+ * // { // Finding
46
+ * // createdAt: new Date("TIMESTAMP"),
47
+ * // description: "STRING_VALUE",
48
+ * // generatorId: "STRING_VALUE",
49
+ * // id: "STRING_VALUE",
50
+ * // updatedAt: new Date("TIMESTAMP"),
51
+ * // type: "STRING_VALUE",
52
+ * // status: "Closed" || "Open" || "All",
53
+ * // resource: { // Resource
54
+ * // id: "STRING_VALUE",
55
+ * // subResourceId: "STRING_VALUE",
56
+ * // },
57
+ * // vulnerability: { // Vulnerability
58
+ * // referenceUrls: [ // ReferenceUrls
59
+ * // "STRING_VALUE",
60
+ * // ],
61
+ * // relatedVulnerabilities: [ // RelatedVulnerabilities
62
+ * // "STRING_VALUE",
63
+ * // ],
64
+ * // id: "STRING_VALUE",
65
+ * // filePath: { // FilePath
66
+ * // name: "STRING_VALUE",
67
+ * // path: "STRING_VALUE",
68
+ * // startLine: Number("int"),
69
+ * // endLine: Number("int"),
70
+ * // codeSnippet: [ // CodeSnippet
71
+ * // { // CodeLine
72
+ * // number: Number("int"),
73
+ * // content: "STRING_VALUE",
74
+ * // },
75
+ * // ],
76
+ * // },
77
+ * // itemCount: Number("int"),
78
+ * // },
79
+ * // severity: "Critical" || "High" || "Medium" || "Low" || "Info",
80
+ * // remediation: { // Remediation
81
+ * // recommendation: { // Recommendation
82
+ * // text: "STRING_VALUE",
83
+ * // url: "STRING_VALUE",
84
+ * // },
85
+ * // suggestedFixes: [ // SuggestedFixes
86
+ * // { // SuggestedFix
87
+ * // description: "STRING_VALUE",
88
+ * // code: "STRING_VALUE",
89
+ * // },
90
+ * // ],
91
+ * // },
92
+ * // title: "STRING_VALUE",
93
+ * // detectorTags: [ // DetectorTags
94
+ * // "STRING_VALUE",
95
+ * // ],
96
+ * // detectorId: "STRING_VALUE",
97
+ * // detectorName: "STRING_VALUE",
98
+ * // ruleId: "STRING_VALUE",
99
+ * // },
100
+ * // ],
101
+ * // failedFindings: [ // BatchGetFindingsErrors // required
102
+ * // { // BatchGetFindingsError
103
+ * // scanName: "STRING_VALUE", // required
104
+ * // findingId: "STRING_VALUE", // required
105
+ * // errorCode: "DUPLICATE_IDENTIFIER" || "ITEM_DOES_NOT_EXIST" || "INTERNAL_ERROR" || "INVALID_FINDING_ID" || "INVALID_SCAN_NAME", // required
106
+ * // message: "STRING_VALUE", // required
107
+ * // },
108
+ * // ],
109
+ * // };
110
+ *
111
+ * ```
112
+ *
113
+ * @param BatchGetFindingsCommandInput - {@link BatchGetFindingsCommandInput}
114
+ * @returns {@link BatchGetFindingsCommandOutput}
115
+ * @see {@link BatchGetFindingsCommandInput} for command's `input` shape.
116
+ * @see {@link BatchGetFindingsCommandOutput} for command's `response` shape.
117
+ * @see {@link CodeGuruSecurityClientResolvedConfig | config} for CodeGuruSecurityClient's `config` shape.
118
+ *
119
+ * @throws {@link AccessDeniedException} (client fault)
120
+ * <p>You do not have sufficient access to perform this action.</p>
121
+ *
122
+ * @throws {@link InternalServerException} (server fault)
123
+ * <p>The server encountered an internal error and is unable to complete the request.</p>
124
+ *
125
+ * @throws {@link ThrottlingException} (client fault)
126
+ * <p>The request was denied due to request throttling.</p>
127
+ *
128
+ * @throws {@link ValidationException} (client fault)
129
+ * <p>The input fails to satisfy the specified constraints.</p>
130
+ *
131
+ * @throws {@link CodeGuruSecurityServiceException}
132
+ * <p>Base exception class for all service exceptions from CodeGuruSecurity service.</p>
133
+ *
134
+ */
135
+ export declare class BatchGetFindingsCommand extends $Command<BatchGetFindingsCommandInput, BatchGetFindingsCommandOutput, CodeGuruSecurityClientResolvedConfig> {
136
+ readonly input: BatchGetFindingsCommandInput;
137
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
138
+ /**
139
+ * @public
140
+ */
141
+ constructor(input: BatchGetFindingsCommandInput);
142
+ /**
143
+ * @internal
144
+ */
145
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CodeGuruSecurityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<BatchGetFindingsCommandInput, BatchGetFindingsCommandOutput>;
146
+ /**
147
+ * @internal
148
+ */
149
+ private serialize;
150
+ /**
151
+ * @internal
152
+ */
153
+ private deserialize;
154
+ }