sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ EMRContainers/ DescribeJobTemplate.ts

import type * as emrc from "@distilled.cloud/aws/emr-containers";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { JobTemplate } from "./JobTemplate.ts";

/**
 * Runtime binding for `emr-containers:DescribeJobTemplate`.
 *
 * Reads the bound {@link JobTemplate}'s stored `StartJobRun` values — the
 * execution role, release label, job driver, and parameter configuration.
 * The template ID is injected from the binding. Provide the implementation
 * with `Effect.provide(AWS.EMRContainers.DescribeJobTemplateHttp)`.
 * ### Job Templates
 * **Example:** Read The Bound Template
 * ```typescript
 * // init — bind the operation to the template
 * const describeJobTemplate =
 *   yield* AWS.EMRContainers.DescribeJobTemplate(template);
 *
 * // runtime
 * const { jobTemplate } = yield* describeJobTemplate();
 * yield* Effect.log(
 *   `template targets ${jobTemplate?.jobTemplateData.releaseLabel}`,
 * );
 * ```
 *
 * @binding
 */
export interface DescribeJobTemplate extends Binding.Service<
  DescribeJobTemplate,
  "AWS.EMRContainers.DescribeJobTemplate",
  (
    template: JobTemplate,
  ) => Effect.Effect<
    () => Effect.Effect<emrc.DescribeJobTemplateResponse, emrc.DescribeJobTemplateError>
  >
> {}
export const DescribeJobTemplate = Binding.Service<DescribeJobTemplate>(
  "AWS.EMRContainers.DescribeJobTemplate",
);