import { type Result } from "@fjall/generator"; /** Parsed representation of an AWS ARN. */ export interface ParsedArn { readonly partition: string; readonly service: string; readonly region: string; readonly accountId: string; readonly resource: string; } /** Parse a raw ARN string into its parts. Returns undefined if not a valid ARN. */ export declare function parseArn(arn: string): ParsedArn | undefined; /** * The AWS partition an ARN belongs to (`aws`, `aws-cn`, `aws-us-gov`, …). * * The partition is the ONLY authoritative statement a session makes about * which partition it is operating in — a region-prefix table buckets an * unrecognised region into `aws` silently, and a hardcoded `"aws"` is that * same guess without the table. Callers that cannot obtain an ARN must * surface the failure, never substitute a default — see the JSDoc of * `deployBoundaryPolicyArn` in `@fjall/generator` for what a wrong partition * costs at the two addressing seams. * * Fails closed: an ARN `parseArn` rejects, or whose partition segment is * outside the ARN grammar, yields a failure the caller must handle. */ export declare function partitionFromArn(arn: string): Result; /** Build a general ARN string. */ export declare function buildArn(service: string, region: string, accountId: string, resource: string, partition?: string): string; /** * The parts of an ECS service ARN * (`arn::ecs:::service//`). * `clusterName` and `serviceName` are the physical names the ARN carries, * which are also the construct id and manifest name the `DeployableService` * export is built from. */ export interface EcsServiceArnParts { readonly partition: string; readonly region: string; readonly accountId: string; readonly clusterName: string; readonly serviceName: string; } /** * Split an ECS service ARN into its parts, or undefined when the string is * not one. The partition is validated by shape (see `partitionFromArn`) * because callers splice it back into a cluster ARN they then address. */ export declare function extractEcsServiceParts(arn: string): EcsServiceArnParts | undefined;