| 1 | import type * as efs from "@distilled.cloud/aws/efs"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { FileSystem } from "./FileSystem.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for the `DescribeLifecycleConfiguration` operation (IAM |
| 8 | * action `elasticfilesystem:DescribeLifecycleConfiguration` on the file |
| 9 | * system ARN). |
| 10 | * |
| 11 | * Reads the bound {@link FileSystem}'s lifecycle management rules — when |
| 12 | * files transition between Standard, Infrequent Access, and Archive storage. |
| 13 | * A file system without lifecycle management returns an empty array. |
| 14 | * Provide the implementation with |
| 15 | * `Effect.provide(AWS.EFS.DescribeLifecycleConfigurationHttp)`. |
| 16 | * ### Lifecycle Management |
| 17 | * **Example:** Read the lifecycle policies |
| 18 | * ```typescript |
| 19 | * const describeLifecycleConfiguration = |
| 20 | * yield* AWS.EFS.DescribeLifecycleConfiguration(files); |
| 21 | * |
| 22 | * const { LifecyclePolicies } = yield* describeLifecycleConfiguration(); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface DescribeLifecycleConfiguration extends Binding.Service< |
| 28 | DescribeLifecycleConfiguration, |
| 29 | "AWS.EFS.DescribeLifecycleConfiguration", |
| 30 | ( |
| 31 | fileSystem: FileSystem, |
| 32 | ) => Effect.Effect< |
| 33 | () => Effect.Effect< |
| 34 | efs.LifecycleConfigurationDescription, |
| 35 | efs.DescribeLifecycleConfigurationError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const DescribeLifecycleConfiguration = |
| 40 | Binding.Service<DescribeLifecycleConfiguration>( |
| 41 | "AWS.EFS.DescribeLifecycleConfiguration", |
| 42 | ); |