sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ LicenseManager/ GetLicenseUsage.ts

import type * as licensemanager from "@distilled.cloud/aws/license-manager";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

/**
 * Request for {@link GetLicenseUsage}.
 */
export interface GetLicenseUsageRequest extends licensemanager.GetLicenseUsageRequest {}

/**
 * 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)`.
 * ### Reading Licenses and Grants
 * **Example:** Read a License's Entitlement Usage
 * ```typescript
 * // init
 * const getLicenseUsage = yield* AWS.LicenseManager.GetLicenseUsage();
 *
 * // runtime
 * const { LicenseUsage } = yield* getLicenseUsage({
 *   LicenseArn: licenseArn,
 * });
 * ```
 *
 * @binding
 */
export interface GetLicenseUsage extends Binding.Service<
  GetLicenseUsage,
  "AWS.LicenseManager.GetLicenseUsage",
  () => Effect.Effect<
    (
      request: GetLicenseUsageRequest,
    ) => Effect.Effect<licensemanager.GetLicenseUsageResponse, licensemanager.GetLicenseUsageError>
  >
> {}
export const GetLicenseUsage = Binding.Service<GetLicenseUsage>(
  "AWS.LicenseManager.GetLicenseUsage",
);