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 GetAccessToken}.
7 */
8export interface GetAccessTokenRequest
9 extends licensemanager.GetAccessTokenRequest {}
10
11/**
12 * Runtime binding for `license-manager:GetAccessToken` — exchange a
13 * long-lived refresh token (minted by `CreateToken`) for a temporary
14 * access token to use with `AssumeRoleWithWebIdentity`. Both the refresh
15 * token and the returned access token are `Redacted` end-to-end.
16 *
17 * Provide the implementation with
18 * `Effect.provide(AWS.LicenseManager.GetAccessTokenHttp)`.
19 * ### License Checkout Data Plane
20 * **Example:** Exchange a Refresh Token for an Access Token
21 * ```typescript
22 * // init
23 * const getAccessToken = yield* AWS.LicenseManager.GetAccessToken();
24 *
25 * // runtime — AccessToken is Redacted; unwrap only at the point of use
26 * const { AccessToken } = yield* getAccessToken({ Token: refreshToken });
27 * ```
28 *
29 * @binding
30 */
31export interface GetAccessToken extends Binding.Service<
32 GetAccessToken,
33 "AWS.LicenseManager.GetAccessToken",
34 () => Effect.Effect<
35 (
36 request: GetAccessTokenRequest,
37 ) => Effect.Effect<
38 licensemanager.GetAccessTokenResponse,
39 licensemanager.GetAccessTokenError
40 >
41 >
42> {}
43export const GetAccessToken = Binding.Service<GetAccessToken>(
44 "AWS.LicenseManager.GetAccessToken",
45);