| 1 | import type * as eks from "@distilled.cloud/aws/eks"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Cluster } from "./Cluster.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `eks:DescribeAccessEntry`. |
| 8 | * |
| 9 | * Reads one access entry — the Kubernetes username, groups, and type mapped to an IAM principal. |
| 10 | * The cluster `clusterName` is injected from the bound {@link Cluster} and `eks:DescribeAccessEntry` is granted on the cluster's sub-resource ARNs. |
| 11 | * Provide the implementation with |
| 12 | * `Effect.provide(AWS.EKS.DescribeAccessEntryHttp)`. |
| 13 | * ### Inspecting Identity and Access |
| 14 | * **Example:** Read an Access Entry |
| 15 | * ```typescript |
| 16 | * // init |
| 17 | * const describeAccessEntry = yield* AWS.EKS.DescribeAccessEntry(cluster); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { accessEntry } = yield* describeAccessEntry({ principalArn }); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface DescribeAccessEntry extends Binding.Service< |
| 26 | DescribeAccessEntry, |
| 27 | "AWS.EKS.DescribeAccessEntry", |
| 28 | ( |
| 29 | cluster: Cluster, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request: Omit<eks.DescribeAccessEntryRequest, "clusterName">, |
| 33 | ) => Effect.Effect< |
| 34 | eks.DescribeAccessEntryResponse, |
| 35 | eks.DescribeAccessEntryError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const DescribeAccessEntry = Binding.Service<DescribeAccessEntry>( |
| 40 | "AWS.EKS.DescribeAccessEntry", |
| 41 | ); |