| 1 | import type * as identitystore from "@distilled.cloud/aws/identitystore"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Instance } from "./Instance.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for the `DescribeGroupMembership` operation (IAM action |
| 8 | * `identitystore:DescribeGroupMembership`), scoped to one {@link Instance}. |
| 9 | * |
| 10 | * Reads a group membership (group id + member id) from the bound instance's identity store by `MembershipId`. The instance's |
| 11 | * `IdentityStoreId` is injected from the binding. Provide the implementation with |
| 12 | * `Effect.provide(AWS.IdentityCenter.DescribeGroupMembershipHttp)`. |
| 13 | * ### Querying Group Memberships |
| 14 | * **Example:** Read a Membership |
| 15 | * ```typescript |
| 16 | * // init — bind the operation to the Identity Center instance |
| 17 | * const describeGroupMembership = yield* AWS.IdentityCenter.DescribeGroupMembership(instance); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const membership = yield* describeGroupMembership({ |
| 21 | * MembershipId: membershipId, |
| 22 | * }); |
| 23 | * console.log(membership.GroupId, membership.MemberId); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface DescribeGroupMembership extends Binding.Service< |
| 29 | DescribeGroupMembership, |
| 30 | "AWS.IdentityCenter.DescribeGroupMembership", |
| 31 | ( |
| 32 | instance: Instance, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request: Omit< |
| 36 | identitystore.DescribeGroupMembershipRequest, |
| 37 | "IdentityStoreId" |
| 38 | >, |
| 39 | ) => Effect.Effect< |
| 40 | identitystore.DescribeGroupMembershipResponse, |
| 41 | identitystore.DescribeGroupMembershipError |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | export const DescribeGroupMembership = Binding.Service<DescribeGroupMembership>( |
| 46 | "AWS.IdentityCenter.DescribeGroupMembership", |
| 47 | ); |