1import * as secretsmanager from "@distilled.cloud/aws/secrets-manager";
2import * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Secret } from "./Secret.ts";
5
6/**
7 * Runtime binding for `secretsmanager:DescribeSecret`.
8 *
9 * Bind this operation to a `Secret` to get a callable that reads the secret's
10 * metadata (name, description, rotation config, version stages) without
11 * exposing its value. Provide the implementation with
12 * `Effect.provide(AWS.SecretsManager.DescribeSecretHttp)`.
13 * ### Inspecting Secrets
14 * **Example:** Read a Secret's Metadata
15 * ```typescript
16 * // init — bind the operation to the secret
17 * const describeSecret = yield* AWS.SecretsManager.DescribeSecret(secret);
18 *
19 * // runtime — metadata only, no secret value in the response
20 * const info = yield* describeSecret();
21 * const arn = info.ARN;
22 * const description = info.Description;
23 * ```
24 *
25 * @binding
26 */
27export interface DescribeSecret extends Binding.Service<
28 DescribeSecret,
29 "AWS.SecretsManager.DescribeSecret",
30 (
31 secret: Secret,
32 ) => Effect.Effect<
33 () => Effect.Effect<
34 secretsmanager.DescribeSecretResponse,
35 secretsmanager.DescribeSecretError
36 >
37 >
38> {}
39
40export const DescribeSecret = Binding.Service<DescribeSecret>(
41 "AWS.SecretsManager.DescribeSecret",
42);