1import type * as licensemanager from "@distilled.cloud/aws/license-manager";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Request for {@link CheckoutBorrowLicense}.
7 */
8export interface CheckoutBorrowLicenseRequest
9 extends licensemanager.CheckoutBorrowLicenseRequest {}
10
11/**
12 * Runtime binding for `license-manager:CheckoutBorrowLicense` — check out
13 * an offline-capable (borrow) entitlement from a seller-issued license
14 * that allows borrowing. The signed token proves the entitlement while the
15 * consumer is disconnected.
16 *
17 * Provide the implementation with
18 * `Effect.provide(AWS.LicenseManager.CheckoutBorrowLicenseHttp)`.
19 * ### License Checkout Data Plane
20 * **Example:** Borrow an Entitlement for Offline Use
21 * ```typescript
22 * // init
23 * const checkoutBorrow = yield* AWS.LicenseManager.CheckoutBorrowLicense();
24 *
25 * // runtime
26 * const borrowed = yield* checkoutBorrow({
27 * LicenseArn: licenseArn,
28 * Entitlements: [{ Name: "seats", Value: "1", Unit: "Count" }],
29 * DigitalSignatureMethod: "JWT_PS384",
30 * ClientToken: crypto.randomUUID(),
31 * });
32 * ```
33 *
34 * @binding
35 */
36export interface CheckoutBorrowLicense extends Binding.Service<
37 CheckoutBorrowLicense,
38 "AWS.LicenseManager.CheckoutBorrowLicense",
39 () => Effect.Effect<
40 (
41 request: CheckoutBorrowLicenseRequest,
42 ) => Effect.Effect<
43 licensemanager.CheckoutBorrowLicenseResponse,
44 licensemanager.CheckoutBorrowLicenseError
45 >
46 >
47> {}
48export const CheckoutBorrowLicense = Binding.Service<CheckoutBorrowLicense>(
49 "AWS.LicenseManager.CheckoutBorrowLicense",
50);