Skip to content

AWS.LicenseManager reference

Source: src/AWS/LicenseManager/AcceptGrant.ts

Runtime binding for license-manager:AcceptGrant — accept a license grant that another account distributed to this account, activating the granted entitlements.

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

// init
const acceptGrant = yield* AWS.LicenseManager.AcceptGrant();
// runtime
const { Status } = yield* acceptGrant({ GrantArn: grantArn });

Source: src/AWS/LicenseManager/CheckInLicense.ts

Runtime binding for license-manager:CheckInLicense — return a previously checked-out entitlement to the license pool using the consumption token from CheckoutLicense.

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

CheckInLicense: License Checkout Data Plane

Section titled “CheckInLicense: License Checkout Data Plane”
// init
const checkInLicense = yield* AWS.LicenseManager.CheckInLicense();
// runtime
yield* checkInLicense({ LicenseConsumptionToken: token });

Source: src/AWS/LicenseManager/CheckoutBorrowLicense.ts

Runtime binding for license-manager:CheckoutBorrowLicense — check out an offline-capable (borrow) entitlement from a seller-issued license that allows borrowing. The signed token proves the entitlement while the consumer is disconnected.

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

CheckoutBorrowLicense: License Checkout Data Plane

Section titled “CheckoutBorrowLicense: License Checkout Data Plane”
// init
const checkoutBorrow = yield* AWS.LicenseManager.CheckoutBorrowLicense();
// runtime
const borrowed = yield* checkoutBorrow({
LicenseArn: licenseArn,
Entitlements: [{ Name: "seats", Value: "1", Unit: "Count" }],
DigitalSignatureMethod: "JWT_PS384",
ClientToken: crypto.randomUUID(),
});

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).

CheckoutLicense: License Checkout Data Plane

Section titled “CheckoutLicense: License Checkout Data Plane”
// 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))

Source: src/AWS/LicenseManager/CreateGrant.ts

Runtime binding for license-manager:CreateGrant — share a seller-issued license’s entitlements with an Amazon Web Services account, organization, or organizational unit. The distribution half of an ISV fulfillment backend: after minting a license with CreateLicense, grant it to the customer’s account.

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

// init
const createGrant = yield* AWS.LicenseManager.CreateGrant();
// runtime
const { GrantArn } = yield* createGrant({
GrantName: "customer-grant",
LicenseArn: licenseArn,
HomeRegion: region,
Principals: [`arn:aws:iam::${customerAccountId}:root`],
AllowedOperations: ["CheckoutLicense", "CheckInLicense", "ExtendConsumptionLicense", "ListPurchasedLicenses"],
ClientToken: crypto.randomUUID(),
});

Source: src/AWS/LicenseManager/CreateGrantVersion.ts

Runtime binding for license-manager:CreateGrantVersion — publish a new version of an existing grant. This is also how a recipient activates an accepted grant: create a version with Status: "ACTIVE" (and how a grantor amends allowed operations or deactivates a grant).

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

// init
const createGrantVersion = yield* AWS.LicenseManager.CreateGrantVersion();
// runtime — after acceptGrant({ GrantArn })
yield* createGrantVersion({
GrantArn: grantArn,
Status: "ACTIVE",
ClientToken: crypto.randomUUID(),
});

Source: src/AWS/LicenseManager/CreateLicense.ts

Runtime binding for license-manager:CreateLicense — issue a seller-issued license from the calling application. The core of an ISV ordering/fulfillment backend: when a customer purchases, the backend mints a license with the product SKU, entitlements, validity window, and consumption configuration, then distributes it via grants or activation tokens.

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

// init — account-level binding takes no resource
const createLicense = yield* AWS.LicenseManager.CreateLicense();
// runtime
const { LicenseArn, Version } = yield* createLicense({
LicenseName: "my-product-license",
ProductName: "My Product",
ProductSKU: "my-product-sku",
Issuer: { Name: "my-company" },
HomeRegion: region,
Validity: { Begin: new Date().toISOString() },
Entitlements: [
{ Name: "seats", MaxCount: 10, Unit: "Count", AllowCheckIn: true },
],
Beneficiary: customerAccountId,
ConsumptionConfiguration: {
ProvisionalConfiguration: { MaxTimeToLiveInMinutes: 60 },
},
ClientToken: crypto.randomUUID(),
});

Source: src/AWS/LicenseManager/CreateLicenseVersion.ts

Runtime binding for license-manager:CreateLicenseVersion — publish a new version of an existing seller-issued license (changed entitlements, extended validity, a status flip to AVAILABLE/DEACTIVATED). Pass the current version as SourceVersion.

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

