1import type * as aa from "@distilled.cloud/aws/accessanalyzer";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Analyzer } from "./Analyzer.ts";
5
6/** `ApplyArchiveRule` request with `analyzerArn` injected from the bound {@link Analyzer}. */
7export interface ApplyArchiveRuleRequest extends Omit<
8 aa.ApplyArchiveRuleRequest,
9 "analyzerArn"
10> {}
11
12/**
13 * Runtime binding for `access-analyzer:ApplyArchiveRule`.
14 *
15 * Retroactively applies an archive rule to the analyzer's existing findings.
16 * Provide the implementation with
17 * `Effect.provide(AWS.AccessAnalyzer.ApplyArchiveRuleHttp)`.
18 * ### Managing Findings
19 * **Example:** Apply an Archive Rule to Existing Findings
20 * ```typescript
21 * const applyRule = yield* AWS.AccessAnalyzer.ApplyArchiveRule(analyzer);
22 * yield* applyRule({ ruleName: rule.ruleName });
23 * ```
24 *
25 * @binding
26 */
27export interface ApplyArchiveRule extends Binding.Service<
28 ApplyArchiveRule,
29 "AWS.AccessAnalyzer.ApplyArchiveRule",
30 (
31 analyzer: Analyzer,
32 ) => Effect.Effect<
33 (
34 request: ApplyArchiveRuleRequest,
35 ) => Effect.Effect<aa.ApplyArchiveRuleResponse, aa.ApplyArchiveRuleError>
36 >
37> {}
38
39export const ApplyArchiveRule = Binding.Service<ApplyArchiveRule>(
40 "AWS.AccessAnalyzer.ApplyArchiveRule",
41);