@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, 04:45 UTC

main
ts 52 lines 1.63 KB
Raw
1 import type * as appregistry from "@distilled.cloud/aws/service-catalog-appregistry";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Application } from "./Application.ts";
5
6 /** `GetAssociatedResource` request with `application` injected from the bound {@link Application}. */
7 export interface GetAssociatedResourceRequest extends Omit<
8 appregistry.GetAssociatedResourceRequest,
9 "application"
10 > {}
11
12 /**
13 * Runtime binding for `servicecatalog:GetAssociatedResource`.
14 *
15 * Reads one resource associated with the bound application, including its
16 * application-tag sync status. Provide the implementation with
17 * `Effect.provide(AWS.AppRegistry.GetAssociatedResourceHttp)`.
18 * ### Reading Associated Resources
19 * **Example:** Get an Associated CloudFormation Stack
20 * ```typescript
21 * // init — bind the operation to the application
22 * const getAssociatedResource =
23 * yield* AWS.AppRegistry.GetAssociatedResource(app);
24 *
25 * // runtime
26 * const result = yield* getAssociatedResource({
27 * resourceType: "CFN_STACK",
28 * resource: "my-stack",
29 * });
30 * console.log(result.resource?.arn);
31 * ```
32 *
33 * @binding
34 */
35 export interface GetAssociatedResource extends Binding.Service<
36 GetAssociatedResource,
37 "AWS.AppRegistry.GetAssociatedResource",
38 (
39 application: Application,
40 ) => Effect.Effect<
41 (
42 request: GetAssociatedResourceRequest,
43 ) => Effect.Effect<
44 appregistry.GetAssociatedResourceResponse,
45 appregistry.GetAssociatedResourceError
46 >
47 >
48 > {}
49
50 export const GetAssociatedResource = Binding.Service<GetAssociatedResource>(
51 "AWS.AppRegistry.GetAssociatedResource",
52 );