| 1 | import type * as aa from "@distilled.cloud/aws/accessanalyzer"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Analyzer } from "./Analyzer.ts"; |
| 5 | |
| 6 | /** `StartResourceScan` request with `analyzerArn` injected from the bound {@link Analyzer}. */ |
| 7 | export interface StartResourceScanRequest extends Omit< |
| 8 | aa.StartResourceScanRequest, |
| 9 | "analyzerArn" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for `access-analyzer:StartResourceScan`. |
| 14 | * |
| 15 | * Immediately rescans a resource's policy instead of waiting for the |
| 16 | * analyzer's periodic scan. Provide the implementation with |
| 17 | * `Effect.provide(AWS.AccessAnalyzer.StartResourceScanHttp)`. |
| 18 | * ### Scanning Resources |
| 19 | * **Example:** Rescan a Bucket After a Policy Change |
| 20 | * ```typescript |
| 21 | * const startScan = yield* AWS.AccessAnalyzer.StartResourceScan(analyzer); |
| 22 | * yield* startScan({ resourceArn: bucket.bucketArn }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface StartResourceScan extends Binding.Service< |
| 28 | StartResourceScan, |
| 29 | "AWS.AccessAnalyzer.StartResourceScan", |
| 30 | ( |
| 31 | analyzer: Analyzer, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request: StartResourceScanRequest, |
| 35 | ) => Effect.Effect<aa.StartResourceScanResponse, aa.StartResourceScanError> |
| 36 | > |
| 37 | > {} |
| 38 | |
| 39 | export const StartResourceScan = Binding.Service<StartResourceScan>( |
| 40 | "AWS.AccessAnalyzer.StartResourceScan", |
| 41 | ); |