@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 45 lines 1.32 KB
Raw
1 import * as Kinesis from "@distilled.cloud/aws/kinesis";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { Stream } from "./Stream.ts";
5
6 export interface GetResourcePolicyRequest extends Omit<
7 Kinesis.GetResourcePolicyInput,
8 "ResourceARN"
9 > {}
10
11 /**
12 * Runtime binding for `kinesis:GetResourcePolicy`.
13 *
14 * Bind this operation to a `Stream` to read the resource policy attached to
15 * it (set via the stream's `resourcePolicy` prop) — the stream ARN is
16 * injected automatically. Provide the implementation with
17 * `Effect.provide(AWS.Kinesis.GetResourcePolicyHttp)`.
18 * ### Inspecting Streams
19 * **Example:** Read the Stream's Resource Policy
20 * ```typescript
21 * // init
22 * const getResourcePolicy = yield* AWS.Kinesis.GetResourcePolicy(stream);
23 *
24 * // runtime
25 * const result = yield* getResourcePolicy();
26 * const policy = JSON.parse(result.Policy);
27 * ```
28 *
29 * @binding
30 */
31 export interface GetResourcePolicy extends Binding.Service<
32 GetResourcePolicy,
33 "AWS.Kinesis.GetResourcePolicy",
34 (
35 stream: Stream,
36 ) => Effect.Effect<
37 (
38 request?: GetResourcePolicyRequest,
39 ) => Effect.Effect<Kinesis.GetResourcePolicyOutput, Kinesis.GetResourcePolicyError>
40 >
41 > {}
42
43 export const GetResourcePolicy = Binding.Service<GetResourcePolicy>(
44 "AWS.Kinesis.GetResourcePolicy",
45 );