@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 47 lines 1.61 KB
Raw
1 import type * as licensemanager from "@distilled.cloud/aws/license-manager";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Request for {@link CreateGrant}.
7 */
8 export interface CreateGrantRequest extends licensemanager.CreateGrantRequest {}
9
10 /**
11 * Runtime binding for `license-manager:CreateGrant` — share a seller-issued
12 * license's entitlements with an Amazon Web Services account, organization,
13 * or organizational unit. The distribution half of an ISV fulfillment
14 * backend: after minting a license with `CreateLicense`, grant it to the
15 * customer's account.
16 *
17 * Provide the implementation with
18 * `Effect.provide(AWS.LicenseManager.CreateGrantHttp)`.
19 * ### Managing Grants
20 * **Example:** Grant a License to a Customer Account
21 * ```typescript
22 * // init
23 * const createGrant = yield* AWS.LicenseManager.CreateGrant();
24 *
25 * // runtime
26 * const { GrantArn } = yield* createGrant({
27 * GrantName: "customer-grant",
28 * LicenseArn: licenseArn,
29 * HomeRegion: region,
30 * Principals: [`arn:aws:iam::${customerAccountId}:root`],
31 * AllowedOperations: ["CheckoutLicense", "CheckInLicense", "ExtendConsumptionLicense", "ListPurchasedLicenses"],
32 * ClientToken: crypto.randomUUID(),
33 * });
34 * ```
35 *
36 * @binding
37 */
38 export interface CreateGrant extends Binding.Service<
39 CreateGrant,
40 "AWS.LicenseManager.CreateGrant",
41 () => Effect.Effect<
42 (
43 request: CreateGrantRequest,
44 ) => Effect.Effect<licensemanager.CreateGrantResponse, licensemanager.CreateGrantError>
45 >
46 > {}
47 export const CreateGrant = Binding.Service<CreateGrant>("AWS.LicenseManager.CreateGrant");