import { AbstractValidator } from '../types'; /** The type for a validated _string_ ARN (Amazon Resource Name) */ export type ArnString = string & { __arn: never; } & (string extends Service ? string : { [k in `__arn_service_${Service}`]: never; }) & (string extends ResourceType ? string : { [k in `__arn_resource_${ResourceType}`]: never; }); /** The type for a _parsed_ ARN (Amazon Resource Name) */ export interface ParsedArn { /** The full */ Arn: ArnString; Partition: string; Service: Service; Region: string; Account: string; Resource: [ResourceType, ...string[]]; } /** Validator parsing an ARN (Amazon Resource Name) and returning its components */ export declare class ParsedArnValidator extends AbstractValidator, string> { private _service?; private _type?; /** * Create a new {@link ParsedArnValidator} instance. * * @param service The (optional) service the ARN should be pointing to * (e.g. `iam` or `elasticloadbalancing`) * @param resourceType The (optional) resource _type_ the ARN should be * representing (e.g. `role` in the `iam` service, or * `targetgroup` in the `elasticloadbalancing` service) */ constructor(service?: Service, resourceType?: ResourceType); validate(value: unknown): ParsedArn; } /** Validator validating an ARN (Amazon Resource Name) _string_ */ export declare class ArnValidator extends AbstractValidator, string> { private _service?; private _type?; /** * Create a new {@link ArnValidator} instance. * * @param service The (optional) service the ARN should be pointing to * (e.g. `iam` or `elasticloadbalancing`) * @param resourceType The (optional) resource _type_ the ARN should be * representing (e.g. `role` in the `iam` service, or * `targetgroup` in the `elasticloadbalancing` service) */ constructor(service?: Service, resourceType?: ResourceType); validate(value: unknown): ArnString; } /** * Create a new {@link ParsedArnValidator} parsing an ARN referring to the * specified `service` (e.g. `iam` or `elasticloadbalancing`). * * An (optional) resource _type_ can be specified, and will validate the first * component of the ARN's resource (e.g. `role` in the `iam` service, or * `targetgroup` in the `elasticloadbalancing` service) */ export declare function parseArnFactory(service: Service, resourceType?: ResourceType): ParsedArnValidator; /** * Create a new {@link ArnValidator} validating an ARN referring to the * specified `service` (e.g. `iam` or `elasticloadbalancing`). * * An (optional) resource _type_ can be specified, and will validate the first * component of the ARN's resource (e.g. `role` in the `iam` service, or * `targetgroup` in the `elasticloadbalancing` service) */ export declare function arnFactory(service: Service, resourceType?: ResourceType): ArnValidator; /** Validate a string and parse it into into an {@link ParsedArn} */ export declare const parseArn: typeof parseArnFactory & ParsedArnValidator; /** Validate a ARN (Amazon Resource Name) string */ export declare const arn: typeof arnFactory & ArnValidator;