1import type * as aoss from "@distilled.cloud/aws/opensearchserverless";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for the `BatchGetEffectiveLifecyclePolicy` operation (IAM
7 * action `aoss:BatchGetEffectiveLifecyclePolicy`; the action does not support
8 * resource-level scoping, so the grant is on `*`).
9 *
10 * Resolves which retention {@link LifecyclePolicy} is in effect for specific
11 * indexes (identified as `index/{collection}/{index}`). Indexes with no
12 * effective policy are reported in `effectiveLifecyclePolicyErrorDetails`.
13 * Provide the implementation with
14 * `Effect.provide(AWS.OpenSearchServerless.BatchGetEffectiveLifecyclePolicyHttp)`.
15 * ### Account Settings
16 * **Example:** Resolve an index's effective retention
17 * ```typescript
18 * const batchGetEffectiveLifecyclePolicy =
19 * yield* AWS.OpenSearchServerless.BatchGetEffectiveLifecyclePolicy();
20 *
21 * const response = yield* batchGetEffectiveLifecyclePolicy({
22 * resourceIdentifiers: [
23 * { type: "retention", resource: "index/logs/app-logs" },
24 * ],
25 * });
26 * const effective = response.effectiveLifecyclePolicyDetails?.[0];
27 * yield* Effect.log(`retention: ${effective?.retentionPeriod}`);
28 * ```
29 *
30 * @binding
31 */
32export interface BatchGetEffectiveLifecyclePolicy extends Binding.Service<
33 BatchGetEffectiveLifecyclePolicy,
34 "AWS.OpenSearchServerless.BatchGetEffectiveLifecyclePolicy",
35 () => Effect.Effect<
36 (
37 request: aoss.BatchGetEffectiveLifecyclePolicyRequest,
38 ) => Effect.Effect<
39 aoss.BatchGetEffectiveLifecyclePolicyResponse,
40 aoss.BatchGetEffectiveLifecyclePolicyError
41 >
42 >
43> {}
44export const BatchGetEffectiveLifecyclePolicy =
45 Binding.Service<BatchGetEffectiveLifecyclePolicy>(
46 "AWS.OpenSearchServerless.BatchGetEffectiveLifecyclePolicy",
47 );