sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ CodeDeploy/ GetDeployment.ts

import type * as SVC from "@distilled.cloud/aws/codedeploy";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { DeploymentGroup } from "./DeploymentGroup.ts";

/**
 * Runtime binding for `codedeploy:GetDeployment` — reads a deployment's
 * status, revision, and rollout overview. CodeDeploy authorizes the call
 * against the deployment group the deployment belongs to.
 * ### Observing Deployments
 * **Example:** Poll a Deployment's Status
 * ```typescript
 * const getDeployment = yield* AWS.CodeDeploy.GetDeployment(group);
 *
 * const { deploymentInfo } = yield* getDeployment({ deploymentId });
 * ```
 *
 * @binding
 */
export interface GetDeployment extends Binding.Service<
  GetDeployment,
  "AWS.CodeDeploy.GetDeployment",
  <G extends DeploymentGroup>(
    group: G,
  ) => Effect.Effect<
    (
      request: SVC.GetDeploymentInput,
    ) => Effect.Effect<SVC.GetDeploymentOutput, SVC.GetDeploymentError>
  >
> {}
export const GetDeployment = Binding.Service<GetDeployment>("AWS.CodeDeploy.GetDeployment");