/** * The ECS reads a deployment's rollback verdict rests on (FJL-901): the * service deployments ECS records for a service, how each is going, and the * task definition each rolls out. The deployment tail reads them through * `EcsService`, whose methods delegate here. */ import { type ECSClient } from "@aws-sdk/client-ecs"; import { type Result } from "@fjall/generator"; import { EcsError } from "./ecsError.js"; /** A service deployment as ListServiceDeployments summarises it. */ export interface ServiceDeploymentBriefInfo { serviceDeploymentArn: string; createdAt?: Date; finishedAt?: Date; status?: string; statusReason?: string; targetServiceRevisionArn?: string; } /** * A service deployment as DescribeServiceDeployments details it, narrowed to * what the deployment tail reads. `rollbackStartedAt` is set once ECS has * started rolling the deployment back. */ export interface ServiceDeploymentInfo extends ServiceDeploymentBriefInfo { rollbackStartedAt?: Date; } /** A service deployment or revision ECS reported under `failures`, with its reason. */ export interface EcsArnFailure { arn: string; reason: string; } export interface ServiceDeploymentsDescription { deployments: ServiceDeploymentInfo[]; failures: EcsArnFailure[]; } /** A service revision, narrowed to the task definition it deploys. */ export interface ServiceRevisionInfo { serviceRevisionArn: string; taskDefinition?: string; } export interface ServiceRevisionsDescription { revisions: ServiceRevisionInfo[]; failures: EcsArnFailure[]; } /** * Every service deployment of a service created at or after `createdAfter`, * newest first, following every page. ECS reads the `createdAt` filter * against each deployment's own creation time (measured in production * us-east-1 on 2026-10-02; its API reference says the service's). An abort * fails the read rather than returning the pages it reached. */ export declare function listServiceDeployments(client: () => Pick, clusterArn: string, serviceArn: string, createdAfter: Date, abortSignal?: AbortSignal): Promise>; /** * Describe service deployments, batched at 20 ARNs. Every entry ECS reports * under `failures` is surfaced. An abort fails the read rather than * returning the batches it reached. */ export declare function describeServiceDeployments(client: () => Pick, serviceDeploymentArns: readonly string[], abortSignal?: AbortSignal): Promise>; /** * Describe service revisions, batched at 20 ARNs, narrowed to the task * definition each deploys. Every entry ECS reports under `failures` is * surfaced. An abort fails the read rather than returning the batches it * reached. */ export declare function describeServiceRevisions(client: () => Pick, serviceRevisionArns: readonly string[], abortSignal?: AbortSignal): Promise>;