| 1 | import type * as inspector2 from "@distilled.cloud/aws/inspector2"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `inspector2:BatchGetCodeSnippet`. |
| 7 | * |
| 8 | * Retrieves code snippets from findings that Amazon Inspector detected code vulnerabilities |
| 9 | * in. |
| 10 | * |
| 11 | * Provide the implementation with |
| 12 | * `Effect.provide(AWS.Inspector2.BatchGetCodeSnippetHttp)`. |
| 13 | * ### Querying Findings |
| 14 | * **Example:** Get Code Snippets for Code Findings |
| 15 | * ```typescript |
| 16 | * // init |
| 17 | * const batchGetCodeSnippet = yield* AWS.Inspector2.BatchGetCodeSnippet(); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { codeSnippetResults } = yield* batchGetCodeSnippet({ findingArns: [findingArn] }); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface BatchGetCodeSnippet extends Binding.Service< |
| 26 | BatchGetCodeSnippet, |
| 27 | "AWS.Inspector2.BatchGetCodeSnippet", |
| 28 | () => Effect.Effect< |
| 29 | ( |
| 30 | request: inspector2.BatchGetCodeSnippetRequest, |
| 31 | ) => Effect.Effect< |
| 32 | inspector2.BatchGetCodeSnippetResponse, |
| 33 | inspector2.BatchGetCodeSnippetError |
| 34 | > |
| 35 | > |
| 36 | > {} |
| 37 | export const BatchGetCodeSnippet = Binding.Service<BatchGetCodeSnippet>( |
| 38 | "AWS.Inspector2.BatchGetCodeSnippet", |
| 39 | ); |