Skip to content

CreateToken

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(),
});