Skip to content

CheckoutLicense

Source: src/AWS/LicenseManager/CheckoutLicense.ts

Runtime binding for license-manager:CheckoutLicense — check out entitlements from a seller-issued license for the calling application. The returned LicenseConsumptionToken is used to check in or extend the consumption; PROVISIONAL checkouts expire and must be extended with ExtendLicenseConsumption.

Provide the implementation with Effect.provide(AWS.LicenseManager.CheckoutLicenseHttp).

// init — account-level binding takes no resource
const checkoutLicense = yield* AWS.LicenseManager.CheckoutLicense();
// runtime
const checkout = yield* checkoutLicense({
ProductSKU: "my-product-sku",
CheckoutType: "PROVISIONAL",
KeyFingerprint: keyFingerprint,
Entitlements: [{ Name: "seats", Value: "1", Unit: "Count" }],
ClientToken: crypto.randomUUID(),
});
const token = checkout.LicenseConsumptionToken;
// on the Function effect:
// .pipe(Effect.provide(AWS.LicenseManager.CheckoutLicenseHttp))