| 1 | import type * as licensemanager from "@distilled.cloud/aws/license-manager"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { LicenseConfiguration } from "./LicenseConfiguration.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Request for {@link ListUsageForLicenseConfiguration}. The bound configuration's ARN is injected |
| 8 | * automatically. |
| 9 | */ |
| 10 | export interface ListUsageForLicenseConfigurationRequest extends Omit< |
| 11 | licensemanager.ListUsageForLicenseConfigurationRequest, |
| 12 | "LicenseConfigurationArn" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Runtime binding for `license-manager:ListUsageForLicenseConfiguration` — |
| 17 | * list per-resource license usage (consumed licenses per instance/AMI) |
| 18 | * tracked by the bound license configuration. |
| 19 | * |
| 20 | * Provide the implementation with |
| 21 | * `Effect.provide(AWS.LicenseManager.ListUsageForLicenseConfigurationHttp)`. |
| 22 | * ### Reading License Configurations |
| 23 | * **Example:** List Per-Resource License Usage |
| 24 | * ```typescript |
| 25 | * // init |
| 26 | * const listUsage = |
| 27 | * yield* AWS.LicenseManager.ListUsageForLicenseConfiguration(licenses); |
| 28 | * |
| 29 | * // runtime |
| 30 | * const { LicenseConfigurationUsageList } = yield* listUsage(); |
| 31 | * ``` |
| 32 | * |
| 33 | * @binding |
| 34 | */ |
| 35 | export interface ListUsageForLicenseConfiguration extends Binding.Service< |
| 36 | ListUsageForLicenseConfiguration, |
| 37 | "AWS.LicenseManager.ListUsageForLicenseConfiguration", |
| 38 | ( |
| 39 | configuration: LicenseConfiguration, |
| 40 | ) => Effect.Effect< |
| 41 | ( |
| 42 | request?: ListUsageForLicenseConfigurationRequest, |
| 43 | ) => Effect.Effect< |
| 44 | licensemanager.ListUsageForLicenseConfigurationResponse, |
| 45 | licensemanager.ListUsageForLicenseConfigurationError |
| 46 | > |
| 47 | > |
| 48 | > {} |
| 49 | export const ListUsageForLicenseConfiguration = |
| 50 | Binding.Service<ListUsageForLicenseConfiguration>( |
| 51 | "AWS.LicenseManager.ListUsageForLicenseConfiguration", |
| 52 | ); |