1import type * as repostspace from "@distilled.cloud/aws/repostspace";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Space } from "./Space.ts";
5
6export interface BatchRemoveRoleRequest extends Omit<
7 repostspace.BatchRemoveRoleInput,
8 "spaceId"
9> {}
10
11/**
12 * Runtime binding for the `BatchRemoveRole` operation (IAM action
13 * `repostspace:BatchRemoveRole` on the space ARN).
14 *
15 * Removes a space-level role from up to 100 users or groups of the bound
16 * {@link Space} in one call. Per-accessor failures are reported in the
17 * output's `errors` list rather than failing the whole call.
18 * Provide the implementation with
19 * `Effect.provide(AWS.RePostSpace.BatchRemoveRoleHttp)`.
20 * ### Managing Roles
21 * **Example:** Remove the EXPERT role from users
22 * ```typescript
23 * const batchRemoveRole = yield* AWS.RePostSpace.BatchRemoveRole(space);
24 *
25 * const result = yield* batchRemoveRole({
26 * accessorIds: ["94682c8d-1234-5678-9abc-e001c76e2c44"],
27 * role: "EXPERT",
28 * });
29 * console.log(result.removedAccessorIds, result.errors);
30 * ```
31 *
32 * @binding
33 */
34export interface BatchRemoveRole extends Binding.Service<
35 BatchRemoveRole,
36 "AWS.RePostSpace.BatchRemoveRole",
37 (
38 space: Space,
39 ) => Effect.Effect<
40 (
41 request: BatchRemoveRoleRequest,
42 ) => Effect.Effect<
43 repostspace.BatchRemoveRoleOutput,
44 repostspace.BatchRemoveRoleError
45 >
46 >
47> {}
48export const BatchRemoveRole = Binding.Service<BatchRemoveRole>(
49 "AWS.RePostSpace.BatchRemoveRole",
50);