// init
const createLicenseVersion = yield* AWS.LicenseManager.CreateLicenseVersion();
// runtime — read the current definition, publish an amended version
const { License } = yield* getLicense({ LicenseArn: licenseArn });
yield* createLicenseVersion({
LicenseArn: licenseArn,
LicenseName: License!.LicenseName!,
ProductName: License!.ProductName!,
Issuer: { Name: License!.Issuer!.Name! },
HomeRegion: License!.HomeRegion!,
Validity: { Begin: License!.Validity!.Begin, End: newEnd },
Entitlements: License!.Entitlements!,
ConsumptionConfiguration: License!.ConsumptionConfiguration!,
Status: "AVAILABLE",
SourceVersion: License!.Version,
ClientToken: crypto.randomUUID(),
});

Source: src/AWS/LicenseManager/CreateToken.ts

Runtime binding for license-manager:CreateToken — mint a long-lived refresh token for a license. The token (a claims-based JWT, Redacted end-to-end) is distributed to license consumers, who exchange it for temporary credentials with GetAccessToken + AssumeRoleWithWebIdentity.

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

// init
const createToken = yield* AWS.LicenseManager.CreateToken();
// runtime — Token is Redacted; hand it to the consumer without logging it
const { TokenId, Token } = yield* createToken({
LicenseArn: licenseArn,
ClientToken: crypto.randomUUID(),
});

Source: src/AWS/LicenseManager/DeleteGrant.ts

Runtime binding for license-manager:DeleteGrant — retire a grant (e.g. when a customer’s subscription lapses). The grant’s current version must be passed as Version.

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

// init
const deleteGrant = yield* AWS.LicenseManager.DeleteGrant();
// runtime
const { Grant } = yield* getGrant({ GrantArn: grantArn });
yield* deleteGrant({ GrantArn: grantArn, Version: Grant!.Version! });

Source: src/AWS/LicenseManager/DeleteLicense.ts

Runtime binding for license-manager:DeleteLicense — delete a seller-issued license (e.g. on refund or subscription cancellation). The license’s current version must be passed as SourceVersion.

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

// init
const deleteLicense = yield* AWS.LicenseManager.DeleteLicense();
// runtime
const { License } = yield* getLicense({ LicenseArn: licenseArn });
yield* deleteLicense({
LicenseArn: licenseArn,
SourceVersion: License!.Version!,
});

Source: src/AWS/LicenseManager/DeleteToken.ts

Runtime binding for license-manager:DeleteToken — revoke a refresh token minted by CreateToken, cutting off further GetAccessToken exchanges for it.

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

// init
const deleteToken = yield* AWS.LicenseManager.DeleteToken();
// runtime
yield* deleteToken({ TokenId: tokenId });

Source: src/AWS/LicenseManager/ExtendLicenseConsumption.ts

Runtime binding for license-manager:ExtendLicenseConsumption — extend a PROVISIONAL checkout’s expiration before it lapses, keeping a long-running consumer’s entitlement active.

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

ExtendLicenseConsumption: License Checkout Data Plane

Section titled “ExtendLicenseConsumption: License Checkout Data Plane”
// init
const extendConsumption =
yield* AWS.LicenseManager.ExtendLicenseConsumption();
// runtime
const { Expiration } = yield* extendConsumption({
LicenseConsumptionToken: token,
});

Source: src/AWS/LicenseManager/GetAccessToken.ts

Runtime binding for license-manager:GetAccessToken — exchange a long-lived refresh token (minted by CreateToken) for a temporary access token to use with AssumeRoleWithWebIdentity. Both the refresh token and the returned access token are Redacted end-to-end.

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

GetAccessToken: License Checkout Data Plane

Section titled “GetAccessToken: License Checkout Data Plane”
// init
const getAccessToken = yield* AWS.LicenseManager.GetAccessToken();
// runtime — AccessToken is Redacted; unwrap only at the point of use
const { AccessToken } = yield* getAccessToken({ Token: refreshToken });

Source: src/AWS/LicenseManager/GetGrant.ts

Runtime binding for license-manager:GetGrant — read a license grant’s details (grantee, allowed operations, status) by ARN.

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

// init
const getGrant = yield* AWS.LicenseManager.GetGrant();
// runtime
const { Grant } = yield* getGrant({ GrantArn: grantArn });

Source: src/AWS/LicenseManager/GetLicense.ts

Runtime binding for license-manager:GetLicense — read a seller-issued license’s details (issuer, entitlements, validity, consumption configuration) by ARN.

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

// init
const getLicense = yield* AWS.LicenseManager.GetLicense();
// runtime
const { License } = yield* getLicense({ LicenseArn: licenseArn });

Source: src/AWS/LicenseManager/GetLicenseConfiguration.ts

