| 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:DescribeFargateProfile`. |
| 8 | * |
| 9 | * Reads one Fargate profile's state — pod execution role, selectors, subnets, and status. |
| 10 | * The cluster `clusterName` is injected from the bound {@link Cluster} and `eks:DescribeFargateProfile` is granted on the cluster's sub-resource ARNs. |
| 11 | * Provide the implementation with |
| 12 | * `Effect.provide(AWS.EKS.DescribeFargateProfileHttp)`. |
| 13 | * ### Inspecting Compute |
| 14 | * **Example:** Read a Fargate Profile |
| 15 | * ```typescript |
| 16 | * // init |
| 17 | * const describeFargateProfile = yield* AWS.EKS.DescribeFargateProfile(cluster); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { fargateProfile } = yield* describeFargateProfile({ |
| 21 | * fargateProfileName: "default", |
| 22 | * }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface DescribeFargateProfile extends Binding.Service< |
| 28 | DescribeFargateProfile, |
| 29 | "AWS.EKS.DescribeFargateProfile", |
| 30 | ( |
| 31 | cluster: Cluster, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request: Omit<eks.DescribeFargateProfileRequest, "clusterName">, |
| 35 | ) => Effect.Effect< |
| 36 | eks.DescribeFargateProfileResponse, |
| 37 | eks.DescribeFargateProfileError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | export const DescribeFargateProfile = Binding.Service<DescribeFargateProfile>( |
| 42 | "AWS.EKS.DescribeFargateProfile", |
| 43 | ); |