| 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 | |
| 5 | /** |
| 6 | * Request for {@link CreateGrantVersion}. |
| 7 | */ |
| 8 | export interface CreateGrantVersionRequest |
| 9 | extends licensemanager.CreateGrantVersionRequest {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `license-manager:CreateGrantVersion` — publish a new |
| 13 | * version of an existing grant. This is also how a recipient **activates** |
| 14 | * an accepted grant: create a version with `Status: "ACTIVE"` (and how a |
| 15 | * grantor amends allowed operations or deactivates a grant). |
| 16 | * |
| 17 | * Provide the implementation with |
| 18 | * `Effect.provide(AWS.LicenseManager.CreateGrantVersionHttp)`. |
| 19 | * ### Managing Grants |
| 20 | * **Example:** Activate an Accepted Grant |
| 21 | * ```typescript |
| 22 | * // init |
| 23 | * const createGrantVersion = yield* AWS.LicenseManager.CreateGrantVersion(); |
| 24 | * |
| 25 | * // runtime — after acceptGrant({ GrantArn }) |
| 26 | * yield* createGrantVersion({ |
| 27 | * GrantArn: grantArn, |
| 28 | * Status: "ACTIVE", |
| 29 | * ClientToken: crypto.randomUUID(), |
| 30 | * }); |
| 31 | * ``` |
| 32 | * |
| 33 | * @binding |
| 34 | */ |
| 35 | export interface CreateGrantVersion extends Binding.Service< |
| 36 | CreateGrantVersion, |
| 37 | "AWS.LicenseManager.CreateGrantVersion", |
| 38 | () => Effect.Effect< |
| 39 | ( |
| 40 | request: CreateGrantVersionRequest, |
| 41 | ) => Effect.Effect< |
| 42 | licensemanager.CreateGrantVersionResponse, |
| 43 | licensemanager.CreateGrantVersionError |
| 44 | > |
| 45 | > |
| 46 | > {} |
| 47 | export const CreateGrantVersion = Binding.Service<CreateGrantVersion>( |
| 48 | "AWS.LicenseManager.CreateGrantVersion", |
| 49 | ); |