Runtime binding for license-manager:GetLicenseConfiguration — read the bound license configuration’s live state (counting type, license count, consumed count, rules, status) from a deployed Lambda or Task.

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

GetLicenseConfiguration: Reading License Configurations

Section titled “GetLicenseConfiguration: Reading License Configurations”
// init
const getConfiguration =
yield* AWS.LicenseManager.GetLicenseConfiguration(licenses);
// runtime
const config = yield* getConfiguration();
const remaining =
(config.LicenseCount ?? 0) - (config.ConsumedLicenses ?? 0);
// on the Function effect:
// .pipe(Effect.provide(AWS.LicenseManager.GetLicenseConfigurationHttp))

Source: src/AWS/LicenseManager/GetLicenseUsage.ts

Runtime binding for license-manager:GetLicenseUsage — read the per-entitlement usage counters of a seller-issued license.

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

GetLicenseUsage: Reading Licenses and Grants

Section titled “GetLicenseUsage: Reading Licenses and Grants”
// init
const getLicenseUsage = yield* AWS.LicenseManager.GetLicenseUsage();
// runtime
const { LicenseUsage } = yield* getLicenseUsage({
LicenseArn: licenseArn,
});

Source: src/AWS/LicenseManager/GetServiceSettings.ts

Runtime binding for license-manager:GetServiceSettings — read the account’s License Manager settings (S3 report bucket, SNS alert topic, organization integration).

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

GetServiceSettings: Resource Inventory and Specifications

Section titled “GetServiceSettings: Resource Inventory and Specifications”
// init
const getServiceSettings =
yield* AWS.LicenseManager.GetServiceSettings();
// runtime
const { SnsTopicArn, EnableCrossAccountsDiscovery } =
yield* getServiceSettings();

Source: src/AWS/LicenseManager/LicenseConfiguration.ts

An AWS License Manager license configuration — an abstraction of a customer license agreement that License Manager can track and enforce.

A license configuration specifies the licensing dimension (vCPUs, instances, cores, or sockets), an optional license count, and whether the count is a hard limit that blocks new launches once consumed.

LicenseConfiguration: Creating License Configurations

Section titled “LicenseConfiguration: Creating License Configurations”

Track licenses by vCPU

import * as LicenseManager from "alchemy/AWS/LicenseManager";
const licenses = yield* LicenseManager.LicenseConfiguration("Licenses", {
licenseCountingType: "vCPU",
});

Enforce a hard license limit

const licenses = yield* LicenseManager.LicenseConfiguration("Licenses", {
licenseCountingType: "Instance",
licenseCount: 10,
licenseCountHardLimit: true,
});

Socket licensing with dedicated-host rules

const licenses = yield* LicenseManager.LicenseConfiguration("Licenses", {
licenseCountingType: "Socket",
licenseCount: 4,
licenseRules: ["#allowedTenancy=EC2-DedicatedHost"],
description: "Oracle DB socket licenses",
});

Source: src/AWS/LicenseManager/ListAssociationsForLicenseConfiguration.ts

Runtime binding for license-manager:ListAssociationsForLicenseConfiguration — list the resources (instances, AMIs, hosts) currently associated with the bound license configuration.

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

ListAssociationsForLicenseConfiguration: Reading License Configurations

Section titled “ListAssociationsForLicenseConfiguration: Reading License Configurations”
// init
const listAssociations =
yield* AWS.LicenseManager.ListAssociationsForLicenseConfiguration(
licenses,
);
// runtime
const { LicenseConfigurationAssociations } = yield* listAssociations();

Source: src/AWS/LicenseManager/ListDistributedGrants.ts

Runtime binding for license-manager:ListDistributedGrants — list the grants this account has distributed to other accounts.

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

// init
const listDistributedGrants =
yield* AWS.LicenseManager.ListDistributedGrants();
// runtime
const { Grants } = yield* listDistributedGrants();

ListFailuresForLicenseConfigurationOperations

Section titled “ListFailuresForLicenseConfigurationOperations”

Source: src/AWS/LicenseManager/ListFailuresForLicenseConfigurationOperations.ts

Runtime binding for license-manager:ListFailuresForLicenseConfigurationOperations — list association/disassociation operations that failed for the bound license configuration (e.g. a hard-limit rejection at instance launch).

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

ListFailuresForLicenseConfigurationOperations: Reading License Configurations

Section titled “ListFailuresForLicenseConfigurationOperations: Reading License Configurations”
// init
const listFailures =
yield* AWS.LicenseManager.ListFailuresForLicenseConfigurationOperations(
licenses,
);
// runtime
const { LicenseOperationFailureList } = yield* listFailures();

Source: src/AWS/LicenseManager/ListLicenses.ts

