1import type * as identitystore from "@distilled.cloud/aws/identitystore";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Instance } from "./Instance.ts";
5
6/**
7 * Runtime binding for the `GetGroupId` operation (IAM action
8 * `identitystore:GetGroupId`), scoped to one {@link Instance}.
9 *
10 * Resolves a group's `GroupId` from a unique attribute (e.g. the display name) in the bound instance's identity store. The instance's
11 * `IdentityStoreId` is injected from the binding. Provide the implementation with
12 * `Effect.provide(AWS.IdentityCenter.GetGroupIdHttp)`.
13 * ### Looking Up Groups
14 * **Example:** Resolve a GroupId From a Display Name
15 * ```typescript
16 * // init — bind the operation to the Identity Center instance
17 * const getGroupId = yield* AWS.IdentityCenter.GetGroupId(instance);
18 *
19 * // runtime
20 * const { GroupId } = yield* getGroupId({
21 * AlternateIdentifier: {
22 * UniqueAttribute: {
23 * AttributePath: "displayName",
24 * AttributeValue: "platform-engineers",
25 * },
26 * },
27 * });
28 * ```
29 *
30 * @binding
31 */
32export interface GetGroupId extends Binding.Service<
33 GetGroupId,
34 "AWS.IdentityCenter.GetGroupId",
35 (
36 instance: Instance,
37 ) => Effect.Effect<
38 (
39 request: Omit<identitystore.GetGroupIdRequest, "IdentityStoreId">,
40 ) => Effect.Effect<
41 identitystore.GetGroupIdResponse,
42 identitystore.GetGroupIdError
43 >
44 >
45> {}
46export const GetGroupId = Binding.Service<GetGroupId>(
47 "AWS.IdentityCenter.GetGroupId",
48);