1import type * as mediaconnect from "@distilled.cloud/aws/mediaconnect";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Flow } from "./Flow.ts";
5
6/**
7 * Runtime binding for `mediaconnect:RevokeFlowEntitlement`.
8 *
9 * Revokes an entitlement previously granted on the bound {@link Flow} —
10 * the content immediately becomes unavailable to the subscriber and the
11 * associated output is removed from the flow. The flow ARN is injected
12 * from the binding; the entitlement to revoke is passed at runtime.
13 * Because the IAM resource types for this action are the flow AND the
14 * entitlement (a sibling ARN, not derived from the flow ARN), the
15 * deploy-time grant covers the flow ARN plus the entitlement wildcard.
16 * Provide the implementation with
17 * `Effect.provide(AWS.MediaConnect.RevokeFlowEntitlementHttp)`.
18 * ### Managing Entitlements
19 * **Example:** Revoke a Subscriber's Access
20 * ```typescript
21 * // init — bind the operation to the flow
22 * const revokeEntitlement = yield* AWS.MediaConnect.RevokeFlowEntitlement(flow);
23 *
24 * // runtime
25 * yield* revokeEntitlement({ EntitlementArn: entitlementArn });
26 * ```
27 *
28 * @binding
29 */
30export interface RevokeFlowEntitlement extends Binding.Service<
31 RevokeFlowEntitlement,
32 "AWS.MediaConnect.RevokeFlowEntitlement",
33 (
34 flow: Flow,
35 ) => Effect.Effect<
36 (
37 request: Omit<mediaconnect.RevokeFlowEntitlementRequest, "FlowArn">,
38 ) => Effect.Effect<
39 mediaconnect.RevokeFlowEntitlementResponse,
40 mediaconnect.RevokeFlowEntitlementError
41 >
42 >
43> {}
44export const RevokeFlowEntitlement = Binding.Service<RevokeFlowEntitlement>(
45 "AWS.MediaConnect.RevokeFlowEntitlement",
46);