Runtime binding for license-manager:ListLicenses — list the seller-issued licenses owned by the account.

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

// init
const listLicenses = yield* AWS.LicenseManager.ListLicenses();
// runtime
const { Licenses } = yield* listLicenses();

Source: src/AWS/LicenseManager/ListLicenseSpecificationsForResource.ts

Runtime binding for license-manager:ListLicenseSpecificationsForResource — list the license configurations associated with a resource (e.g. an AMI or instance).

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

ListLicenseSpecificationsForResource: Resource Inventory and Specifications

Section titled “ListLicenseSpecificationsForResource: Resource Inventory and Specifications”
// init
const listSpecifications =
yield* AWS.LicenseManager.ListLicenseSpecificationsForResource();
// runtime
const { LicenseSpecifications } = yield* listSpecifications({
ResourceArn: amiArn,
});

Source: src/AWS/LicenseManager/ListLicenseVersions.ts

Runtime binding for license-manager:ListLicenseVersions — list all versions of a seller-issued license.

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

ListLicenseVersions: Reading Licenses and Grants

Section titled “ListLicenseVersions: Reading Licenses and Grants”
// init
const listVersions = yield* AWS.LicenseManager.ListLicenseVersions();
// runtime
const { Licenses } = yield* listVersions({ LicenseArn: licenseArn });

Source: src/AWS/LicenseManager/ListReceivedGrants.ts

Runtime binding for license-manager:ListReceivedGrants — list the grants distributed to this account, e.g. to find pending grants to AcceptGrant.

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

// init
const listReceivedGrants =
yield* AWS.LicenseManager.ListReceivedGrants();
// runtime
const { Grants } = yield* listReceivedGrants();

Source: src/AWS/LicenseManager/ListReceivedLicenses.ts

Runtime binding for license-manager:ListReceivedLicenses — list the licenses granted to the account (e.g. AWS Marketplace entitlements), the consumer-side counterpart of ListLicenses.

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

ListReceivedLicenses: Reading Licenses and Grants

Section titled “ListReceivedLicenses: Reading Licenses and Grants”
// init
const listReceived = yield* AWS.LicenseManager.ListReceivedLicenses();
// runtime
const { Licenses } = yield* listReceived();

Source: src/AWS/LicenseManager/ListResourceInventory.ts

Runtime binding for license-manager:ListResourceInventory — list the resource inventory (instances and their platform details) discovered by License Manager via Systems Manager inventory.

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

ListResourceInventory: Resource Inventory and Specifications

Section titled “ListResourceInventory: Resource Inventory and Specifications”
// init
const listInventory = yield* AWS.LicenseManager.ListResourceInventory();
// runtime
const { ResourceInventoryList } = yield* listInventory();

Source: src/AWS/LicenseManager/ListTokens.ts

Runtime binding for license-manager:ListTokens — enumerate the refresh tokens minted for the account’s licenses (token metadata only; the token material itself is returned once by CreateToken).

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

// init
const listTokens = yield* AWS.LicenseManager.ListTokens();
// runtime
const { Tokens } = yield* listTokens();

Source: src/AWS/LicenseManager/ListUsageForLicenseConfiguration.ts

Runtime binding for license-manager:ListUsageForLicenseConfiguration — list per-resource license usage (consumed licenses per instance/AMI) tracked by the bound license configuration.

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

ListUsageForLicenseConfiguration: Reading License Configurations

Section titled “ListUsageForLicenseConfiguration: Reading License Configurations”
// init
const listUsage =
yield* AWS.LicenseManager.ListUsageForLicenseConfiguration(licenses);
// runtime
const { LicenseConfigurationUsageList } = yield* listUsage();

Source: src/AWS/LicenseManager/RejectGrant.ts

Runtime binding for license-manager:RejectGrant — reject a license grant that another account distributed to this account.

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

// init
const rejectGrant = yield* AWS.LicenseManager.RejectGrant();
// runtime
const { Status } = yield* rejectGrant({ GrantArn: grantArn });

Source: src/AWS/LicenseManager/UpdateLicenseSpecificationsForResource.ts

Runtime binding for license-manager:UpdateLicenseSpecificationsForResource — associate or disassociate license configurations with a resource (e.g. attach a license configuration to an AMI so launches are tracked).

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

UpdateLicenseSpecificationsForResource: Resource Inventory and Specifications

Section titled “UpdateLicenseSpecificationsForResource: Resource Inventory and Specifications”
// init
const updateSpecifications =
yield* AWS.LicenseManager.UpdateLicenseSpecificationsForResource();
// runtime
yield* updateSpecifications({
ResourceArn: amiArn,
AddLicenseSpecifications: [
{ LicenseConfigurationArn: configurationArn },
],
});